edfcore 0.4.516 → 0.4.517
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 +21 -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.517";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
package/docs/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,27 @@ 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.517
|
|
10
|
+
|
|
11
|
+
- **Added** the convention `api-types.md` states in bold above every table on the page: "A field
|
|
12
|
+
that may be absent is `T | undefined`, and the key is always there." It is what lets a caller
|
|
13
|
+
write `header.startTime.resolvedDate === undefined` instead of `'resolvedDate' in
|
|
14
|
+
header.startTime`, and destructure a result without guarding each name. It was prose.
|
|
15
|
+
- The type half is read out of `src/types.ts`: every optional member must live in an interface the
|
|
16
|
+
caller constructs — the ten `…Options` and `…Selection` types. An optional member on a result is
|
|
17
|
+
not a compile error anywhere. It quietly makes one field a name TypeScript will not let you read
|
|
18
|
+
without a guard.
|
|
19
|
+
- The runtime half is the one a type cannot catch. A result assembled with a conditional spread —
|
|
20
|
+
`...(date === undefined ? {} : { resolvedDate: date })` — satisfies `T | undefined` and omits the
|
|
21
|
+
key, so `Object.keys` comes up short, `in` is false, and a JSON round-trip loses a field the
|
|
22
|
+
table says is always there. Twenty result interfaces are now instantiated and every declared
|
|
23
|
+
member checked with `Object.hasOwn`; writing that spread into `resolveStartTime` fails the run.
|
|
24
|
+
- The fixture is built to leave fields ABSENT rather than present: an unreadable start date, a
|
|
25
|
+
signal with a degenerate digital range so it has no scale, annotations with no duration, and a
|
|
26
|
+
discontinuous file so one segment has a gap before it and one has none. Twenty fields come back
|
|
27
|
+
`undefined`, and the run asserts that count — on a file where everything happened to be defined
|
|
28
|
+
the check would pass while testing nothing.
|
|
29
|
+
|
|
9
30
|
## 0.4.516
|
|
10
31
|
|
|
11
32
|
- **Added** the third column of the `EdfHeader` and `EdfSignal` tables on `api-types.md`, executed.
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED