edfcore 0.5.28 → 0.5.29

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.28";
112
+ export declare const VERSION = "0.5.29";
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.28';
82
+ export const VERSION = '0.5.29';
83
83
  //# sourceMappingURL=constants.js.map
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,31 @@ 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.29
10
+
11
+ - **Added** the contract `signalIndices` has to keep at all five reads that take one.
12
+ `duplicate-signal-indices.test.ts` covers two of the rules `api-reading.md` states — duplicates are
13
+ dropped, the order given is the order returned — over `readRecords`, `readWindow` and
14
+ `streamRecords`. It does not reach the two envelope entry points, and nothing covered what the
15
+ option does when it is wrong.
16
+ - The refusals are the part worth pinning, because there are two of them and they are deliberately
17
+ different classes. An index the file does not have is an `EdfChannelNotFoundError`, an `EdfError`
18
+ carrying `selector` and `availableLabels` so a caller can offer the right one. An index naming the
19
+ annotations channel is a plain `RangeError`, because it can only be a caller's mistake and never a
20
+ file's — the bytes there are TAL text, and decoding them as samples produces numbers that look
21
+ exactly like a signal. `isEdfError` is the split, and a caller writing one `catch` for bad files
22
+ and another for bad calls depends on it holding at every entry point rather than at the one they
23
+ tested against.
24
+ - There is no reason for five functions to diverge — they share `resolveSignals` — which is exactly
25
+ why it is worth a test: a sixth entry point, or one that grows its own validation to report
26
+ something friendlier, is how a shared rule stops being one. All nine functions in `src/` that take
27
+ a `signalIndices` are enumerated by resolving their parameter types, and split into the five under
28
+ test, the two shared helpers, and the two annotation reads whose `signalIndices` selects annotation
29
+ signals and inverts both rules.
30
+ - Nine cases run at every one of the five: out of range, negative, fractional, the annotations
31
+ channel alone and mixed with a real signal, a repeat, a repeat out of order, a reversal, and an
32
+ empty selection — which returns no signals rather than all of them.
33
+
9
34
  ## 0.5.28
10
35
 
11
36
  - **Added** an already-aborted signal driven through every entry point that takes one.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.5.28",
3
+ "version": "0.5.29",
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.28';
96
+ export const VERSION = '0.5.29';