edfcore 0.5.35 → 0.5.36
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/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/docs/CHANGELOG.md +27 -0
- package/package.json +1 -1
- package/src/constants.ts +1 -1
package/dist/constants.d.ts
CHANGED
|
@@ -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.
|
|
112
|
+
export declare const VERSION = "0.5.36";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
package/docs/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,33 @@ 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.36
|
|
10
|
+
|
|
11
|
+
- **Added** the `ByteSource` `data-sources.md` tells you to write, written and read through. "Writing
|
|
12
|
+
your own ByteSource" is the section that makes the interface a promise rather than an
|
|
13
|
+
implementation detail — "the whole job is: know the length, return exactly the bytes asked for, and
|
|
14
|
+
reject otherwise" — and it prints a complete forty-line adapter over a range-returning object
|
|
15
|
+
store, with four rules under it "in order of how badly they bite". None of it was run.
|
|
16
|
+
`source-contract.test.ts` covers the contract from edfcore's side, with sources written for the
|
|
17
|
+
test; the adapter a reader would copy had nothing.
|
|
18
|
+
- It is now transcribed and used: a recording is opened over it, a window is read, and the samples
|
|
19
|
+
are compared against the same file through `byteSource`. The store streams in irregular pieces —
|
|
20
|
+
7, 1, 4096, 3 — which is the whole reason the adapter has a loop, and a test that returned each
|
|
21
|
+
range in one go would never reach it. That is asserted too: no single piece the store hands back
|
|
22
|
+
is a whole read.
|
|
23
|
+
- Each of the four rules is then broken on purpose, in an adapter of its own. A short return is
|
|
24
|
+
caught by the adapter, which can name the key and the range, and by edfcore anyway for a source
|
|
25
|
+
that does not check. A padded one is the dangerous case: on a plain EDF every sample of every
|
|
26
|
+
record comes back as a legal zero with no diagnostic at all, and only the annotation region of an
|
|
27
|
+
EDF+ notices, with `TIMEKEEPING_TAL_MISSING`. A reused buffer is shown corrupting an array a
|
|
28
|
+
caller had already been handed, which the page's own per-read allocation does not.
|
|
29
|
+
- The fourth is the page's Warning, and it is the one worth having under test: "edfcore itself does
|
|
30
|
+
not poll the signal between reads. A custom `ByteSource` that ignores `options.signal` makes
|
|
31
|
+
cancellation a complete no-op, including for a long `validateRecording` sweep that issues hundreds
|
|
32
|
+
of reads." A whole-file sweep and a chunked index traversal both run to completion over an
|
|
33
|
+
already-aborted signal, serving twenty reads after the abort. A stated limitation nobody checks is
|
|
34
|
+
indistinguishable from a bug.
|
|
35
|
+
|
|
9
36
|
## 0.5.35
|
|
10
37
|
|
|
11
38
|
- **Added** the resolution of every name a `Next:` clause points at. `next-clause.test.ts` proves
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED