edfcore 0.5.0 → 0.5.2

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.0";
112
+ export declare const VERSION = "0.5.2";
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.0';
82
+ export const VERSION = '0.5.2';
83
83
  //# sourceMappingURL=constants.js.map
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,47 @@ 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.2
10
+
11
+ - **Added** the map of how far `strict` reaches on a read, which has three cells rather than the
12
+ two a reader assumes. `openEdf` probes exactly two records for their timekeeping onsets, so a
13
+ malformed TAL in record 0 or the last record throws under `strict` and one in a middle record
14
+ does not — the file opens, and every sample reads back either way.
15
+ - The middle cell is not a defect. A probed index has read two records, so `strict` can only reject
16
+ what it saw; rejecting a file for a defect nobody looked for would be a claim the probe cannot
17
+ make, and `validateRecording` is the call that reads every record. It is written down because
18
+ "strict rejects a file with any defect" is what a reader assumes, and it is wrong in a way no
19
+ error message will correct.
20
+ - The reason a read is never strict is checked as the structural fact it is rather than as
21
+ carefulness: `ReadOptions` declares no `strict` member, so a read cannot be asked for it even by
22
+ a caller who wants it. `recording.ts` says exactly that at the call site — "not because the flag
23
+ was lost" — and a member added later would compile, be ignored, and leave `api-reading.md`
24
+ describing an option that exists.
25
+ - In all three cells the samples come back and `TAL_MALFORMED` lands on `chunk.diagnostics` naming
26
+ the record it was found in. That is what the read path exists to protect: a malformed TAL in the
27
+ annotations channel is not a reason to return no EEG.
28
+
29
+ ## 0.5.1
30
+
31
+ - **Added** the `out` contract as one check over every primitive that takes one.
32
+ `api-primitives.md` writes it once and refers back to it — "`out` behaves exactly as in
33
+ `decodeDigital`: reused when long enough, narrowed with `subarray` when longer, a plain
34
+ `RangeError` when shorter" — and `envelope.ts` restates it in its own words. Each of the four was
35
+ tested on its own; that the four agree was not.
36
+ - `out` exists for the render loop, where a viewer redraws on every pan and zoom, so the caller
37
+ holds the buffer across frames and reads it after the call. Each rule fails silently without
38
+ that: a function that allocated its own array would work perfectly and leave a caller reading
39
+ last frame's numbers; one that returned the whole buffer instead of a narrowed view would append
40
+ stale values from the previous, longer frame; one that filled a short array part-way would draw a
41
+ frame half from this window and half from the last. All three are checked by identity of the
42
+ underlying buffer rather than by contents.
43
+ - The refusal is asserted to be a plain `RangeError` with `isEdfError` false, on all four. A
44
+ wrong-sized array the caller allocated is a bug in the calling code, not a problem with the file,
45
+ and that is the kind of distinction a later refactor tidies into the error hierarchy one function
46
+ at a time.
47
+ - The four are enumerated from `src/` rather than listed, so a fifth primitive that takes an `out`
48
+ fails this file until it joins it.
49
+
9
50
  ## 0.5.0
10
51
 
11
52
  The public API is unchanged: nothing was added, removed or renamed, and no arithmetic moved. This
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
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.0';
96
+ export const VERSION = '0.5.2';