edfcore 0.5.14 → 0.5.15

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.14";
112
+ export declare const VERSION = "0.5.15";
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.14';
82
+ export const VERSION = '0.5.15';
83
83
  //# sourceMappingURL=constants.js.map
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,28 @@ 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.15
10
+
11
+ - **Added** direct tests for `floorDiv` and `ceilDiv`, which had none. `tal/ticks.ts` owns them, and
12
+ `ticks.test.ts` — the file named for that module — covers the onset parsers and the tick
13
+ conversions and neither of these. Five modules import them: `envelope.ts`, `biosemi.ts`,
14
+ `format-annotations.ts`, `sample-locate.ts` and `time/window.ts`. Every assertion they had was
15
+ incidental, made through a caller that happens to divide.
16
+ - The whole content of both functions is the negative side. Bigint `/` truncates toward zero, so on
17
+ a negative numerator it is neither floor nor ceiling. Both are now checked against `Math.floor`
18
+ and `Math.ceil` over a grid crossing zero — 85 cells, small enough that float division is an exact
19
+ oracle — with `ceilDiv(a, b) === -floorDiv(-a, b)` asserted across it so the pair cannot drift
20
+ apart. The operator is then shown to disagree on every negative non-multiple **and only there**,
21
+ which is what stops the grid from proving nothing.
22
+ - The docblock's reason for their living in `ticks.ts` — "three modules had grown their own copies
23
+ of the same four lines" — is enumerated out of `src/`: exactly one module declares them, five
24
+ call them, and each of the five imports them rather than redeclaring.
25
+ - The last block pins the operand that makes this ordinary rather than an edge case. `trimToWindow`
26
+ selects sample `j` through `floorDiv((R - 1) * S, D) + 1`, and a window beginning at its own
27
+ chunk's start makes `R` zero — so the numerator is `-S`, negative for every file, with no unusual
28
+ geometry and nothing pre-stimulus about it. Truncation there returns `1` where the floor returns
29
+ `0`, and the window loses the first sample the caller aligned it to.
30
+
9
31
  ## 0.5.14
10
32
 
11
33
  - **Added** the CLI's default print cap driven at all four places it is applied.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.5.14",
3
+ "version": "0.5.15",
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.14';
96
+ export const VERSION = '0.5.15';