edfcore 0.5.48 → 0.5.50

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.48";
112
+ export declare const VERSION = "0.5.50";
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.48';
82
+ export const VERSION = '0.5.50';
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.50
10
+
11
+ - **Added** three ways a header can be written and mean the same thing. Each is documented, each is
12
+ reached by real writers, and each was tested for the thing it produces rather than for the
13
+ equivalence it implies.
14
+ - **A record count of `-1`.** `types.ts` says of the field: "Verbatim. `-1` means the writer never
15
+ closed the file." `parseHeader` recovers the count from the source's length and says so with
16
+ `RECORD_COUNT_RECOVERED` and `recordCountSource: 'sourceByteLength'`. `parse.test.ts` checks the
17
+ recovery; nothing checked that the recovered file is the same recording as one that declares its
18
+ count — which is the only reason recovering beats refusing.
19
+ - **Either family's annotation label.** `annotations.md`: "edfcore accepts either label in either
20
+ family, because the label names the channel's *role*." `isAnnotationLabel` is tested on the
21
+ strings; whether a BDF+ file whose channel says `EDF Annotations` reads its events was not. Both
22
+ crossings now do, with the same events, the same record onsets and the same data indices — and the
23
+ label reported verbatim, which is the one thing that differs.
24
+ - **NUL padding.** EDF pads with spaces; real writers pad with NUL, which is why `trimEdfField`
25
+ exists and why five docblocks in `src/` warn that `String.prototype.trim` does not strip it. The
26
+ function is tested. That the two paddings give the same header, with no diagnostic between them,
27
+ was not — and the test asserts that `.trim()` on the raw field really would have got it wrong, so
28
+ the equivalence is not a coincidence of the fixture.
29
+ - Each is asserted as a whole-recording equivalence — every sample, every event, every derived
30
+ number — with the one legitimately differing field named beside it.
31
+
32
+ ## 0.5.49
33
+
34
+ - **Added** the two things about an EDF+ annotations channel that are decisions of the writer rather
35
+ than facts about the recording: how wide the channel is declared, and which record a given TAL was
36
+ put in. `annotations.md` says the second in as many words — "`recordIndex` is where the event was
37
+ *stored*, which is not necessarily the record its onset falls in. Writers usually put an event in
38
+ the record covering it, but nothing in the format requires that" — and says the first by
39
+ implication: `samplesPerRecord` on that channel is what buys the writer room for text.
40
+ - Neither was tested as a transformation. `tal/annotations.test.ts` reads events out of fixtures and
41
+ `annotations-page.test.ts` runs the page's file; both hold the layout fixed.
42
+ - The same event is now written three ways — into record 0, into record 3 where its onset falls, and
43
+ into record 5, after it — and the resulting annotation must differ in exactly two fields:
44
+ `recordIndex`, which is the provenance the page tells you to use it for, and `byteOffsetInRecord`.
45
+ Onset, duration, text, channel, both axes and both exact tick counts are identical, and so is
46
+ every entry of `recordOnsetTicks` — a timekeeping TAL is not moved by where an ordinary one sits.
47
+ - Then the width: the same events in a 20-sample region and in a 120-sample one, which is a record
48
+ 200 bytes longer with every data offset moved, produce the same event list, the same record onsets
49
+ and the same samples.
50
+
9
51
  ## 0.5.48
10
52
 
11
53
  - **Added** two shapes to the `AWKWARD` matrix: a file with no records at all, and a file with
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.5.48",
3
+ "version": "0.5.50",
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.48';
96
+ export const VERSION = '0.5.50';