edfcore 0.3.45 → 0.3.46

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,25 @@ 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.46
10
+
11
+ - **Fixed** the two documented code examples that did not compile under the compiler settings
12
+ edfcore itself builds with. Both are on the pages that tell a reader to go and write their own
13
+ code, which is the worst place for a snippet that has to be debugged before it can be used.
14
+ - `api-sources.md`, the custom `FetchLike` adapter: `return fetch(url, { ...init, signal })` is
15
+ rejected under `exactOptionalPropertyTypes`, because `RequestInit.signal` is
16
+ `AbortSignal | null` and the local is `AbortSignal | undefined`. It now writes
17
+ `signal: signal ?? null`, and says why.
18
+ - `api-primitives.md`, the duplicate-label resolver: `getSignal(header, error.matchingIndices[0])`
19
+ is rejected under `noUncheckedIndexedAccess`, which types the element `number | undefined`. It
20
+ now destructures and narrows first.
21
+ - Neither was wrong at runtime; both compiled cleanly with the flag off. This is specifically the
22
+ strict-mode shape, and `tsconfig.json` and `tsconfig.build.json` both set both flags.
23
+ - `tests/types/documented-examples.test-d.ts` holds a copy of each snippet as REAL code, so
24
+ `npm run typecheck` compiles them, and then reads the fenced blocks back out of the pages and
25
+ asserts every line is present in that copy. Editing a snippet in the docs without editing the
26
+ compiled copy now fails, in both directions.
27
+
9
28
  ## 0.3.45
10
29
 
11
30
  - **Fixed** `formatAnnotations` printing a NEGATIVE onset as an instant slightly **after** the
@@ -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.45";
112
+ export declare const VERSION = "0.3.46";
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.45';
82
+ export const VERSION = '0.3.46';
83
83
  //# sourceMappingURL=constants.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.3.45",
3
+ "version": "0.3.46",
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.45';
96
+ export const VERSION = '0.3.46';