edfcore 0.5.37 → 0.5.38

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.37";
112
+ export declare const VERSION = "0.5.38";
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.37';
82
+ export const VERSION = '0.5.38';
83
83
  //# sourceMappingURL=constants.js.map
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,31 @@ 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.38
10
+
11
+ - **Added** a sweep over every `…Ticks` edfcore publishes against the `…Seconds` beside it. The
12
+ package's central arithmetic decision is that time is a `bigint` count of 100 ns ticks and the
13
+ seconds are derived from it. Twenty field pairs in `types.ts` are written that way — on the
14
+ header, the timeline, a segment, a gap, a location, a chunk, a chunk signal, an envelope chunk, an
15
+ envelope signal and an annotation — each produced by different code, and one of them was checked.
16
+ `timebase.test.ts` asserts "an exact tick counterpart for every second on a chunk", on chunks.
17
+ - The other nine kinds were computed somewhere and never compared, and the failure they would
18
+ produce is the quiet kind: the two fields sit next to each other in an autocomplete list, a caller
19
+ picks whichever the surrounding code already uses, and a disagreement shows up as a plot drawn a
20
+ fraction of a second from where the arithmetic says it is.
21
+ - The pairs are now enumerated out of `types.ts` and every object every entry point returns is
22
+ walked, over the eight `AWKWARD` shapes plus a file with a gap and a file with an overlap: 270
23
+ pairs, compared with `Object.is` against `ticksToSeconds`. `toBeCloseTo` would pass on a pair that
24
+ had drifted by exactly the thing this arithmetic exists to prevent. Every enumerated field is
25
+ asserted to have been reached, so none is checked in absentia, and the visited set is asserted to
26
+ include a negative tick count and a hundred non-zero ones.
27
+ - `EdfAnnotation` is the pair that cannot be inferred from the names, and it is why the rule is
28
+ spelled out: its four onset fields are two axes, `onsetTicks` with `onsetSecondsFromHeaderStart`
29
+ and `onsetTicksFromFirstRecord` with `onsetSecondsFromFirstRecord`. Crossing them passes on every
30
+ file with no sub-second start offset, which is most of them — so the last block builds one that
31
+ has an offset and shows the crossed pairing failing by exactly that offset. That is the trap
32
+ `annotations.md` warns about, and it is what makes this pairing a rule rather than a coincidence.
33
+
9
34
  ## 0.5.37
10
35
 
11
36
  - **Added** the safety property for the CLI. `fuzz.test.ts` states it for the library — for any byte
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.5.37",
3
+ "version": "0.5.38",
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.37';
96
+ export const VERSION = '0.5.38';