edfcore 0.5.29 → 0.5.31
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 +45 -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.31";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
package/docs/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,51 @@ 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.31
|
|
10
|
+
|
|
11
|
+
- **Added** the record-range contract at the five calls that take one. `RecordRange` is the other
|
|
12
|
+
half of the selection contract 0.5.29 covered, and it reaches three layers — `readRecordBytes` in
|
|
13
|
+
the I/O layer, `readRecords` and `readAnnotations` in the recording layer, `decodeDigital` and
|
|
14
|
+
`decodeAnnotations` in the decoders. Unlike the signal selections, they do not share a validator:
|
|
15
|
+
each asserts the range for itself.
|
|
16
|
+
- That is the reason to check them together. `api-reading.md` documents one behaviour — an
|
|
17
|
+
`EdfRangeError` when the range is not inside `header.recordCount` — and a caller who tested against
|
|
18
|
+
`readRecords` has no way to know whether `decodeDigital` agrees. The error also carries `requested`
|
|
19
|
+
and `available` so a caller can clamp and retry, and those have to hold the same two ranges at
|
|
20
|
+
every site or the retry computes the wrong one; that is now asserted as one set rather than five
|
|
21
|
+
times over.
|
|
22
|
+
- Six bad ranges run at all five: a start past the end, a count that runs past it, a negative start,
|
|
23
|
+
a negative count, a fractional start and a fractional count. The last two are the ones a caller
|
|
24
|
+
reaches without noticing — a `Math.floor` left off a division, a range built from `seconds * rate`
|
|
25
|
+
— and they are refused rather than truncated, because a range that silently became
|
|
26
|
+
`{ start: 0, count: 1 }` would return real samples for a question nobody asked.
|
|
27
|
+
- `count: 0` is accepted at all five, including at the end of the file where a count of one is not,
|
|
28
|
+
which is the case the page singles out. The two decoders check something else as well — the buffer
|
|
29
|
+
they were handed against the range they were given — and that second check is exercised rather
|
|
30
|
+
than worked around, since it is the one that catches a caller pairing a range with the wrong bytes.
|
|
31
|
+
|
|
32
|
+
## 0.5.30
|
|
33
|
+
|
|
34
|
+
- **Added** what `diagnostics.md` prints for one header, printed. The page introduces the two ways of
|
|
35
|
+
looking at a diagnostics array by showing both on the same file: `formatDiagnostics` renders one
|
|
36
|
+
entry in full, five detail lines and all, and `summarizeDiagnostics` reduces the same four
|
|
37
|
+
diagnostics to `total 4, errors 1, warnings 1, infos 2`. Neither transcript was run.
|
|
38
|
+
`diagnostics.test.ts` covers the vocabulary and the sink, `diagnostic-message-lines.test.ts` the
|
|
39
|
+
line discipline, and `summarize-diagnostics.test.ts` the counting rules — all against fixtures of
|
|
40
|
+
their own.
|
|
41
|
+
- The rendered block is the one worth comparing whole. It is what a user pastes into an issue, and
|
|
42
|
+
every part of it is load-bearing differently: the severity and code a reader greps for, the
|
|
43
|
+
message, the byte offset they take to a hex editor, the raw bytes as written, the expected/actual
|
|
44
|
+
pair, and the spec clause. The page is the only place the whole shape appears.
|
|
45
|
+
- The paragraph under it makes four smaller claims and each is now checked: no ANSI escapes unless
|
|
46
|
+
you ask; `color` adds them, and stripping them gives back the uncoloured text exactly, so colour
|
|
47
|
+
is decoration and not content; `maxItems` caps the blocks and appends `... and N more`, dimmed
|
|
48
|
+
with SGR 2 when colour is on; and `formatDiagnostics([])` returns the empty string rather than a
|
|
49
|
+
blank line, which is what lets it concatenate into a larger report.
|
|
50
|
+
- The fixture is built to the page's own numbers rather than to a convenient shape — one error, one
|
|
51
|
+
warning and two infos is what the summary transcript says, and the two infos come from two
|
|
52
|
+
different codes because `byCode` is printed beside them.
|
|
53
|
+
|
|
9
54
|
## 0.5.29
|
|
10
55
|
|
|
11
56
|
- **Added** the contract `signalIndices` has to keep at all five reads that take one.
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED