edfcore 0.5.25 → 0.5.27

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.25";
112
+ export declare const VERSION = "0.5.27";
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.25';
82
+ export const VERSION = '0.5.27';
83
83
  //# sourceMappingURL=constants.js.map
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,52 @@ 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.27
10
+
11
+ - **Added** a non-finite bound driven through every entry point that takes a time in seconds.
12
+ `secondsToTicks` is the one place a caller's seconds become the integers everything else works in,
13
+ and it refuses a non-finite one; `ticks.test.ts` covers that, once, on the resolver.
14
+ - The resolver is not the guarantee. The guarantee is that a `NaN` cannot get past it, and `NaN`
15
+ reaches a time bound the way it reaches a byte budget: `Number(searchParams.get('t'))`, a slider
16
+ whose value has not been set, an absent key in a saved view. What makes it worth a sweep is what
17
+ happens if one entry point misses. `NaN` compares false against everything, so a window bound that
18
+ skipped the resolver would not throw — it would return `[]`, which is the legitimate answer for a
19
+ window past the end of a recording and indistinguishable from one. That contrast is asserted
20
+ rather than described.
21
+ - The entry points are enumerated out of `src/` the way `nan-budget-reaches.test.ts` enumerates the
22
+ budget's: sixteen exported functions declare one of `seconds`, `startSeconds`, `durationSeconds`
23
+ or `secondsPerBucket`, directly or through a selection type whose `extends` chain is followed.
24
+ Two of the sixteen take a `startSeconds` edfcore itself produced — `envelopeOfSamples` and
25
+ `toPhysicalEnvelope`, on an `EdfChunkSignal` and an `EdfEnvelopeSignal` — and that is stated
26
+ rather than filtered out silently.
27
+ - Each of the remaining thirteen, plus `index.locate`, is driven with `NaN`, `Infinity` and
28
+ `-Infinity`, and each must throw a plain `RangeError` — `isEdfError` false, since a bad bound is a
29
+ caller's mistake and never a file's — whose message names the value it was given and ends with a
30
+ `Next:` clause.
31
+
32
+ ## 0.5.26
33
+
34
+ - **Added** the two sentences that promise nothing changes when you run it again. `validation.md`:
35
+ "It does not modify the recording, the header or the source. `validateRecording` reads and
36
+ returns; call it twice and you get the same report." `diagnostics.md`: the formatter output "is
37
+ deterministic ... so it's safe to snapshot in a test." Both are properties of every read in the
38
+ package rather than of one call, and neither had a test — nothing in the suite called anything
39
+ twice and compared, and nothing checked that a read leaves the header it was given alone.
40
+ - They are easy properties to lose and hard to notice losing. A parse that memoises a derived value
41
+ onto the header it returns, a formatter that sorts its input in place, a scan that fills in
42
+ `segments` on the index it was handed: each is a reasonable-looking optimisation, each makes the
43
+ second call disagree with the first, and none fails anything until a caller compares two runs. The
44
+ failure then looks like a file that changed.
45
+ - So both are swept over the whole shape matrix rather than asserted on one fixture. For each of the
46
+ eight `AWKWARD` files — a zero record duration, no data signal at all, duplicate labels, a signal
47
+ with no usable scale — every read and every formatter runs twice and the results are compared; the
48
+ source's bytes are compared before and after; and the header, timeline and index are compared
49
+ through a walk that handles the `bigint`s and typed arrays `JSON.stringify` refuses.
50
+ - The stronger form goes with it: a second recording opened over a copy of the same bytes must agree
51
+ with the first, so the output is a function of the file rather than merely stable per object. And
52
+ the probed index stays probed — `buildRecordIndex` returns a new one rather than filling in the
53
+ one it was handed.
54
+
9
55
  ## 0.5.25
10
56
 
11
57
  - **Added** the three option tables on `api-helpers.md` and the defaults they promise. Seven fields
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.5.25",
3
+ "version": "0.5.27",
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.25';
96
+ export const VERSION = '0.5.27';