edfcore 0.5.38 → 0.5.39
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 +24 -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.39";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
package/docs/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,30 @@ 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.39
|
|
10
|
+
|
|
11
|
+
- **Added** the rule that every array edfcore hands back is frozen. `src/` calls `Object.freeze`
|
|
12
|
+
forty-three times, in seventeen modules, and the suite asserted `Object.isFrozen` twice. That is a
|
|
13
|
+
policy held by convention across every module that returns a list, checked at two of its sites —
|
|
14
|
+
and a policy with one hole is not one, because the hole is exactly where a caller's `push` lands.
|
|
15
|
+
- The reason is sharing. `header.diagnostics` is the same array on every reference to that header,
|
|
16
|
+
`readWindow` hands one array of chunks to whoever asked, and `findSignals` returns a view of
|
|
17
|
+
`header.signals`. A caller who sorts one in place, or appends to it, changes what the next reader
|
|
18
|
+
sees — and the next reader is often the same program, later, through a different function. There
|
|
19
|
+
is no copy-on-read anywhere in this package, and freezing is what makes that safe.
|
|
20
|
+
- It is now checked as a rule: every object every entry point returns is walked to a depth of nine,
|
|
21
|
+
over the eight `AWKWARD` shapes and a file with a gap, and every plain `Array` found anywhere in
|
|
22
|
+
the graph must be frozen. 240 of them — roughly six times the number of `Object.freeze` calls,
|
|
23
|
+
because one call freezes an array that reaches many results.
|
|
24
|
+
- Two things are deliberately not frozen, and both are asserted so the rule reads as a rule rather
|
|
25
|
+
than as "everything is frozen". The containing objects are not: a chunk, a segment, a report are
|
|
26
|
+
values the caller owns, and freezing them would break the `{ ...recording, index }` spread
|
|
27
|
+
`discontinuous.md` tells every reader to write. Neither are the typed arrays:
|
|
28
|
+
`chunk.signals[0].digital` is the data, and `toPhysical(signal, digital, out)` writes into a
|
|
29
|
+
buffer the caller supplied.
|
|
30
|
+
- What the freezing buys is asserted too — a `push` and an in-place `reverse` on a shared list both
|
|
31
|
+
throw, and the list another reference is holding is unchanged.
|
|
32
|
+
|
|
9
33
|
## 0.5.38
|
|
10
34
|
|
|
11
35
|
- **Added** a sweep over every `…Ticks` edfcore publishes against the `…Seconds` beside it. The
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED