edfcore 0.5.68 → 0.5.70

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.68";
112
+ export declare const VERSION = "0.5.70";
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.68';
82
+ export const VERSION = '0.5.70';
83
83
  //# sourceMappingURL=constants.js.map
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,48 @@ 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.70
10
+
11
+ - **Added** the third thing a caller hands edfcore that edfcore does not own. The buffer is checked
12
+ twice over now — what comes back pointing at it (0.5.63) and what gets written into it (0.5.64).
13
+ The ARGUMENTS were not checked at all, and they are the ones most likely to be reused: a
14
+ `signalIndices` array built once and passed to every read in a loop, an options object shared
15
+ across a session, a `RecordRange` walked forward by a scheduler.
16
+ - A function that sorted `signalIndices` in place, normalised `records.start`, or wrote a default
17
+ into the options object it was handed would work perfectly and change the caller's NEXT call.
18
+ That is a defect with no failing test anywhere near it.
19
+ - `Object.freeze` makes it checkable without inspecting anything. Every module here is an ES module
20
+ and therefore strict, so a write to a frozen argument throws rather than being ignored: freeze
21
+ the arguments, make the call, and a call that resolves has proved it wrote to none of them. All
22
+ 24 resolve.
23
+ - The list is derived, not written down. Every exported function in `src/` whose parameters mention
24
+ `Options`, `Selection` or `RecordRange` must appear in the table or in `EXEMPT` with a reason,
25
+ and the exemptions are checked back against the source so one for a function that no longer takes
26
+ such an argument fails too. Adding an export with a `ReadOptions` parameter fails this file until
27
+ it is accounted for.
28
+ - A last check is about retention rather than mutation: emptying a `signalIndices` array after the
29
+ read changes nothing about the chunk already returned, and the next call reads the array as it is
30
+ then — not from anything held over.
31
+
32
+ ## 0.5.69
33
+
34
+ - **Added** the comparison the two `onProgress` declarations never got. `types.ts` declares the
35
+ same callback twice, on `BuildIndexOptions` and on `ValidateOptions`, and two consumers implement
36
+ it. Each had its own tests; the pair had none — which is the shape this project keeps meeting,
37
+ and the reason 0.5.67 and 0.5.68 exist.
38
+ - The contract is not written down in one place either. `scanOnsets` states the half that matters,
39
+ in a comment about the case where it has nothing to read: report once, "so a caller's bar
40
+ finishes". The rest follows from being a bar, and `progress-means-one-thing.test.ts` asks all six
41
+ questions of both consumers over every shape in the matrix: that it reports at all, that `total`
42
+ is the record count on every call so a percentage has a fixed divisor, that `done` never goes
43
+ backwards, that it stays inside its total, that the last call says finished, and that nothing
44
+ arrives after the promise resolved.
45
+ - Reverting either fix from this week fails it: seven cases without the validation call, and the
46
+ empty-file case without the index one. A last check has the two agree on the same file, since one
47
+ option answered by two calls that finish at different numbers is the defect stated directly.
48
+ - The consumers are found by scanning `src/` for the call rather than listed, so a third fails this
49
+ file until it joins it.
50
+
9
51
  ## 0.5.68
10
52
 
11
53
  - **Fixed** `validateRecording` never calling `onProgress` for the two sweeps that read nothing:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.5.68",
3
+ "version": "0.5.70",
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.68';
96
+ export const VERSION = '0.5.70';