edfcore 0.5.62 → 0.5.63
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 +25 -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.63";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
package/docs/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,31 @@ 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.63
|
|
10
|
+
|
|
11
|
+
- **Added** the other half of the zero-copy bargain. `byteSource` is documented as handing out
|
|
12
|
+
`subarray` views over the caller's own buffer, and `io/bytes.ts` argues that is safe because the
|
|
13
|
+
adapter retains nothing the caller does not already hold. That is a claim about the ADAPTER. The
|
|
14
|
+
values the reading API builds out of those views are what a caller keeps, and nothing said
|
|
15
|
+
whether any of them still points at the buffer.
|
|
16
|
+
- Two sites state the rule for themselves and neither was checked: `header/parse.ts` copies the
|
|
17
|
+
header bytes so "a header that quietly changed under a hexdump" cannot happen, and
|
|
18
|
+
`diagnostics/collector.ts` copies a diagnostic's evidence because "a diagnostic outlives the read
|
|
19
|
+
that produced it".
|
|
20
|
+
- The second is the one holding it up. `readHeader` joins its two reads into a buffer of its own,
|
|
21
|
+
so the header is copied twice over and the `copyBytes` there is belt on braces. The four
|
|
22
|
+
`rawBytes` in `tal/` are `sliceBytes` — a `subarray` of the record bytes — and `readRecordBytes`
|
|
23
|
+
returns those straight from the source. Removing the collector's `.slice()` makes a
|
|
24
|
+
`TAL_MALFORMED` diagnostic hand back a window into the caller's file, and this file fails.
|
|
25
|
+
- `nothing-points-at-your-buffer.test.ts` walks every value every entry point returns over all ten
|
|
26
|
+
`AWKWARD` shapes, a gapped file and one whose TAL onsets are not numbers, and requires every
|
|
27
|
+
typed array to be backed by some other buffer. Then it overwrites the caller's bytes end to end
|
|
28
|
+
and compares each answer against a `structuredClone` taken before — the failure a caller would
|
|
29
|
+
actually meet, having reused the array they fetched into.
|
|
30
|
+
- Two assertions keep it honest: that a `byteSource` read really does alias, so the risk is real,
|
|
31
|
+
and that the sweep reached a diagnostic quoting record bytes rather than only the header, so a
|
|
32
|
+
pass is not a pass on the one path that was never in question.
|
|
33
|
+
|
|
9
34
|
## 0.5.62
|
|
10
35
|
|
|
11
36
|
- **Fixed** `byteSource` accepting a detached `ArrayBuffer` and building a zero-byte source over
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED