edfcore 0.3.99 → 0.3.101

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.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,42 @@ 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.3.101
10
+
11
+ - **Fixed** an assertion in `tests/corpus/whole-api.test.ts` that compared a value with itself:
12
+ `expect(inspection.header.signals.length).toBe(inspection.header.signals.length)`. Both operands
13
+ are the same expression, so it held for every input.
14
+ - It was the only consistency check in the test the file's docblock calls "the strongest promise
15
+ in the package", under a comment reading "Whatever it reports must be internally consistent
16
+ rather than merely present". Across five corpus files it checked nothing.
17
+ - Replaced with invariants that can fail: the two index arrays partition the signals exactly once,
18
+ `headerByteLength` is the `256 * (ns + 1)` the signal count implies, `bytesRead` exceeds neither
19
+ the file nor the 128 KiB ceiling, and `ok` equals "no error-severity diagnostic" — the rule the
20
+ `inspectEdf` docblock states.
21
+ - Each new assertion was canaried by breaking the behaviour it names and confirming it fails.
22
+ Two earlier attempts were rejected: one could not distinguish anything on a clean corpus, and one
23
+ broke module loading instead of changing behaviour, which is not a canary.
24
+ - Defect shape (e), the one this project keeps re-learning: a guard that would still pass if what it
25
+ names regressed. It has now been the subject of 0.3.52, 0.3.78, 0.3.80, 0.3.90 and this release.
26
+
27
+ ## 0.3.100
28
+
29
+ - **Fixed** `diagnostics.md` recommending, as the alternative to a gate it warns against, a gate
30
+ that gives the same verdict.
31
+ - The callout says `summarizeDiagnostics(...).errors > 0` must not gate a read, because the
32
+ deferred group carries `error` severity while the file parses and decodes perfectly — one signal
33
+ has no `scale` and every other signal is fine. It then offered "the thrown `EdfError`, or
34
+ `validateRecording`'s `report.ok`".
35
+ - `report.ok` is `diagnostics.every((d) => d.severity !== 'error')` over a **superset** of
36
+ `header.diagnostics`, so it is false on exactly the files the callout is about. On a two-signal
37
+ file with one degenerate physical range: `errors > 0` is `true`, `report.ok` is `false`, and the
38
+ good signal reads all sixteen of its samples. A reader who followed the advice moved from one
39
+ gate to an identical one and still threw away the file.
40
+ - The callout now names the thrown `EdfError` alone as the read gate, and says what `report.ok`
41
+ actually answers — "did this pass a conformance sweep", a different and stricter question.
42
+ - The test builds that file and asserts the two gates AGREE, which is the fact that made the
43
+ recommendation wrong, then checks the retired sentence is gone.
44
+
9
45
  ## 0.3.99
10
46
 
11
47
  - **Fixed** the CLI usage banner scoping `--patient` to "(header, json)". `redaction(args)` is
@@ -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.3.99";
112
+ export declare const VERSION = "0.3.101";
113
113
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,+EAA+E;AAC/E,eAAO,MAAM,sBAAsB,EAAG,GAAY,CAAC;AAEnD,gFAAgF;AAChF,eAAO,MAAM,uBAAuB,EAAG,GAAY,CAAC;AAEpD,gGAAgG;AAChG,eAAO,MAAM,qBAAqB,EAAG,iBAA0B,CAAC;AAChE,eAAO,MAAM,qBAAqB,EAAG,iBAA0B,CAAC;AAEhE,uFAAuF;AACvF,eAAO,MAAM,gCAAgC,EAAG,KAAc,CAAC;AAE/D;;;GAGG;AACH,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAE1C,+BAA+B;AAC/B,eAAO,MAAM,eAAe,EAAG,CAAC,KAAc,CAAC;AAC/C,eAAO,MAAM,eAAe,EAAG,KAAc,CAAC;AAE9C,0DAA0D;AAC1D,eAAO,MAAM,eAAe,EAAG,CAAC,OAAgB,CAAC;AACjD,eAAO,MAAM,eAAe,EAAG,OAAgB,CAAC;AAEhD,mEAAmE;AACnE,eA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AAa,CAAC;AAElD,0FAA0F;AAC1F,eAAO,MAAM,6BAA6B,EAAE,MAA0B,CAAC;AAEvE;6FAC6F;AAC7F,eAAO,MAAM,4BAA4B,EAAG,EAAa,CAAC;AAC1D,eAAO,MAAM,oBAAoB,EAAG,EAAa,CAAC;AAClD,eAAO,MAAM,cAAc,EAAG,CAAa,CAAC;AAE5C,yEAAyE;AACzE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWhB,CAAC;AAEX;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;CAWtB,CAAC;AAEX,+FAA+F;AAC/F,eAAO,MAAM,0BAA0B;;;;;;;;;;;CAW7B,CAAC;AAEX,2EAA2E;AAC3E,eAAO,MAAM,OAAO,YAAY,CAAC"}
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.3.99';
82
+ export const VERSION = '0.3.101';
83
83
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,+EAA+E;AAC/E,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAY,CAAC;AAEnD,gFAAgF;AAChF,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAY,CAAC;AAEpD,gGAAgG;AAChG,MAAM,CAAC,MAAM,qBAAqB,GAAG,iBAA0B,CAAC;AAChE,MAAM,CAAC,MAAM,qBAAqB,GAAG,iBAA0B,CAAC;AAEhE,uFAAuF;AACvF,MAAM,CAAC,MAAM,gCAAgC,GAAG,KAAc,CAAC;AAE/D;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAE1C,+BAA+B;AAC/B,MAAM,CAAC,MAA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EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE;IAC1C,WAAW,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE;CAC/B,CAAC;AAEX;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,KAAK,EAAE,EAAE;IACT,cAAc,EAAE,EAAE;IAClB,iBAAiB,EAAE,CAAC;IACpB,eAAe,EAAE,CAAC;IAClB,eAAe,EAAE,CAAC;IAClB,cAAc,EAAE,CAAC;IACjB,cAAc,EAAE,CAAC;IACjB,YAAY,EAAE,EAAE;IAChB,gBAAgB,EAAE,CAAC;IACnB,QAAQ,EAAE,EAAE;CACJ,CAAC;AAEX,+FAA+F;AAC/F,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,KAAK,EAAE,CAAC;IACR,cAAc,EAAE,EAAE;IAClB,iBAAiB,EAAE,EAAE;IACrB,eAAe,EAAE,GAAG;IACpB,eAAe,EAAE,GAAG;IACpB,cAAc,EAAE,GAAG;IACnB,cAAc,EAAE,GAAG;IACnB,YAAY,EAAE,GAAG;IACjB,gBAAgB,EAAE,GAAG;IACrB,QAAQ,EAAE,GAAG;CACL,CAAC;AAEX,2EAA2E;AAC3E,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.3.99",
3
+ "version": "0.3.101",
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.3.99';
96
+ export const VERSION = '0.3.101';