edfcore 0.5.51 → 0.5.53

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.51";
112
+ export declare const VERSION = "0.5.53";
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.51';
82
+ export const VERSION = '0.5.53';
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.53
10
+
11
+ - **Added** the CLI's half of determinism. `diagnostics.md` says of the formatter underneath it that
12
+ "the output is deterministic (no locale-sensitive formatting, no ANSI escapes unless you ask), so
13
+ it's safe to snapshot in a test", and 0.5.26 checked that for the library. The CLI is a second
14
+ surface over those formatters, with joins, sorts, caps and column padding of its own, and the
15
+ claim that matters for it is the one a script depends on: run it twice on the same bytes and you
16
+ get the same bytes back.
17
+ - That is what `edfcore signals big.edf | sort | diff -` is built on and what makes `edfcore json`
18
+ usable in a build. It is easy to lose in ways no single-run test would see — a `Map` iterated
19
+ where a `Set` was meant, a sort that is not total, a count formatted from a float — and each
20
+ produces output that is right most of the time.
21
+ - Every command now runs twice over every shape in the matrix: sixty pairs over ten files, with the
22
+ exit code and the full text of both streams compared. The stronger form runs too — a second
23
+ recording opened over a copy of the bytes gives the same output, so it is a function of the file
24
+ rather than stable per process. And the totals are asserted, so sixty pairs of empty strings could
25
+ not pass.
26
+
27
+ ## 0.5.52
28
+
29
+ - **Added** the sweep for a selection that came from JSON. `io/read.ts` says why this is not a
30
+ type-system question: "`records` is typed, and the type is not the only way in: a selection built
31
+ from JSON, from a config file or from a JavaScript call site arrives at run time." It then records
32
+ what used to happen — every wrong shape reached a refusal with a next step, "while `undefined` and
33
+ `null` threw `TypeError: Cannot read properties of undefined (reading 'start')` ... which names
34
+ neither the option nor anything to do about it" (fixed in 0.4.443).
35
+ - That is a whole class and it had one test. A saved view, a URL parameter, a job on a queue: all of
36
+ them arrive as `JSON.parse` output, where a number written as a string stays a string and an
37
+ omitted field is simply absent. `record-range-contract.test.ts` covers ranges that are well formed
38
+ and out of bounds; this covers ranges that are not ranges.
39
+ - Nine malformed `records` shapes — absent, null, empty, half-filled, an array, a string,
40
+ string-valued fields, a null field — are each refused at all three entry points with an
41
+ `EdfRangeError` carrying the same next step, and absent and null are asserted not to raise the
42
+ `TypeError` they once did. A valid range survives a JSON round-trip, extra properties and all.
43
+ - Four malformed `signalIndices` shapes are a plain `RangeError`, since a selection that is not an
44
+ array is a caller's mistake and not a file's.
45
+ - One shape is accepted, and it is named rather than left to be discovered: an array holding the
46
+ canonical decimal string for an index — `['0']`, which is what `JSON.parse('["0"]')` from a query
47
+ string gives — resolves to that signal. It is ordinary array-index coercion and it is tight:
48
+ `'00'`, `' 0'`, `'0.0'`, `'+0'` and a label are each an `EdfChannelNotFoundError` naming the
49
+ selector verbatim, and the chunk reports `signalIndex` as a number, so nothing downstream carries
50
+ the string.
51
+
9
52
  ## 0.5.51
10
53
 
11
54
  - **Added** the promise `annotations.md` makes about partial reads, and the thing it costs.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.5.51",
3
+ "version": "0.5.53",
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.51';
96
+ export const VERSION = '0.5.53';