edfcore 0.5.26 → 0.5.28
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 +47 -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.28";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
package/docs/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,53 @@ 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.28
|
|
10
|
+
|
|
11
|
+
- **Added** an already-aborted signal driven through every entry point that takes one.
|
|
12
|
+
`api-sources.md` says edfcore "polls `.aborted` before and after each read and throws an `Error`
|
|
13
|
+
whose `name` is `'AbortError'`"; `data-sources.md` adds that every bundled adapter checks it
|
|
14
|
+
before it starts, and that the rejection "is a plain `Error` ... not an `EdfError`.
|
|
15
|
+
`isEdfError` returns false for it, so a `catch` that re-throws aborts stays simple."
|
|
16
|
+
- `http-abort-signal.test.ts` covers the adapter with the most to go wrong. What nothing covered is
|
|
17
|
+
the sentence's scope. The guard lives in the SOURCES, and every reading function reaches it only
|
|
18
|
+
by issuing a read — so whether each of them actually does, before allocating, before scanning,
|
|
19
|
+
before decoding, is a property of thirteen call paths rather than of the four adapters. A function
|
|
20
|
+
that resolved its window or sized its buffer first would do that work for a caller who had already
|
|
21
|
+
cancelled.
|
|
22
|
+
- All thirteen are now driven, and each must reject with `name === 'AbortError'` and `isEdfError`
|
|
23
|
+
false — the discriminator the page says consumers branch on, chosen because `DOMException` cannot
|
|
24
|
+
be named without the DOM lib. The four adapters are driven directly alongside them, and each is
|
|
25
|
+
also shown to read normally when the signal is simply not aborted.
|
|
26
|
+
- The one place it does not fire is checked with them, because it is documented rather than
|
|
27
|
+
accidental: `api-reading.md` says a record range with `count: 0` "issues no read at all", and a
|
|
28
|
+
call that reads nothing has nothing to abort.
|
|
29
|
+
- The last block is the other half of `ReadOptions`' own docblock — "cancelling a read and capping an
|
|
30
|
+
allocation never alter what a completed call returns". A signal that is never aborted leaves every
|
|
31
|
+
result identical to one passed no options at all.
|
|
32
|
+
|
|
33
|
+
## 0.5.27
|
|
34
|
+
|
|
35
|
+
- **Added** a non-finite bound driven through every entry point that takes a time in seconds.
|
|
36
|
+
`secondsToTicks` is the one place a caller's seconds become the integers everything else works in,
|
|
37
|
+
and it refuses a non-finite one; `ticks.test.ts` covers that, once, on the resolver.
|
|
38
|
+
- The resolver is not the guarantee. The guarantee is that a `NaN` cannot get past it, and `NaN`
|
|
39
|
+
reaches a time bound the way it reaches a byte budget: `Number(searchParams.get('t'))`, a slider
|
|
40
|
+
whose value has not been set, an absent key in a saved view. What makes it worth a sweep is what
|
|
41
|
+
happens if one entry point misses. `NaN` compares false against everything, so a window bound that
|
|
42
|
+
skipped the resolver would not throw — it would return `[]`, which is the legitimate answer for a
|
|
43
|
+
window past the end of a recording and indistinguishable from one. That contrast is asserted
|
|
44
|
+
rather than described.
|
|
45
|
+
- The entry points are enumerated out of `src/` the way `nan-budget-reaches.test.ts` enumerates the
|
|
46
|
+
budget's: sixteen exported functions declare one of `seconds`, `startSeconds`, `durationSeconds`
|
|
47
|
+
or `secondsPerBucket`, directly or through a selection type whose `extends` chain is followed.
|
|
48
|
+
Two of the sixteen take a `startSeconds` edfcore itself produced — `envelopeOfSamples` and
|
|
49
|
+
`toPhysicalEnvelope`, on an `EdfChunkSignal` and an `EdfEnvelopeSignal` — and that is stated
|
|
50
|
+
rather than filtered out silently.
|
|
51
|
+
- Each of the remaining thirteen, plus `index.locate`, is driven with `NaN`, `Infinity` and
|
|
52
|
+
`-Infinity`, and each must throw a plain `RangeError` — `isEdfError` false, since a bad bound is a
|
|
53
|
+
caller's mistake and never a file's — whose message names the value it was given and ends with a
|
|
54
|
+
`Next:` clause.
|
|
55
|
+
|
|
9
56
|
## 0.5.26
|
|
10
57
|
|
|
11
58
|
- **Added** the two sentences that promise nothing changes when you run it again. `validation.md`:
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED