edfcore 0.3.134 → 0.3.136

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.136
10
+
11
+ - **Removed** the last hard-coded `readRecordBytes():` prefix, and pinned the rule. Eight modules
12
+ call that helper, so `readAnnotations(recording, { start: 0, count: 99 })` reported a function the
13
+ caller had never written — the fourth instance of what 0.3.132-0.3.134 fixed, and the one those
14
+ three missed.
15
+ - The guard asserts it at the delegating entry point, which is the side that was wrong: no message
16
+ thrown by `readAnnotations` or `sampleStartSecondsOf` contains a `someFunction():` prefix. It is
17
+ what found this instance.
18
+
19
+ ## 0.3.135
20
+
21
+ - **Fixed** the README's claims table saying the pyEDFlib sample-scan parity covers "all five
22
+ files". `corpus-parity.test.ts` runs that sweep over `CASES`, which lists seven — the two Sleep-EDF
23
+ files, three teuniz.net generators, `chb01_01.edf` and `calib.rec`.
24
+
9
25
  ## 0.3.134
10
26
 
11
27
  - **Completed** 0.3.133, which fixed only the three messages outside `resolveSignal`. That helper
package/README.md CHANGED
@@ -326,7 +326,7 @@ What else those files establish, which synthetic fixtures cannot:
326
326
  | Streaming equals reading | 42 streamed chunks concatenated and compared sample by sample |
327
327
  | **Random access is real** | a 30-second window twelve hours in costs **under 64 KB** over HTTP |
328
328
  | `validate` is usable as a CI gate | exits 0 on a real recording from a real sleep lab |
329
- | The sample scan sees what pyEDFlib sees | whole-signal digital extremes, all five files |
329
+ | The sample scan sees what pyEDFlib sees | whole-signal digital extremes, all seven files |
330
330
 
331
331
  Those tests need the corpus and skip without it. `coverage.test.ts` always runs and says which
332
332
  state you are in, because a skipped test and a passing one look identical in a summary line:
@@ -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.134";
112
+ export declare const VERSION = "0.3.136";
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.134';
82
+ export const VERSION = '0.3.136';
83
83
  //# sourceMappingURL=constants.js.map
package/dist/io/read.js CHANGED
@@ -78,7 +78,7 @@ function assertRecordRange(header, records) {
78
78
  const countValid = Number.isSafeInteger(records.count) && records.count >= 0;
79
79
  if (startValid && countValid && records.start + records.count <= header.recordCount)
80
80
  return;
81
- throw new EdfRangeError(`readRecordBytes(): records ${describeRange(records)} is not inside the ` +
81
+ throw new EdfRangeError(`records ${describeRange(records)} is not inside the ` +
82
82
  `${header.recordCount} data records this file contains. Next: clamp the range against ` +
83
83
  'header.recordCount, or call index.locate(seconds) to find a record index for a time.', { requested: records, available });
84
84
  }
@@ -1 +1 @@
1
- {"version":3,"file":"read.js","sourceRoot":"","sources":["../../src/io/read.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C;;;;;;;;GAQG;AACH,SAAS,eAAe,CAA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EAClD,UAAU,EACV,UAAU,CACX,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.3.134",
3
+ "version": "0.3.136",
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.134';
96
+ export const VERSION = '0.3.136';
package/src/io/read.ts CHANGED
@@ -88,7 +88,7 @@ function assertRecordRange(header: EdfHeader, records: RecordRange): void {
88
88
  const countValid = Number.isSafeInteger(records.count) && records.count >= 0;
89
89
  if (startValid && countValid && records.start + records.count <= header.recordCount) return;
90
90
  throw new EdfRangeError(
91
- `readRecordBytes(): records ${describeRange(records)} is not inside the ` +
91
+ `records ${describeRange(records)} is not inside the ` +
92
92
  `${header.recordCount} data records this file contains. Next: clamp the range against ` +
93
93
  'header.recordCount, or call index.locate(seconds) to find a record index for a time.',
94
94
  { requested: records, available },