edfcore 0.5.19 → 0.5.20
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 +22 -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.20";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
package/docs/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,28 @@ 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.20
|
|
10
|
+
|
|
11
|
+
- **Added** the lifetime contract `api-sources.md` states in five words: of `close?()`, "edfcore
|
|
12
|
+
never calls it for you." A caller who opened a file handle, or a source wrapping a pooled
|
|
13
|
+
connection, is entitled to decide when it is released — and a library that closed it on their
|
|
14
|
+
behalf would be releasing a resource they may still be using, with the failure arriving later and
|
|
15
|
+
somewhere else. Nothing checked it. `cache.test.ts` covers the other direction, that
|
|
16
|
+
`cachedSource.close()` forwards to the source it wraps, which is the case where a caller did ask.
|
|
17
|
+
- Every reading entry point that takes a source is now driven over a spy that records whether it was
|
|
18
|
+
closed: `readHeader`, `openEdf`, `inspectEdf`, `readRecordBytes`, `readRecords`, `readWindow`,
|
|
19
|
+
`readAnnotations`, `buildRecordIndex`, `validateRecording`, `streamRecords`, and one wrapped in
|
|
20
|
+
`cachedSource`. Each is checked to have actually read, so a passing run is not a source nobody
|
|
21
|
+
touched.
|
|
22
|
+
- The failure paths are checked too, because a `finally` added for cleanup is exactly how this
|
|
23
|
+
contract gets broken: a file that is not an EDF at all, a read refused before it is issued, and a
|
|
24
|
+
read naming records the file does not have.
|
|
25
|
+
- A behavioural sweep only covers the paths it thought to drive, so the `close` call sites are
|
|
26
|
+
enumerated out of `src/` as well. There are four, in two modules. Three are inside a `close()`
|
|
27
|
+
implementation of a source edfcore hands back; the fourth is `fileSource` releasing a handle that
|
|
28
|
+
never reached a caller, which is the exception its own docblock documents. `fileHandleSource` is
|
|
29
|
+
then checked to close its handle exactly once — when the caller calls it, and not while reading.
|
|
30
|
+
|
|
9
31
|
## 0.5.19
|
|
10
32
|
|
|
11
33
|
- **Added** the table on `diagnostics.md` that says which calls take `strict`. Eleven functions in
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED