edfcore 0.4.511 → 0.4.513
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 +40 -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.4.
|
|
112
|
+
export declare const VERSION = "0.4.513";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
package/docs/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,46 @@ 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.4.513
|
|
10
|
+
|
|
11
|
+
- **Added** a bounds check on the evidence a diagnostic points at: the byte range is inside the
|
|
12
|
+
file, the signal index names a signal, and the record index is inside the records that were
|
|
13
|
+
read. 0.4.510 checks that `raw` matches the bytes at the offset, which settles the offset for
|
|
14
|
+
every diagnostic carrying text to compare. `PARTIAL_FINAL_RECORD` and `TRAILING_BYTES` carry
|
|
15
|
+
none — they point at samples, and quoting samples as text says nothing — so nothing reached
|
|
16
|
+
their offsets at all beyond three hand-picked sizes.
|
|
17
|
+
- An offset past the end of the file is not a crash. `subarray` clamps, so an evidence block
|
|
18
|
+
renders short or empty and the reader concludes the bytes were empty. Both codes are now checked
|
|
19
|
+
across a range of truncations and appends, including one byte and one byte short of a whole
|
|
20
|
+
record, and both are asserted to end exactly at the end of the file — which is what "the rest of
|
|
21
|
+
the file after the last whole record" means.
|
|
22
|
+
- The TAL side is read from record 2 rather than record 0. A TAL diagnostic reports
|
|
23
|
+
`records.start + position` while its buffer offset uses `position` alone, and on a read starting
|
|
24
|
+
at record 0 those are the same number — which is what almost every fixture does, so the one
|
|
25
|
+
arithmetic that can confuse a file position with a buffer position was exercised only where the
|
|
26
|
+
two agree.
|
|
27
|
+
|
|
28
|
+
## 0.4.512
|
|
29
|
+
|
|
30
|
+
- **Added** a read behind each of the four header-recovery diagnostics. When the header's numbers
|
|
31
|
+
disagree with the file, `parseHeader` recovers rather than refuses, and each recovery ends by
|
|
32
|
+
saying what a read will now do: which byte record 0 comes from, which records exist, which bytes
|
|
33
|
+
are never decoded. Every one of those is a claim about `decodeDigital` output, made in a module
|
|
34
|
+
that never calls it, and the existing tests stopped at the header fields the sentence mentions.
|
|
35
|
+
- The gap is not hypothetical for `HEADER_SIZE_MISMATCH`. A three-signal file declaring a 512-byte
|
|
36
|
+
header has the same `recordCount` under either size, because the arithmetic that produced it used
|
|
37
|
+
whichever size the reader used; what separates the two readings is which 1024 bytes come back as
|
|
38
|
+
record 0. The declared offset lands in the middle of the per-signal block and decodes to numbers
|
|
39
|
+
rather than to an error, so the test asserts the ramp the writer wrote — and asserts alongside it
|
|
40
|
+
that the declared offset would have given something else, or the first assertion proves nothing.
|
|
41
|
+
- `TRAILING_BYTES` and `PARTIAL_FINAL_RECORD` claim their bytes are never decoded and never padded
|
|
42
|
+
into existence. Both fixtures now write those bytes as `0x7F`, which decodes to 32639, a value
|
|
43
|
+
the sample ramp never produces — so "never decoded" is checked by looking for it in the output
|
|
44
|
+
rather than by trusting an offset. Reaching either by record number is refused, not returned.
|
|
45
|
+
- `TRUNCATED_FILE` says the missing records are not readable and will not be fabricated. The
|
|
46
|
+
surviving records read exactly as they do in the intact file, and the pair the header claimed is
|
|
47
|
+
an `EdfRangeError` rather than zeros.
|
|
48
|
+
|
|
9
49
|
## 0.4.511
|
|
10
50
|
|
|
11
51
|
- **Fixed** `physical-values.md` documenting the limitation 0.4.509 removed. Its note said a fifth
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED