edfcore 0.3.81 → 0.3.82

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.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,22 @@ 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.3.82
10
+
11
+ - **Corrected** the `time/segments.ts` docblock, which promised that running
12
+ `assertMonotonicOnsetArray` on the onsets first means "a gap can then only have a non-negative
13
+ duration". Ninety lines below it, the comment on `durationTicks` says "Negative for an overlap."
14
+ - Monotonicity is `onset[r] >= onset[r - 1]`, and an **overlap satisfies it**: `onset[r]` can be
15
+ at or after its predecessor and still before `onset[r - 1] + recordDurationTicks`.
16
+ `buildSegmentation` then closes the earlier segment past where the next one begins, and the gap
17
+ between them is negative — which is what `index.gaps` reports for a real overlapping file, and
18
+ what an existing test has asserted since 0.3.41 (`durationTicks` of `-2_000_000n`).
19
+ - The docblock now says what monotonicity actually buys: every segment starts at or after the one
20
+ before it, and nothing more.
21
+ - The test that pins the negative gap now also asserts that the same array passes
22
+ `assertMonotonicOnsetArray`, so the two halves of the retired claim are checked against each other
23
+ rather than separately.
24
+
9
25
  ## 0.3.81
10
26
 
11
27
  - **Fixed** `validateHeader` being structurally unable to report `DATE_FIELDS_DISAGREE` under the
@@ -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.3.81";
112
+ export declare const VERSION = "0.3.82";
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.3.81';
82
+ export const VERSION = '0.3.82';
83
83
  //# sourceMappingURL=constants.js.map
@@ -3,8 +3,16 @@
3
3
  *
4
4
  * Layer 4. Pure and synchronous, and structural only: it reports the shape the onsets actually
5
5
  * have and judges none of it. Monotonicity and the spacing rules belong to `time/timeline.ts`,
6
- * which is their sole owner — run `assertMonotonicOnsetArray` on the same array first, and a gap
7
- * can then only have a non-negative duration.
6
+ * which is their sole owner — run `assertMonotonicOnsetArray` on the same array first, and every
7
+ * segment then starts at or after the one before it.
8
+ *
9
+ * That is all monotonicity buys. It requires `onset[r] >= onset[r - 1]`, which an OVERLAP
10
+ * satisfies: `onset[r]` can be at or after its predecessor and still before
11
+ * `onset[r - 1] + recordDurationTicks`, and `buildSegmentation` then closes the earlier segment
12
+ * past where the next one begins. The gap between them is negative, which is exactly what the
13
+ * comment on `durationTicks` below says and what `index.gaps` reports for a real overlapping file.
14
+ * This docblock claimed a gap "can then only have a non-negative duration" until 0.3.82, ninety
15
+ * lines above the line saying otherwise.
8
16
  *
9
17
  * Only `buildRecordIndex` calls this, because only a complete traversal has every onset. The
10
18
  * boundary rule is the one edfcore states everywhere else: a new segment starts wherever
