edfcore 0.5.72 → 0.5.73
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 +24 -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.73";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
package/docs/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,30 @@ 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.73
|
|
10
|
+
|
|
11
|
+
- **Added** the day the network hiccups. `index.onsetTicks(r)` memoises, which is why `locate()`
|
|
12
|
+
costs `O(log recordCount)` reads instead of repeating them — and memoising is the classic place
|
|
13
|
+
to store a FAILURE by accident. Cache the promise rather than the value and one dropped
|
|
14
|
+
connection is permanent: every later caller awaits the same rejection and no retry ever reaches
|
|
15
|
+
the network. Nothing tested a read that fails and is then tried again.
|
|
16
|
+
- The distinction is invisible until it matters, and it is one small edit away. 0.5.44 pinned that
|
|
17
|
+
concurrent callers of `onsetTicks` all miss the memo, because it holds values and not promises —
|
|
18
|
+
and the obvious way to "fix" that is to hold the promise instead. Making exactly that change
|
|
19
|
+
fails three of the eight checks here, which is the point of writing them down.
|
|
20
|
+
- `a-read-that-failed-is-not-remembered.test.ts` uses a source that rejects a stated number of
|
|
21
|
+
times and then behaves. An onset, a `locate`, and a window are each asked for while it is failing
|
|
22
|
+
and again after, and the answer after has to be the answer a source that never failed would have
|
|
23
|
+
given. The rejection arrives as the caller's own error — `isEdfError` is false for it, because a
|
|
24
|
+
dropped connection says nothing about the recording.
|
|
25
|
+
- `cachedSource` gets the same question, provoked at the first read: it coalesces a small file into
|
|
26
|
+
one range, so by the time a recording is open there is nothing left for a later read to fail at.
|
|
27
|
+
A failed open leaves the cache holding nothing, and the retry through the same cache reads
|
|
28
|
+
correctly.
|
|
29
|
+
- The other half is asserted so none of it passes on a package that simply never caches: a
|
|
30
|
+
SUCCESSFUL read is remembered, two calls for one record cost one read, and a record index that
|
|
31
|
+
cannot exist is refused out of the header without touching the source at all.
|
|
32
|
+
|
|
9
33
|
## 0.5.72
|
|
10
34
|
|
|
11
35
|
- **Added** the case none of the four caller-supplied callbacks documents: what happens when yours
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED