edfcore 0.4.512 → 0.4.515

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.4.512";
112
+ export declare const VERSION = "0.4.515";
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.4.512';
82
+ export const VERSION = '0.4.515';
83
83
  //# sourceMappingURL=constants.js.map
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,65 @@ 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.4.515
10
+
11
+ - **Added** the thirteen pairs behind one sentence on `cli.md`: "Each is accepted and ignored by
12
+ the commands it does not name." It is the only claim on the page about pairs rather than about a
13
+ command, it is what lets a wrapper pass one fixed flag set to every command instead of branching,
14
+ and nothing checked it.
15
+ - The two halves rot differently. "Accepted" fails loudly — `parseArgs` refuses an unknown flag, so
16
+ a flag dropped from the parser exits 2. "Ignored" fails silently, and in the worst direction:
17
+ `--patient` gates identification, so a flag that started reaching `events`, `signals` or `gaps`
18
+ would print the identification a caller passed it to withhold. Each pair now runs the command
19
+ twice and compares the bytes, having first asserted the command printed something — two empty
20
+ outputs are equal.
21
+ - The last clause is the same test in the same shape: the counted `events` listing is never capped,
22
+ so `--limit 1` must return it unchanged, while `events --list --limit 1` must not. A cap on a
23
+ census truncates it into something that reads as complete.
24
+ - Which commands each flag names is read out of the page's own "Flags:" paragraph, not written in
25
+ the test, so a flag that gains or loses a command in the prose changes what is checked. The
26
+ paragraph needs splitting at each flag to read: only two of the three carry a parenthesised list,
27
+ and one pattern across the whole paragraph reads the third one's list as the second one's.
28
+
29
+ ## 0.4.514
30
+
31
+ - **Added** a check of what is in the six columns `edfcore signals` prints. `cli.md` tabulates them
32
+ by name and position and ends the sixth row with the instruction the command exists for — "the
33
+ authoritative count; index by this, never by the rate" — and the only test was that there are six
34
+ columns and one line per signal, which six columns of anything satisfy.
35
+ - That is the defect the page records against itself. Until 0.2.42 it described a column list the
36
+ command did not emit: samples per record where the command printed `kind`, and the authoritative
37
+ field in no column at all. A count of six would not have caught it then either. The order is now
38
+ read out of the page's table rather than written in the test, so the two cannot drift apart.
39
+ - The fixture gives its two data signals different sample counts and different units, so 4 Hz, 1.5
40
+ Hz, 8 and 3 are all distinct — no pair of columns can be swapped and still match.
41
+ - The three qualified rows are checked as qualified. `sampleRateHz` is empty on a legal zero record
42
+ duration, where `undefined`, `0` and `NaN` would each be a number a script divides by. `label`
43
+ and `physicalDimension` are both called trimmed, and are trimmed by different things: the parser
44
+ strips EDF padding from both, the command adds `String.trim` to the dimension — which reaches a
45
+ tab — and passes the label through `printable`, which turns a tab into `.`. Removing either
46
+ fails now; before this, removing the first put a tab in the dimension and removing the second put
47
+ a seventh column in the row, handing `cut -f6` a unit where it expected a sample count.
48
+
49
+ ## 0.4.513
50
+
51
+ - **Added** a bounds check on the evidence a diagnostic points at: the byte range is inside the
52
+ file, the signal index names a signal, and the record index is inside the records that were
53
+ read. 0.4.510 checks that `raw` matches the bytes at the offset, which settles the offset for
54
+ every diagnostic carrying text to compare. `PARTIAL_FINAL_RECORD` and `TRAILING_BYTES` carry
55
+ none — they point at samples, and quoting samples as text says nothing — so nothing reached
56
+ their offsets at all beyond three hand-picked sizes.
57
+ - An offset past the end of the file is not a crash. `subarray` clamps, so an evidence block
58
+ renders short or empty and the reader concludes the bytes were empty. Both codes are now checked
59
+ across a range of truncations and appends, including one byte and one byte short of a whole
60
+ record, and both are asserted to end exactly at the end of the file — which is what "the rest of
61
+ the file after the last whole record" means.
62
+ - The TAL side is read from record 2 rather than record 0. A TAL diagnostic reports
63
+ `records.start + position` while its buffer offset uses `position` alone, and on a read starting
64
+ at record 0 those are the same number — which is what almost every fixture does, so the one
65
+ arithmetic that can confuse a file position with a buffer position was exercised only where the
66
+ two agree.
67
+
9
68
  ## 0.4.512
10
69
 
11
70
  - **Added** a read behind each of the four header-recovery diagnostics. When the header's numbers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.4.512",
3
+ "version": "0.4.515",
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.4.512';
96
+ export const VERSION = '0.4.515';