edfcore 0.4.39 → 0.4.41

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.
@@ -1 +1 @@
1
- {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../src/bytes/view.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA8BH;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAGxF;AAED,qEAAqE;AACrE,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAGvF;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAExF"}
1
+ {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../src/bytes/view.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA+BH;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAGxF;AAED,qEAAqE;AACrE,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAGvF;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAExF"}
@@ -23,7 +23,8 @@ function assertInBounds(bytes, offset, length) {
23
23
  'length comes from the header layout, not from the call site.');
24
24
  }
25
25
  if (offset + length > bytes.length) {
26
- throw new RangeError(`byte range [${offset}, ${offset + length}) is outside the ${bytes.length}-byte buffer`);
26
+ throw new RangeError(`byte range [${offset}, ${offset + length}) is outside the ${bytes.length}-byte buffer. ` +
27
+ 'Next: check that the header and these bytes came from the same file.');
27
28
  }
28
29
  }
29
30
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"view.js","sourceRoot":"","sources":["../../src/bytes/view.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD;;;;;GAKG;AACH,SAAS,cAAc,CAAC,KAAiB,EAAE,MAAc,EAAE,MAAc;IACvE,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;QAChD,MAAM,IAAI,UAAU,CAClB,wDAAwD,MAAM,4BAA4B;YACxF,sDAAsD,CACzD,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,CAAC,EAAE,CAAC;QAChD,MAAM,IAAI,UAAU,CAClB,wDAAwD,MAAM,4BAA4B;YACxF,8DAA8D,CACjE,CAAC;IACJ,CAAC;IACD,IAAI,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QACnC,MAAM,IAAI,UAAU,CAClB,eAAe,MAAM,KAAK,MAAM,GAAG,MAAM,oBAAoB,KAAK,CAAC,MAAM,cAAc,CACxF,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,KAAiB,EAAE,MAAc,EAAE,MAAc;IAC1E,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,OAAO,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AACjD,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,SAAS,CAAC,KAAiB,EAAE,MAAc,EAAE,MAAc;IACzE,cAAc,CAAC,KAAK,E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IACtC,OAAO,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AACjD,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,SAAS,CAAC,KAAiB,EAAE,MAAc,EAAE,MAAc;IACzE,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAC9C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,KAAiB,EAAE,MAAc,EAAE,MAAc;IAC9E,OAAO,kBAAkB,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAC/D,CAAC"}
@@ -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.4.39";
112
+ export declare const VERSION = "0.4.41";
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.4.39';
82
+ export const VERSION = '0.4.41';
83
83
  //# sourceMappingURL=constants.js.map
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,18 @@ 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.4.41
10
+
11
+ - **Added** the `Next:` rule to the conventions in `AGENTS.md`. Over 150 messages in `src/` end
12
+ with one and seventeen did not, which 0.4.30-0.4.40 closed — an unwritten convention is one new
13
+ code drifts off, so it is now written down beside the formatting rules.
14
+
15
+ ## 0.4.40
16
+
17
+ - **Fixed** the last refusal in `assertInBounds` without a `Next:` clause, and the one of the
18
+ three with a cause a caller can act on: its own docblock says this fires when a header is mixed
19
+ with bytes from another file, which the message never passed on.
20
+
9
21
  ## 0.4.39
10
22
 
11
23
  - **Fixed** the byte-length bounds refusal, the sibling of the one 0.4.38 fixed and the second of
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.4.39",
3
+ "version": "0.4.41",
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/bytes/view.ts CHANGED
@@ -30,7 +30,8 @@ function assertInBounds(bytes: Uint8Array, offset: number, length: number): void
30
30
  }
31
31
  if (offset + length > bytes.length) {
32
32
  throw new RangeError(
33
- `byte range [${offset}, ${offset + length}) is outside the ${bytes.length}-byte buffer`,
33
+ `byte range [${offset}, ${offset + length}) is outside the ${bytes.length}-byte buffer. ` +
34
+ 'Next: check that the header and these bytes came from the same file.',
34
35
  );
35
36
  }
36
37
  }
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.4.39';
96
+ export const VERSION = '0.4.41';