edfcore 0.5.28 → 0.5.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -109,5 +109,5 @@ export declare const SIGNAL_FIELD_BLOCK_OFFSETS: {
109
109
  readonly reserved: 224;
110
110
  };
111
111
  /** Published package version. Kept in sync with package.json by a test. */
112
- export declare const VERSION = "0.5.28";
112
+ export declare const VERSION = "0.5.30";
113
113
  //# sourceMappingURL=constants.d.ts.map
package/dist/constants.js CHANGED
@@ -79,5 +79,5 @@ export const SIGNAL_FIELD_BLOCK_OFFSETS = {
79
79
  reserved: 224,
80
80
  };
81
81
  /** Published package version. Kept in sync with package.json by a test. */
82
- export const VERSION = '0.5.28';
82
+ export const VERSION = '0.5.30';
83
83
  //# sourceMappingURL=constants.js.map
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,53 @@ alone does not tell you whether you were affected.
6
6
  edfcore is pre-1.0. Patch releases have carried behaviour changes where the old behaviour was a
7
7
  defect; those are called out below.
8
8
 
9
+ ## 0.5.30
10
+
11
+ - **Added** what `diagnostics.md` prints for one header, printed. The page introduces the two ways of
12
+ looking at a diagnostics array by showing both on the same file: `formatDiagnostics` renders one
13
+ entry in full, five detail lines and all, and `summarizeDiagnostics` reduces the same four
14
+ diagnostics to `total 4, errors 1, warnings 1, infos 2`. Neither transcript was run.
15
+ `diagnostics.test.ts` covers the vocabulary and the sink, `diagnostic-message-lines.test.ts` the
16
+ line discipline, and `summarize-diagnostics.test.ts` the counting rules — all against fixtures of
17
+ their own.
18
+ - The rendered block is the one worth comparing whole. It is what a user pastes into an issue, and
19
+ every part of it is load-bearing differently: the severity and code a reader greps for, the
20
+ message, the byte offset they take to a hex editor, the raw bytes as written, the expected/actual
21
+ pair, and the spec clause. The page is the only place the whole shape appears.
22
+ - The paragraph under it makes four smaller claims and each is now checked: no ANSI escapes unless
23
+ you ask; `color` adds them, and stripping them gives back the uncoloured text exactly, so colour
24
+ is decoration and not content; `maxItems` caps the blocks and appends `... and N more`, dimmed
25
+ with SGR 2 when colour is on; and `formatDiagnostics([])` returns the empty string rather than a
26
+ blank line, which is what lets it concatenate into a larger report.
27
+ - The fixture is built to the page's own numbers rather than to a convenient shape — one error, one
28
+ warning and two infos is what the summary transcript says, and the two infos come from two
29
+ different codes because `byCode` is printed beside them.
30
+
31
+ ## 0.5.29
32
+
33
+ - **Added** the contract `signalIndices` has to keep at all five reads that take one.
34
+ `duplicate-signal-indices.test.ts` covers two of the rules `api-reading.md` states — duplicates are
35
+ dropped, the order given is the order returned — over `readRecords`, `readWindow` and
36
+ `streamRecords`. It does not reach the two envelope entry points, and nothing covered what the
37
+ option does when it is wrong.
38
+ - The refusals are the part worth pinning, because there are two of them and they are deliberately
39
+ different classes. An index the file does not have is an `EdfChannelNotFoundError`, an `EdfError`
40
+ carrying `selector` and `availableLabels` so a caller can offer the right one. An index naming the
41
+ annotations channel is a plain `RangeError`, because it can only be a caller's mistake and never a
42
+ file's — the bytes there are TAL text, and decoding them as samples produces numbers that look
43
+ exactly like a signal. `isEdfError` is the split, and a caller writing one `catch` for bad files
44
+ and another for bad calls depends on it holding at every entry point rather than at the one they
45
+ tested against.
46
+ - There is no reason for five functions to diverge — they share `resolveSignals` — which is exactly
47
+ why it is worth a test: a sixth entry point, or one that grows its own validation to report
48
+ something friendlier, is how a shared rule stops being one. All nine functions in `src/` that take
49
+ a `signalIndices` are enumerated by resolving their parameter types, and split into the five under
50
+ test, the two shared helpers, and the two annotation reads whose `signalIndices` selects annotation
51
+ signals and inverts both rules.
52
+ - Nine cases run at every one of the five: out of range, negative, fractional, the annotations
53
+ channel alone and mixed with a real signal, a repeat, a repeat out of order, a reversal, and an
54
+ empty selection — which returns no signals rather than all of them.
55
+
9
56
  ## 0.5.28
10
57
 
11
58
  - **Added** an already-aborted signal driven through every entry point that takes one.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.5.28",
3
+ "version": "0.5.30",
4
4
  "description": "Modern, typed, zero-dependency reader for EDF, EDF+, BDF and BDF+ biosignal files. Works in browsers and Node with true random access.",
5
5
  "keywords": [
6
6
  "edf",
package/src/constants.ts CHANGED
@@ -93,4 +93,4 @@ export const SIGNAL_FIELD_BLOCK_OFFSETS = {
93
93
  } as const;
94
94
 
95
95
  /** Published package version. Kept in sync with package.json by a test. */
96
- export const VERSION = '0.5.28';
96
+ export const VERSION = '0.5.30';