edfcore 0.4.392 → 0.4.394

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.4.392";
112
+ export declare const VERSION = "0.4.394";
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.392';
82
+ export const VERSION = '0.4.394';
83
83
  //# sourceMappingURL=constants.js.map
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,41 @@ 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.394
10
+
11
+ - **Added** a check that every field the error tables on `api-errors.md` document is on the error
12
+ you actually catch. Those tables are the point of the classes: a caller reads `matchingIndices`
13
+ to offer a choice of channel, `budgetBytes` to decide how much to ask for next time, `available`
14
+ to clamp a range, `receivedLength` to tell a short read from a truncated file.
15
+ - `error-classes.test.ts` checks the class-to-`edfErrorKind` table above them, because that is what
16
+ a cross-realm `catch` switches on. The field tables underneath were never executed, and a renamed
17
+ field passes everything here: TypeScript is happy, because the rename is consistent inside the
18
+ package, the page still describes the old name, and the consumer reading it gets `undefined` —
19
+ which in a handler looks like "this error did not carry that detail" rather than a breaking
20
+ change.
21
+ - So one error of each class is provoked by the condition its row describes, and every documented
22
+ field is looked for on the instance with the documented type. A field documented as `X |
23
+ undefined` may be absent, but the name still has to be one the class defines, which is what stops
24
+ a misspelt row from being unfalsifiable.
25
+
26
+ ## 0.4.393
27
+
28
+ - **Added** a property test for the rule `design-decisions.md` states about out-of-range samples: a
29
+ sample outside the declared digital range comes back as it was stored, is counted for free during
30
+ decode, and converts on the affine map that produced the samples inside the range. Clamping
31
+ instead flat-tops real peaks and draws saturation the hardware did not produce, so `edfcore` ships
32
+ the clamp as a separate function you call on purpose — EDFlib clamps on read, and cross-validating
33
+ against it needs the same operation.
34
+ - The unit tests check that with chosen values against chosen ranges. What examples cannot say is
35
+ that nothing clamps for some combination: a negative gain, a range that does not straddle zero, a
36
+ 24-bit signal whose declared span is narrower than a 16-bit one's. Those are the shapes where a
37
+ stray `Math.min` looks correct in review.
38
+ - Four properties over generated ranges, generated samples and both storage widths: the decoded
39
+ integers are the integers written, `outOfDigitalRangeCount` is what an independent pass finds,
40
+ the physical step per digital unit outside the range equals the step inside it — which is what
41
+ "extrapolates" means — and `clampToDigitalRange` moves exactly the samples outside the range and
42
+ nothing else.
43
+
9
44
  ## 0.4.392
10
45
 
11
46
  - **Added** a check that the docblocks reach the published types, which five other checks quietly
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.4.392",
3
+ "version": "0.4.394",
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.4.392';
96
+ export const VERSION = '0.4.394';