edfcore 0.5.57 → 0.5.58

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.57";
112
+ export declare const VERSION = "0.5.58";
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.57';
82
+ export const VERSION = '0.5.58';
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.58
10
+
11
+ - **Added** the composition rule for `trimToWindow`: trimming to A and then to B is trimming once to
12
+ their overlap. The call returns a `subarray` view rather than a copy — "so trimming allocates
13
+ nothing and the two share storage" — which makes its result a chunk signal like any other, and a
14
+ caller who has one narrows it again as a matter of course: a viewer that has read a minute and is
15
+ now drawing ten seconds of it does exactly that.
16
+ - `trim-window.test.ts` covers the rule for one trim, against the closed form the source derives.
17
+ Composing two was not covered, and it is where a narrowing that treated its input's
18
+ `firstSampleIndex` as zero would show — the second trim measured from the wrong origin, coming
19
+ back with the right number of samples from the wrong place. The fixture's samples are a ramp over
20
+ the whole recording, so a sample's value names its position and a wrong origin is a different
21
+ number rather than a different length.
22
+ - The property runs over 300 arbitrary window pairs with a constant seed, including pairs that do
23
+ not nest and pairs that miss each other entirely.
24
+ - **Found while writing it,** and now stated rather than asserted away: an empty trim has no
25
+ position to agree about. The docblock promises a window that misses the chunk "yields a
26
+ zero-length result rather than an error" and says nothing about where that result sits, so two
27
+ routes to an empty answer report different `firstSampleIndex` and `startSeconds` — each being
28
+ where its own arithmetic stopped. `sampleCount` is the field to branch on, and the property
29
+ compares positions only where there are samples in them.
30
+
9
31
  ## 0.5.57
10
32
 
11
33
  - **Added** the property that makes an envelope exhaustive: the buckets are a partition. `readEnvelope`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.5.57",
3
+ "version": "0.5.58",
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.57';
96
+ export const VERSION = '0.5.58';