@@ -1 +1 @@
1
- {"version":3,"file":"segments.d.ts","sourceRoot":"","sources":["../../src/time/segments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,WAAW,YAAY;IAC3B,2FAA2F;IAC3F,QAAQ,CAAC,QAAQ,EAAE,SAAS,UAAU,EAAE,CAAC;IACzC,0FAA0F;IAC1F,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAOD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,SAAS,CAAC,MAAM,CAAC,EAC7B,mBAAmB,EAAE,MAAM,EAC3B,WAAW,CAAC,EAAE,MAAM,GACnB,YAAY,CAkEd"}
1
+ {"version":3,"file":"segments.d.ts","sourceRoot":"","sources":["../../src/time/segments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,WAAW,YAAY;IAC3B,2FAA2F;IAC3F,QAAQ,CAAC,QAAQ,EAAE,SAAS,UAAU,EAAE,CAAC;IACzC,0FAA0F;IAC1F,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAOD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,SAAS,CAAC,MAAM,CAAC,EAC7B,mBAAmB,EAAE,MAAM,EAC3B,WAAW,CAAC,EAAE,MAAM,GACnB,YAAY,CAkEd"}
@@ -3,8 +3,16 @@
3
3
  *
4
4
  * Layer 4. Pure and synchronous, and structural only: it reports the shape the onsets actually
5
5
  * have and judges none of it. Monotonicity and the spacing rules belong to `time/timeline.ts`,
6
- * which is their sole owner — run `assertMonotonicOnsetArray` on the same array first, and a gap
7
- * can then only have a non-negative duration.
6
+ * which is their sole owner — run `assertMonotonicOnsetArray` on the same array first, and every
7
+ * segment then starts at or after the one before it.
8
+ *
9
+ * That is all monotonicity buys. It requires `onset[r] >= onset[r - 1]`, which an OVERLAP
10
+ * satisfies: `onset[r]` can be at or after its predecessor and still before
11
+ * `onset[r - 1] + recordDurationTicks`, and `buildSegmentation` then closes the earlier segment
12
+ * past where the next one begins. The gap between them is negative, which is exactly what the
13
+ * comment on `durationTicks` below says and what `index.gaps` reports for a real overlapping file.
14
+ * This docblock claimed a gap "can then only have a non-negative duration" until 0.3.82, ninety
15
+ * lines above the line saying otherwise.
8
16
  *
9
17
  * Only `buildRecordIndex` calls this, because only a complete traversal has every onset. The
10
18
  * boundary rule is the one edfcore states everywhere else: a new segment starts wherever
@@ -1 +1 @@
1
- {"version":3,"file":"segments.js","sourceRoot":"","sources":["../../src/time/segments.ts"],"names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xD,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QACnC,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC9B,IAAI,MAAM,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS;YAAE,SAAS;QAC1D,MAAM,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC;QACnC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC;QAClC,IAAI,CAAC,IAAI,CAAC;YACR,kBAAkB,EAAE,KAAK,GAAG,CAAC;YAC7B,iBAAiB,EAAE,KAAK;YACxB,YAAY,EAAE,cAAc,CAAC,UAAU,CAAC;YACxC,UAAU;YACV,UAAU,EAAE,cAAc,CAAC,QAAQ,CAAC;YACpC,QAAQ;YACR,gFAAgF;YAChF,eAAe,EAAE,cAAc,CAAC,QAAQ,GAAG,UAAU,CAAC;YACtD,aAAa,EAAE,QAAQ,GAAG,UAAU;SACrC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;AAC1E,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.3.81",
3
+ "version": "0.3.82",
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.3.81';
96
+ export const VERSION = '0.3.82';
@@ -3,8 +3,16 @@
3
3
  *
4
4
  * Layer 4. Pure and synchronous, and structural only: it reports the shape the onsets actually
5
5
  * have and judges none of it. Monotonicity and the spacing rules belong to `time/timeline.ts`,
6
- * which is their sole owner — run `assertMonotonicOnsetArray` on the same array first, and a gap
7
- * can then only have a non-negative duration.
6
+ * which is their sole owner — run `assertMonotonicOnsetArray` on the same array first, and every
7
+ * segment then starts at or after the one before it.
8
+ *
9
+ * That is all monotonicity buys. It requires `onset[r] >= onset[r - 1]`, which an OVERLAP
10
+ * satisfies: `onset[r]` can be at or after its predecessor and still before
11
+ * `onset[r - 1] + recordDurationTicks`, and `buildSegmentation` then closes the earlier segment
12
+ * past where the next one begins. The gap between them is negative, which is exactly what the
13
+ * comment on `durationTicks` below says and what `index.gaps` reports for a real overlapping file.
14
+ * This docblock claimed a gap "can then only have a non-negative duration" until 0.3.82, ninety
15
+ * lines above the line saying otherwise.
8
16
  *
9
17
  * Only `buildRecordIndex` calls this, because only a complete traversal has every onset. The
10
18
  * boundary rule is the one edfcore states everywhere else: a new segment starts wherever