edfcore 0.5.70 → 0.5.72

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.70";
112
+ export declare const VERSION = "0.5.72";
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.70';
82
+ export const VERSION = '0.5.72';
83
83
  //# sourceMappingURL=constants.js.map
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,49 @@ 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.72
10
+
11
+ - **Added** the case none of the four caller-supplied callbacks documents: what happens when yours
12
+ throws. edfcore calls a `ByteSource.read`, an `onProgress` on each of the two traversals, and a
13
+ predicate on the two matching helpers. Three of the four say what they should RETURN and none of
14
+ the four says what a throw does — which is not exotic: a progress callback writes to a DOM node
15
+ that has been removed, a label predicate calls `toLowerCase` on a signal with no label.
16
+ - Two answers matter and they pull opposite ways. The error must arrive UNCHANGED — the same
17
+ object, not wrapped, not turned into a diagnostic — because wrapping it makes the caller's own bug
18
+ look like a problem with the file, and `isEdfError` has to say false for it. And the recording
19
+ must SURVIVE it: every one of these calls happens partway through something with state, and a
20
+ throw unwinds through all of it.
21
+ - `when-your-callback-throws.test.ts` checks both for the three that had nothing;
22
+ `source-contract.test.ts` already covers the source. After a callback throws mid-scan, the same
23
+ recording rebuilds to the same index, validates to the same verdict, and leaves the annotation
24
+ array it was given untouched — each compared against a recording that never saw a failure.
25
+ - One check is about the failure a memoised promise would produce: a second attempt has to reach
26
+ the callback again rather than a remembered rejection, or one bad progress callback breaks the
27
+ operation for the life of the recording. Wrapping the progress call in a `try`/`catch` that
28
+ swallows fails three of the nine.
29
+
30
+ ## 0.5.71
31
+
32
+ - **Added** the case every diagnostic test avoids: a file with more than one thing wrong with it.
33
+ Each code is demonstrated on a fixture broken in exactly one way, which is how you show which
34
+ defect produces which code — and real files are not like that. Defects come in families, because
35
+ they come from one mistaken program.
36
+ - The header parse is a single pass over shared state: one sink, a pinned check order, and checks
37
+ that read fields other checks have already judged. That is the shape in which one defect swallows
38
+ another — an early return on the first bad field, a check skipped because its input was already
39
+ reported unusable — and the file would still open with a report that looked complete.
40
+ - `a-second-defect-hides-nothing.test.ts` applies seven independent corruptions alone, then in all
41
+ twenty-one pairs, then in both orders, then all seven at once. Making the recording-identification
42
+ check skip itself once anything else has been reported fails six of them.
43
+ - Six of the seven are independent in the file. The seventh is not, and finding that out is half of
44
+ what this is worth: a reserved field that is not a recognised marker makes the file plain EDF, and
45
+ `parse.ts` passes `edfPlus: variant.isPlus` into both identification grammars — so on that file
46
+ they are not checked and their two codes correctly disappear. Not masking; the file no longer
47
+ deserves them. Worth pinning anyway, because the visible effect is that one wrong five-byte field
48
+ silently stops the patient and recording identification from being examined at all, and nothing
49
+ in the report says so. Fixing the reserved field alone brings both codes back, which is what makes
50
+ it the cause rather than an ordering coincidence.
51
+
9
52
  ## 0.5.70
10
53
 
11
54
  - **Added** the third thing a caller hands edfcore that edfcore does not own. The buffer is checked
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.5.70",
3
+ "version": "0.5.72",
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.70';
96
+ export const VERSION = '0.5.72';