edfcore 0.5.22 → 0.5.24

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.22";
112
+ export declare const VERSION = "0.5.24";
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.22';
82
+ export const VERSION = '0.5.24';
83
83
  //# sourceMappingURL=constants.js.map
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,53 @@ 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.24
10
+
11
+ - **Added** "the whole flow" at the end of `discontinuous.md`, run, and the diagram at the top of it.
12
+ That page opens with an ASCII timeline of one file and closes with a four-step program over the
13
+ same file printing six lines. `discontinuous-page.test.ts` covers the objects in between — the
14
+ `index.segments` and `index.gaps` blocks, and `locate(13.5)`. Both ends of it were prose.
15
+ - The diagram is the page's premise: six one-second records, a ten-second hole after record 2, and a
16
+ row of byte offsets — 768, 1400, 2032, 2664, 3296, 3928 — which is "they are still stored back to
17
+ back on disk" written as numbers. A reader takes those to a hex editor. Both rows are now read out
18
+ of the diagram and checked, and the same offsets appear again in the four-read block under
19
+ "openEdf never scans", where they are the ranges the open actually issues.
20
+ - Three of the program's six lines come from `console.log` inside loops the page writes itself, so
21
+ they are composed here by the same expressions and compared against the page's text.
22
+ `256 samples from 2 s` and `256 samples from 13 s` are the ones worth having: that is
23
+ `trimToWindow` applied to a window spanning a gap, and the second is the whole point of the page —
24
+ a reader trusting the nominal grid would expect the second chunk to start at 4 s.
25
+ - `index.locate(5)` goes with them. It returns `undefined` for an instant inside the hole, which is
26
+ the answer the page prints and the one a caller has to handle: there is no sample there, and no
27
+ index can invent one. Step 1 is checked to reach its verdict without issuing a read, which is what
28
+ "no extra I/O" in its own comment claims.
29
+
30
+ ## 0.5.23
31
+
32
+ - **Added** the conformance report `validation.md` prints, printed. That page ends with a whole
33
+ program and the output it produces on one file: a header line, a summary line, two diagnostic
34
+ blocks, and two per-signal stat lines. `validate-page.test.ts` covers the code table higher up and
35
+ `validation-report.test.ts` the `report.ok` rule; the transcript — the thing a reader compares
36
+ their own terminal against — was prose.
37
+ - The stat lines are the reason it is worth running. They are not printed by edfcore at all: the
38
+ page composes them from `report.signalStats`, `getSignal` and arithmetic of its own, and the
39
+ paragraph under them is an argument built on the result. "The first channel uses half a percent of
40
+ the range its header declares, which is legal and lossy." "81,806 of its 153,600 samples fall
41
+ outside the range the header declares, so that declaration is wrong." A change to
42
+ `observedDigitalMin`, `outOfDigitalRangeCount` or `sampleCount` would leave the page arguing from
43
+ figures the library no longer produces.
44
+ - The snippet is now run rather than restated: the stat lines are built by the same expression the
45
+ page shows and compared against the page's own text character for character, along with the
46
+ summary line's `no errors, 4 diagnostics, 600 records and 650400 bytes read`.
47
+ - The fixture is built to the page's description and its geometry falls out of the transcript —
48
+ 600 one-second records at 650,400 bytes is 1,084 a record, which is two 256-sample channels and a
49
+ 30-sample annotation region, and 153,600 samples is 600 x 256. The one number that cannot be
50
+ derived is how many fall outside; that is read off the page and built into the sample generator,
51
+ which is what makes the count an assertion about the counter rather than about the waveform.
52
+ - The last sentence of the paragraph is checked too. "Any consumer that clamps to it returns
53
+ different numbers for this file than edfcore does" — a read returns the bytes as written, at
54
+ -150..150 outside the declared -100..100, and `clampToDigitalRange` returns something else.
55
+
9
56
  ## 0.5.22
10
57
 
11
58
  - **Added** the scrolling table on `large-files.md`, measured. `large-files-cost.test.ts` runs the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.5.22",
3
+ "version": "0.5.24",
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.22';
96
+ export const VERSION = '0.5.24';