edfcore 0.4.513 → 0.4.516
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 +61 -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.516";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
package/docs/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,67 @@ 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.516
|
|
10
|
+
|
|
11
|
+
- **Added** the third column of the `EdfHeader` and `EdfSignal` tables on `api-types.md`, executed.
|
|
12
|
+
`type-tables.test.ts` already checks that both tables list every member of their interface in
|
|
13
|
+
declaration order, which settles the first column. The third is where the tables do their work:
|
|
14
|
+
most rows do not describe a field, they derive it — `dataByteLength` is
|
|
15
|
+
`recordCount * recordByteLength`, `sampleCount` is `samplesPerRecord * header.recordCount`,
|
|
16
|
+
`recordByteOffset` is an offset "within one data record" rather than within the file, and
|
|
17
|
+
`sampleRateHz` is `undefined` "exactly when that duration is `0`". None of it had been run.
|
|
18
|
+
- A wrong rule there is worse than a missing one, because these are the sentences a reader uses
|
|
19
|
+
instead of measuring. Someone who takes `recordByteOffset` for a file offset writes a seek that
|
|
20
|
+
lands in the header; someone who divides by `sampleRateHz` because the table did not warn them
|
|
21
|
+
gets `Infinity` on a legal annotations-only recording.
|
|
22
|
+
- Each rule is asserted twice: that the page still states it, quoting the row's own words, and that
|
|
23
|
+
the library obeys it. The quote is what makes the pair worth anything — a rule reworded on the
|
|
24
|
+
page fails here instead of drifting away from a test that only knew the behaviour.
|
|
25
|
+
- Reading the rows needs two things the obvious parser gets wrong. `recordByteLength` is a row in
|
|
26
|
+
BOTH tables and means different things in each, so a row is looked up under its `###` heading;
|
|
27
|
+
and a type cell writes a union as `number \| undefined`, so cells split on an unescaped pipe or
|
|
28
|
+
the rest of that row lands in the wrong column.
|
|
29
|
+
|
|
30
|
+
## 0.4.515
|
|
31
|
+
|
|
32
|
+
- **Added** the thirteen pairs behind one sentence on `cli.md`: "Each is accepted and ignored by
|
|
33
|
+
the commands it does not name." It is the only claim on the page about pairs rather than about a
|
|
34
|
+
command, it is what lets a wrapper pass one fixed flag set to every command instead of branching,
|
|
35
|
+
and nothing checked it.
|
|
36
|
+
- The two halves rot differently. "Accepted" fails loudly — `parseArgs` refuses an unknown flag, so
|
|
37
|
+
a flag dropped from the parser exits 2. "Ignored" fails silently, and in the worst direction:
|
|
38
|
+
`--patient` gates identification, so a flag that started reaching `events`, `signals` or `gaps`
|
|
39
|
+
would print the identification a caller passed it to withhold. Each pair now runs the command
|
|
40
|
+
twice and compares the bytes, having first asserted the command printed something — two empty
|
|
41
|
+
outputs are equal.
|
|
42
|
+
- The last clause is the same test in the same shape: the counted `events` listing is never capped,
|
|
43
|
+
so `--limit 1` must return it unchanged, while `events --list --limit 1` must not. A cap on a
|
|
44
|
+
census truncates it into something that reads as complete.
|
|
45
|
+
- Which commands each flag names is read out of the page's own "Flags:" paragraph, not written in
|
|
46
|
+
the test, so a flag that gains or loses a command in the prose changes what is checked. The
|
|
47
|
+
paragraph needs splitting at each flag to read: only two of the three carry a parenthesised list,
|
|
48
|
+
and one pattern across the whole paragraph reads the third one's list as the second one's.
|
|
49
|
+
|
|
50
|
+
## 0.4.514
|
|
51
|
+
|
|
52
|
+
- **Added** a check of what is in the six columns `edfcore signals` prints. `cli.md` tabulates them
|
|
53
|
+
by name and position and ends the sixth row with the instruction the command exists for — "the
|
|
54
|
+
authoritative count; index by this, never by the rate" — and the only test was that there are six
|
|
55
|
+
columns and one line per signal, which six columns of anything satisfy.
|
|
56
|
+
- That is the defect the page records against itself. Until 0.2.42 it described a column list the
|
|
57
|
+
command did not emit: samples per record where the command printed `kind`, and the authoritative
|
|
58
|
+
field in no column at all. A count of six would not have caught it then either. The order is now
|
|
59
|
+
read out of the page's table rather than written in the test, so the two cannot drift apart.
|
|
60
|
+
- The fixture gives its two data signals different sample counts and different units, so 4 Hz, 1.5
|
|
61
|
+
Hz, 8 and 3 are all distinct — no pair of columns can be swapped and still match.
|
|
62
|
+
- The three qualified rows are checked as qualified. `sampleRateHz` is empty on a legal zero record
|
|
63
|
+
duration, where `undefined`, `0` and `NaN` would each be a number a script divides by. `label`
|
|
64
|
+
and `physicalDimension` are both called trimmed, and are trimmed by different things: the parser
|
|
65
|
+
strips EDF padding from both, the command adds `String.trim` to the dimension — which reaches a
|
|
66
|
+
tab — and passes the label through `printable`, which turns a tab into `.`. Removing either
|
|
67
|
+
fails now; before this, removing the first put a tab in the dimension and removing the second put
|
|
68
|
+
a seventh column in the row, handing `cut -f6` a unit where it expected a sample count.
|
|
69
|
+
|
|
9
70
|
## 0.4.513
|
|
10
71
|
|
|
11
72
|
- **Added** a bounds check on the evidence a diagnostic points at: the byte range is inside the
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED