edfcore 0.5.16 → 0.5.18

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.16";
112
+ export declare const VERSION = "0.5.18";
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.16';
82
+ export const VERSION = '0.5.18';
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.18
10
+
11
+ - **Added** the unscalable signal `diagnostics.md` walks through, run from the throw to the read.
12
+ That page uses one file for three separate arguments and prints values for all three — the
13
+ `strict` transcript, the callout headed "`errors > 0` does not mean the file failed to read", and
14
+ the `EdfScalingError` block at the bottom. They are the same signal seen from three angles, and
15
+ none of the three was run.
16
+ - The `strict` transcript is four fields off a thrown error and a fifth off the diagnostic inside
17
+ it: `DEGENERATE_DIGITAL_RANGE digitalMinimum 504 1`, then `EDF+ additional specification 5`. The
18
+ `504` is the sharpest of them — the byte at which signal 1's `digitalMinimum` field starts in a
19
+ two-signal file, `256 + 2 x 120 + 8`, and the number a reader would take to a hex editor. It is
20
+ now asserted against that arithmetic as well as against the page. `error-fields.test.ts` checks
21
+ the fields exist and `spec-references.test.ts` that every diagnostic cites something; neither was
22
+ pointed at this file.
23
+ - "The error carries the whole `diagnostic` it would otherwise have recorded, so nothing is lost by
24
+ throwing" is checked by comparing what the strict throw carries against what the non-strict parse
25
+ of the same bytes collected.
26
+ - The callout is the part worth having pinned. It says `errors > 0` **and** `report.ok === false`
27
+ are both true of a file that reads perfectly, and tells the reader to gate on the thrown
28
+ `EdfError` instead — three values agreeing on one file, asserted in prose. All three are now read
29
+ off that file, alongside the other signal converting to eight finite microvolt values.
30
+
31
+ ## 0.5.17
32
+
33
+ - **Added** the record onsets that quietly stop being true when a read is narrowed to a secondary
34
+ annotations signal. EDF+ permits several and reserves timekeeping to the first;
35
+ `annotations.md` documents the consequence in a sentence that reads like a footnote: "Leaving out
36
+ the file's first annotations signal means no timekeeping TAL is read at all. Every entry of
37
+ `result.recordOnsetTicks` then falls back to the nominal grid, and no diagnostic is emitted for
38
+ it."
39
+ - On an EDF+D file that is the difference between the truth and a fiction. The same page calls
40
+ `recordOnsetTicks` "the primitive every timeline in edfcore is built from", and
41
+ `{ signalIndices: [2] }` — a narrowing a caller reaches for to make a read cheaper, or because the
42
+ events they want are on the second channel — turns it into `recordIndex * recordDuration` for a
43
+ file whose records are nowhere near that. The fixture has a five-second hole after record 1, so
44
+ the true onsets are 0, 1, 7, 8 s and the narrowed read returns 0, 1, 2, 3 s.
45
+ - Nothing throws and nothing is logged: `diagnostics` is empty in both readings, the array has the
46
+ right length and the right type, and the events of the second signal come back byte-identical to
47
+ the ones a full read returns. Only the onsets are wrong, which is why this is worth a test rather
48
+ than a sentence. The page's remedy — read them all — is asserted to recover them.
49
+ - The two refusals the same option reaches are checked with it: a plain `RangeError` for a data
50
+ signal, compared word for word against the transcript the page prints, and
51
+ `EdfChannelNotFoundError` carrying `selector` and `availableLabels` for an index the file does not
52
+ have. `isEdfError` tells them apart, which is the distinction the page draws — parsing samples as
53
+ text is a caller's mistake and never a file's.
54
+
9
55
  ## 0.5.16
10
56
 
11
57
  - **Added** the last program on `annotations.md`, run. That page ends with the conversion it exists
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.5.16",
3
+ "version": "0.5.18",
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.16';
96
+ export const VERSION = '0.5.18';