edfcore 0.5.0 → 0.5.1

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.1";
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.1';
83
83
  //# sourceMappingURL=constants.js.map
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,27 @@ 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.1
10
+
11
+ - **Added** the `out` contract as one check over every primitive that takes one.
12
+ `api-primitives.md` writes it once and refers back to it — "`out` behaves exactly as in
13
+ `decodeDigital`: reused when long enough, narrowed with `subarray` when longer, a plain
14
+ `RangeError` when shorter" — and `envelope.ts` restates it in its own words. Each of the four was
15
+ tested on its own; that the four agree was not.
16
+ - `out` exists for the render loop, where a viewer redraws on every pan and zoom, so the caller
17
+ holds the buffer across frames and reads it after the call. Each rule fails silently without
18
+ that: a function that allocated its own array would work perfectly and leave a caller reading
19
+ last frame's numbers; one that returned the whole buffer instead of a narrowed view would append
20
+ stale values from the previous, longer frame; one that filled a short array part-way would draw a
21
+ frame half from this window and half from the last. All three are checked by identity of the
22
+ underlying buffer rather than by contents.
23
+ - The refusal is asserted to be a plain `RangeError` with `isEdfError` false, on all four. A
24
+ wrong-sized array the caller allocated is a bug in the calling code, not a problem with the file,
25
+ and that is the kind of distinction a later refactor tidies into the error hierarchy one function
26
+ at a time.
27
+ - The four are enumerated from `src/` rather than listed, so a fifth primitive that takes an `out`
28
+ fails this file until it joins it.
29
+
9
30
  ## 0.5.0
10
31
 
11
32
  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.1",
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.1';