edfcore 0.6.257 → 0.6.259
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/dist/diagnostics/collector.d.ts.map +1 -1
- package/dist/diagnostics/collector.js +17 -0
- package/dist/diagnostics/collector.js.map +1 -1
- package/dist/io/source.d.ts.map +1 -1
- package/dist/io/source.js +18 -0
- package/dist/io/source.js.map +1 -1
- package/docs/CHANGELOG.md +35 -0
- package/package.json +1 -1
- package/src/constants.ts +1 -1
- package/src/diagnostics/collector.ts +19 -0
- package/src/io/source.ts +20 -0
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.6.
|
|
112
|
+
export declare const VERSION = "0.6.259";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collector.d.ts","sourceRoot":"","sources":["../../src/diagnostics/collector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAA2B,MAAM,cAAc,CAAC;AAEvE,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,KAAK,iBAAiB,EAA6B,MAAM,YAAY,CAAC;AAE/E;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,4FAA4F;IAC5F,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,CAAC,EAA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AI,EAAE,cAAc,GAAG,aAAa,CAkBpE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,aAAa,EACzB,KAAK,CAAC,EAAE,OAAO,EACf,SAAS,CAAC,EAAE,SAAS,aAAa,EAAE,GACnC,cAAc,CAUhB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,cAAc,CAEhF;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAkEzD;AAED;;;;GAIG;AACH,qBAAa,cAAc;;IACzB;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;gBAIb,OAAO,CAAC,EAAE,YAAY;IAKlC,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;;;;;;;;OASG;IACH;;;;;;OAMG;IACH,KAAK,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,cAAc;IAI5D,MAAM,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI;IASlC,iGAAiG;IACjG,IAAI,WAAW,IAAI,SAAS,aAAa,EAAE,CAE1C;IAED,oEAAoE;IACpE,KAAK,IAAI,SAAS,aAAa,EAAE;CAKlC"}
|
|
@@ -154,6 +154,23 @@ export function assertParseOptions(options) {
|
|
|
154
154
|
throw new RangeError('the parse options are an array, and strict is a field on the options rather than an ' +
|
|
155
155
|
'entry in a list. Next: pass it on an object.');
|
|
156
156
|
}
|
|
157
|
+
/*
|
|
158
|
+
* A PENDING PROMISE, the other object that reaches this guard and leaves as one. 0.6.258 closed it
|
|
159
|
+
* for the read options and names the shape: every field is read off the object, never awaited, so
|
|
160
|
+
* `options.strict` is `undefined` and the parse took the lenient path.
|
|
161
|
+
*
|
|
162
|
+
* `parseHeader` is the sharp one, because it is synchronous and `strict` is its only option — so
|
|
163
|
+
* `strict` is the WHOLE of what a caller behind an async settings lookup holds, and a file with a
|
|
164
|
+
* would-be diagnostic came back "as a header carrying a list, from a caller who asked to receive no
|
|
165
|
+
* such file at all", which is this guard's own account of the cost.
|
|
166
|
+
*
|
|
167
|
+
* A property read, never a call: nothing here awaits, settles or subscribes to anything.
|
|
168
|
+
*/
|
|
169
|
+
if (typeof options?.then === 'function') {
|
|
170
|
+
throw new RangeError('the parse options are a pending Promise, and strict is read off the object rather than ' +
|
|
171
|
+
'awaited — so this parse collected its diagnostics rather than throwing on the first of ' +
|
|
172
|
+
'them. Next: await them before passing them.');
|
|
173
|
+
}
|
|
157
174
|
if (options !== undefined && typeof options !== 'object') {
|
|
158
175
|
throw new RangeError(`the parse options are ${describeValue(options)}, not an object — strict is a field on one, ` +
|
|
159
176
|
'so this parse collected its diagnostics rather than throwing on the first of them. ' +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collector.js","sourceRoot":"","sources":["../../src/diagnostics/collector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,cAAc,EAA2B,MAAM,cAAc,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAA0B,aAAa,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAwB/E;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAuB,EAAE,MAAgC;IACzF,KAAK,MAAM,UAAU,IAAI,MAAM;QAAE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC3D,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,wBAAwB,GAAwB,IAAI,GAAG,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC;AAE7F;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CACpC,MAAuB,EACvB,MAAgC,EAChC,IAAiB;IAEjB,KAAK,MAAM,UAAU,IAAI,MAAM,EAAE,CAAC;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C,MAAM,IAAI,UAAU,CAyC9E"}
|
package/dist/io/source.js
CHANGED
|
@@ -156,6 +156,24 @@ export function assertReadOptions(options) {
|
|
|
156
156
|
throw new RangeError(`the read options are an array, and maxMaterializeBytes and signal are fields on the options rather than ` +
|
|
157
157
|
'entries in a list. Next: pass them on an object.');
|
|
158
158
|
}
|
|
159
|
+
/*
|
|
160
|
+
* A PENDING PROMISE, which is the last shape that reaches this guard as an object and leaves as
|
|
161
|
+
* one. The array branch above closed the bracketed spelling in 0.6.245; this is the awaited one.
|
|
162
|
+
*
|
|
163
|
+
* Every field is read off the object, never awaited, so the cost is the one the branch below
|
|
164
|
+
* states in full: the read "took the default budget and no cancellation", and it RESOLVED. A
|
|
165
|
+
* viewer whose options come from a stored setting or a config file — anything behind an async
|
|
166
|
+
* helper of the caller's own — got an unbounded, uncancellable read that looked like a successful
|
|
167
|
+
* one. `assertRecording` coined the argument for naming the keyword (0.6.89) and the options are
|
|
168
|
+
* the one argument in this package where making the mistake produces data rather than an error.
|
|
169
|
+
*
|
|
170
|
+
* A property read, never a call: nothing here awaits, settles or subscribes to anything.
|
|
171
|
+
*/
|
|
172
|
+
if (typeof options?.then === 'function') {
|
|
173
|
+
throw new RangeError('the read options are a pending Promise, and every field is read off the object rather than ' +
|
|
174
|
+
'awaited — so this read took the default budget and no cancellation, and it resolved. ' +
|
|
175
|
+
'Next: await them before passing them.');
|
|
176
|
+
}
|
|
159
177
|
if (options !== undefined && options !== null && typeof options !== 'object') {
|
|
160
178
|
throw new RangeError(`the read options are ${describeValue(options)}, not an object — maxMaterializeBytes and ` +
|
|
161
179
|
'signal are fields on one, so this read took the default budget and no cancellation. ' +
|
package/dist/io/source.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.js","sourceRoot":"","sources":["../../src/io/source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACj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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.6.259
|
|
10
|
+
|
|
11
|
+
- **Fixed** parse options handed over as the Promise that will produce them, which 0.6.258 named as
|
|
12
|
+
the half it had not closed. `strict` is read off the object rather than awaited, so it was
|
|
13
|
+
`undefined` and the parse took the lenient path: a file with a would-be diagnostic came back "as a
|
|
14
|
+
header carrying a list, from a caller who asked to receive no such file at all", which is this
|
|
15
|
+
guard's own account of the cost.
|
|
16
|
+
- `parseHeader` is the sharp case. It is synchronous and `strict` is its only option, so `strict` is
|
|
17
|
+
the whole of what a caller behind an async settings lookup holds — nothing else on the object could
|
|
18
|
+
have survived to make the call look wrong. `decodeAnnotations` is the same one argument along.
|
|
19
|
+
- `openEdf` and `readHeader` carry both families and were already refused by the read guard. They are
|
|
20
|
+
pinned here too, so the two halves cannot drift into disagreeing about the same argument.
|
|
21
|
+
- A property read, never a call: a Promise that never settles is refused rather than awaited. The
|
|
22
|
+
array, bare-value and `strict`-field branches keep their own sentences.
|
|
23
|
+
|
|
24
|
+
## 0.6.258
|
|
25
|
+
|
|
26
|
+
- **Fixed** read options handed over as the Promise that will produce them being accepted. Every field
|
|
27
|
+
is read off the object rather than awaited, so `options.signal` and `options.maxMaterializeBytes`
|
|
28
|
+
were both `undefined` and both took their defaults: the cost the bare-value branch already spells
|
|
29
|
+
out, "took the default budget and no cancellation" — and the read RESOLVED.
|
|
30
|
+
- This is the argument where the mistake produces data rather than an error. Every other forgotten
|
|
31
|
+
`await` lands on a guard — `formatHeader(readHeader(source))` throws, `mergeChunks(readWindow(...))`
|
|
32
|
+
throws — while `readWindow(recording, selection, optionsFor(session))` came back with the samples,
|
|
33
|
+
unbounded and uncancellable, indistinguishable from a read whose options were honoured.
|
|
34
|
+
- It closes the last object shape that reached `assertReadOptions` and left as one. The `AbortSignal`
|
|
35
|
+
passed whole went in 0.6.155, the bracketed spelling in 0.6.245. Covers `readWindow`, `readRecords`,
|
|
36
|
+
`readAnnotations`, `readEnvelope`, `readEnvelopeAtResolution`, `readTriggers`, `streamRecords`,
|
|
37
|
+
`readRecordBytes`, `buildRecordIndex`, `inspectEdf`, `validateRecording` (wired up in 0.6.252) and
|
|
38
|
+
`index.locate`/`index.onsetTicks`.
|
|
39
|
+
- A property read, never a call: a Promise that never settles is still refused rather than awaited.
|
|
40
|
+
The three existing branches keep their own sentences, and a real options object is unchanged.
|
|
41
|
+
- Not yet closed: `assertParseOptions` — `openEdf`, `readHeader` and `decodeAnnotations` still take a
|
|
42
|
+
pending Promise where `strict` belongs. Same shape, smaller cost, and its own release.
|
|
43
|
+
|
|
9
44
|
## 0.6.257
|
|
10
45
|
|
|
11
46
|
- **Fixed** `formatHeader`'s array refusal naming `redactFields`, which is not an option of this call.
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
|
@@ -193,6 +193,25 @@ export function assertParseOptions(options: unknown): void {
|
|
|
193
193
|
'entry in a list. Next: pass it on an object.',
|
|
194
194
|
);
|
|
195
195
|
}
|
|
196
|
+
/*
|
|
197
|
+
* A PENDING PROMISE, the other object that reaches this guard and leaves as one. 0.6.258 closed it
|
|
198
|
+
* for the read options and names the shape: every field is read off the object, never awaited, so
|
|
199
|
+
* `options.strict` is `undefined` and the parse took the lenient path.
|
|
200
|
+
*
|
|
201
|
+
* `parseHeader` is the sharp one, because it is synchronous and `strict` is its only option — so
|
|
202
|
+
* `strict` is the WHOLE of what a caller behind an async settings lookup holds, and a file with a
|
|
203
|
+
* would-be diagnostic came back "as a header carrying a list, from a caller who asked to receive no
|
|
204
|
+
* such file at all", which is this guard's own account of the cost.
|
|
205
|
+
*
|
|
206
|
+
* A property read, never a call: nothing here awaits, settles or subscribes to anything.
|
|
207
|
+
*/
|
|
208
|
+
if (typeof (options as { then?: unknown } | null | undefined)?.then === 'function') {
|
|
209
|
+
throw new RangeError(
|
|
210
|
+
'the parse options are a pending Promise, and strict is read off the object rather than ' +
|
|
211
|
+
'awaited — so this parse collected its diagnostics rather than throwing on the first of ' +
|
|
212
|
+
'them. Next: await them before passing them.',
|
|
213
|
+
);
|
|
214
|
+
}
|
|
196
215
|
if (options !== undefined && typeof options !== 'object') {
|
|
197
216
|
throw new RangeError(
|
|
198
217
|
`the parse options are ${describeValue(options)}, not an object — strict is a field on one, ` +
|
package/src/io/source.ts
CHANGED
|
@@ -180,6 +180,26 @@ export function assertReadOptions(options: unknown): void {
|
|
|
180
180
|
'entries in a list. Next: pass them on an object.',
|
|
181
181
|
);
|
|
182
182
|
}
|
|
183
|
+
/*
|
|
184
|
+
* A PENDING PROMISE, which is the last shape that reaches this guard as an object and leaves as
|
|
185
|
+
* one. The array branch above closed the bracketed spelling in 0.6.245; this is the awaited one.
|
|
186
|
+
*
|
|
187
|
+
* Every field is read off the object, never awaited, so the cost is the one the branch below
|
|
188
|
+
* states in full: the read "took the default budget and no cancellation", and it RESOLVED. A
|
|
189
|
+
* viewer whose options come from a stored setting or a config file — anything behind an async
|
|
190
|
+
* helper of the caller's own — got an unbounded, uncancellable read that looked like a successful
|
|
191
|
+
* one. `assertRecording` coined the argument for naming the keyword (0.6.89) and the options are
|
|
192
|
+
* the one argument in this package where making the mistake produces data rather than an error.
|
|
193
|
+
*
|
|
194
|
+
* A property read, never a call: nothing here awaits, settles or subscribes to anything.
|
|
195
|
+
*/
|
|
196
|
+
if (typeof (options as { then?: unknown } | null | undefined)?.then === 'function') {
|
|
197
|
+
throw new RangeError(
|
|
198
|
+
'the read options are a pending Promise, and every field is read off the object rather than ' +
|
|
199
|
+
'awaited — so this read took the default budget and no cancellation, and it resolved. ' +
|
|
200
|
+
'Next: await them before passing them.',
|
|
201
|
+
);
|
|
202
|
+
}
|
|
183
203
|
if (options !== undefined && options !== null && typeof options !== 'object') {
|
|
184
204
|
throw new RangeError(
|
|
185
205
|
`the read options are ${describeValue(options)}, not an object — maxMaterializeBytes and ` +
|