edfcore 0.6.266 → 0.6.268

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.
@@ -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.266";
112
+ export declare const VERSION = "0.6.268";
113
113
  //# sourceMappingURL=constants.d.ts.map
package/dist/constants.js CHANGED
@@ -79,5 +79,5 @@ export const SIGNAL_FIELD_BLOCK_OFFSETS = {
79
79
  reserved: 224,
80
80
  };
81
81
  /** Published package version. Kept in sync with package.json by a test. */
82
- export const VERSION = '0.6.266';
82
+ export const VERSION = '0.6.268';
83
83
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../../src/diagnostics/summary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEjF;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,yFAAyF;IACzF,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC;IACxC,uEAAuE;IACvE,QAAQ,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;CAC1C;AA+BD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,SAAS,aAAa,EAAE,GAAG,oBAAoB,CA0EhG"}
1
+ {"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../../src/diagnostics/summary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEjF;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,yFAAyF;IACzF,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC;IACxC,uEAAuE;IACvE,QAAQ,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;CAC1C;AAuDD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,SAAS,aAAa,EAAE,GAAG,oBAAoB,CA0EhG"}
@@ -36,6 +36,28 @@ const SEVERITY_RANK = { error: 3, warning: 2, info: 1 };
36
36
  function assertDiagnostic(diagnostic, index) {
37
37
  if (typeof diagnostic?.message === 'string')
38
38
  return;
39
+ /*
40
+ * A PENDING PROMISE, which the sentence below is wrong about twice: it is not a by-code row, and
41
+ * "carries no message" is true of it the way it is true of almost everything.
42
+ *
43
+ * 0.6.254 closed the LIST level here, where the whole argument is one Promise. This is the other
44
+ * spelling, and it is a different mistake: an ARRAY of them, which is what `.map` over async work
45
+ * produces without `Promise.all`. `recordings.map((r) => validateRecording(r))` is the summary
46
+ * across several files that a batch report wants, and every element of it is pending.
47
+ *
48
+ * `formatDiagnostics` names it one directory over and `mergeChunks` names it per element too —
49
+ * "the value at 1 is a pending Promise, not a chunk". This was the last per-element guard in the
50
+ * package that did not.
51
+ *
52
+ * Said in words, for the reason the checks above give: this module imports one type module and
53
+ * nothing else, and a property read needs nothing.
54
+ */
55
+ if (typeof diagnostic?.then === 'function') {
56
+ throw new RangeError(`summarizeDiagnostics(): the value at ${index} is a pending Promise, so this array was ` +
57
+ 'mapped from async work and never awaited — nothing in this package resolves to a ' +
58
+ 'diagnostic. Next: await the calls first, with Promise.all over the array, and pass the ' +
59
+ 'diagnostics off what they resolved to.');
60
+ }
39
61
  throw new RangeError(`summarizeDiagnostics(): the value at ${index} carries no message, so it is not a ` +
40
62
  'diagnostic — a row of a by-code summary counts a code rather than being one, and counting ' +
41
63
  'those again reports the number of distinct codes as the number of diagnostics. Next: pass ' +
@@ -1 +1 @@
1
- {"version":3,"file":"summary.js","sourceRoot":"","sources":["../../src/diagnostics/summary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA+BH,qEAAqE;AACrE,MAAM,aAAa,GAAgC,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;AAErF;;;;;;;;;;;;;;;GAeG;AACH,SAAS,gBAAgB,CAAC,UAAyB,EAAE,KAAa;IAChE,IAAI,OAAQ,UAAuD,EAAE,OAAO,KAAK,QAAQ;QAAE,OAAO;IAClG,MAAM,IAAI,UAAU,CAClB,wCAAwC,KAAK,sCAAsC;QACjF,4FAA4F;QAC5F,4FAA4F;QAC5F,6EAA6E,CAChF,CAAC;AACJ,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,oBAAoB,CAAC,WAAqC;IACxE,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AE,MAAM,GAAG,MAAM,CAGpD;AAKD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIrD;AA2DD,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAwCpE"}
package/dist/tal/ticks.js CHANGED
@@ -204,6 +204,25 @@ function describeSeconds(seconds) {
204
204
  return `the string ${JSON.stringify(seconds)}`;
205
205
  if (seconds === null)
206
206
  return 'null';
207
+ /*
208
+ * A PENDING PROMISE, which "an object" is true of and says nothing about.
209
+ *
210
+ * `describeValue` names it everywhere else and gives the reason: a forgotten `await` is told
211
+ * "nothing about the one keyword that fixes it". This module cannot reach that helper — it imports
212
+ * `constants.ts` and nothing else, which is the property `AGENTS.md` cites as the point of the
213
+ * layer rule — so it is said here in words, the way `summarizeDiagnostics` said its own in 0.6.254.
214
+ *
215
+ * It is reachable on every time-bounded call in the package. `startSeconds` and `durationSeconds`
216
+ * come from a seek position, a playhead or a stored viewport, and `locate(seconds)` takes one
217
+ * directly — so `readWindow(recording, { signalIndices, startSeconds: seekPosition(), ... })` with
218
+ * an async `seekPosition` is one keyword short, and it was told its bound was "an object", which is
219
+ * true of the window object a reader might have passed instead.
220
+ *
221
+ * A property read, never a call: nothing here awaits, settles or subscribes to anything.
222
+ */
223
+ if (typeof seconds?.then === 'function') {
224
+ return 'a pending Promise';
225
+ }
207
226
  return typeof seconds === 'object' ? 'an object' : `a ${typeof seconds}`;
208
227
  }
209
228
  export function secondsToTicks(seconds, name) {
@@ -1 +1 @@
1
- {"version":3,"file":"ticks.js","sourceRoot":"","sources":["../../src/tal/ticks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAoBnD,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,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,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,OAAO,OAAO,EAAE,CAAC;AAC3E,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,OAAe,EAAE,IAAY;IAC1D,6FAA6F;IAC7F,kGAAkG;IAClG,gDAAgD;IAChD,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QACzD,MAAM,IAAI,UAAU,CAClB,GAAG,IAAI,+CAA+C,eAAe,CAAC,OAAO,CAAC,UAAU;YACtF,kFAAkF;YAClF,0EAA0E,CAC7E,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QAC9B;;;;;;;;;;;;;;;WAeG;QACH,MAAM,IAAI,UAAU,CAClB,GAAG,IAAI,gDAAgD,OAAO,UAAU;YACtE,CAAC,OAAO,KAAK,SAAS;gBACpB,CAAC,CAAC,gFAAgF;oBAChF,iFAAiF;oBACjF,0CAA0C;gBAC5C,CAAC,CAAC,4EAA4E;oBAC5E,oFAAoF;oBACpF,WAAW,CAAC,CACnB,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,sBAAsB,CAAC,CAAC,CAAC;AAC9D,CAAC"}
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,43 @@ 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.6.268
10
+
11
+ - **Fixed** an array of Promises where a diagnostics array belongs being refused as a by-code summary.
12
+ `summarizeDiagnostics(recordings.map((r) => validateRecording(r)))` — the across-several-files
13
+ summary a batch report wants, written without `Promise.all` — got "the value at 0 carries no
14
+ message, so it is not a diagnostic — a row of a by-code summary counts a code rather than being
15
+ one", which names a shape the caller never passed.
16
+ - 0.6.254 closed the list level of this, where the whole argument is one Promise. The array is the
17
+ other spelling and a different mistake: the array is real and every element of it is pending, which
18
+ is what `.map` over async work produces.
19
+ - The advice has to be `Promise.all`, not `await`. One keyword in front of the array does nothing —
20
+ awaiting an array of Promises yields the array of Promises — so this is the one forgotten-await
21
+ family where naming the keyword alone would send a reader somewhere that still fails.
22
+ - `formatDiagnostics` names it one directory over, and `mergeChunks` names it per element too. This
23
+ was the last per-element guard in the package that did not.
24
+ - Said in words rather than through `describeValue`, since this module imports one type module and
25
+ nothing else. The by-code-row sentence is unchanged for the rows it was written for.
26
+
27
+ ## 0.6.267
28
+
29
+ - **Fixed** a time bound that is still a Promise being described as "an object". Every time-bounded
30
+ call converts its seconds through one helper, and that sentence is true of a pending Promise and
31
+ equally true of the window object a reader might have passed instead — so it named nothing about the
32
+ one keyword that fixes it. The advice was wrong for it too: "convert it first — Number(text) for a
33
+ string" is for a value that exists.
34
+ - The route is ordinary. `startSeconds` and `durationSeconds` come from a seek position, a playhead or
35
+ a viewport read back from storage, and `index.locate(seconds)` takes one directly — so
36
+ `readWindow(recording, { signalIndices, startSeconds: seekPosition(), durationSeconds: 10 })` with
37
+ an async `seekPosition` is one keyword short. `trimToWindow` and every window-taking read share it.
38
+ - Said in words rather than through `describeValue`, because `tal/ticks.ts` "imports `constants.ts` and
39
+ nothing else" — the property AGENTS.md cites as the point of the layer rule, and the reason that
40
+ module sits at layer 1 rather than with the rest of `tal/`. `summarizeDiagnostics` closed its own
41
+ copy the same way in 0.6.254: the constraint is about the import, not the sentence.
42
+ - Numbers keep their bare spelling, so `NaN`, `Infinity` and `undefined` still read as themselves and
43
+ still get the advice 0.6.87 wrote for an absent field. A string and a BigInt keep the spellings this
44
+ helper was written for in 0.6.92, and a plain object is still an object.
45
+
9
46
  ## 0.6.266
10
47
 
11
48
  - **Fixed** `fileSource('')` escaping as Node's own `ENOENT: no such file or directory, open ''`. That
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.6.266",
3
+ "version": "0.6.268",
4
4
  "description": "Modern, typed, zero-dependency reader for EDF, EDF+, BDF and BDF+ biosignal files. Works in browsers and Node with true random access.",
5
5
  "keywords": [
6
6
  "edf",
package/src/constants.ts CHANGED
@@ -93,4 +93,4 @@ export const SIGNAL_FIELD_BLOCK_OFFSETS = {
93
93
  } as const;
94
94
 
95
95
  /** Published package version. Kept in sync with package.json by a test. */
96
- export const VERSION = '0.6.266';
96
+ export const VERSION = '0.6.268';
@@ -66,6 +66,30 @@ const SEVERITY_RANK: Record<EdfSeverity, number> = { error: 3, warning: 2, info:
66
66
  */
67
67
  function assertDiagnostic(diagnostic: EdfDiagnostic, index: number): void {
68
68
  if (typeof (diagnostic as { message?: unknown } | null | undefined)?.message === 'string') return;
69
+ /*
70
+ * A PENDING PROMISE, which the sentence below is wrong about twice: it is not a by-code row, and
71
+ * "carries no message" is true of it the way it is true of almost everything.
72
+ *
73
+ * 0.6.254 closed the LIST level here, where the whole argument is one Promise. This is the other
74
+ * spelling, and it is a different mistake: an ARRAY of them, which is what `.map` over async work
75
+ * produces without `Promise.all`. `recordings.map((r) => validateRecording(r))` is the summary
76
+ * across several files that a batch report wants, and every element of it is pending.
77
+ *
78
+ * `formatDiagnostics` names it one directory over and `mergeChunks` names it per element too —
79
+ * "the value at 1 is a pending Promise, not a chunk". This was the last per-element guard in the
80
+ * package that did not.
81
+ *
82
+ * Said in words, for the reason the checks above give: this module imports one type module and
83
+ * nothing else, and a property read needs nothing.
84
+ */
85
+ if (typeof (diagnostic as { then?: unknown } | null | undefined)?.then === 'function') {
86
+ throw new RangeError(
87
+ `summarizeDiagnostics(): the value at ${index} is a pending Promise, so this array was ` +
88
+ 'mapped from async work and never awaited — nothing in this package resolves to a ' +
89
+ 'diagnostic. Next: await the calls first, with Promise.all over the array, and pass the ' +
90
+ 'diagnostics off what they resolved to.',
91
+ );
92
+ }
69
93
  throw new RangeError(
70
94
  `summarizeDiagnostics(): the value at ${index} carries no message, so it is not a ` +
71
95
  'diagnostic — a row of a by-code summary counts a code rather than being one, and counting ' +
package/src/tal/ticks.ts CHANGED
@@ -237,6 +237,25 @@ function describeSeconds(seconds: unknown): string {
237
237
  if (typeof seconds === 'bigint') return `the BigInt ${seconds}n`;
238
238
  if (typeof seconds === 'string') return `the string ${JSON.stringify(seconds)}`;
239
239
  if (seconds === null) return 'null';
240
+ /*
241
+ * A PENDING PROMISE, which "an object" is true of and says nothing about.
242
+ *
243
+ * `describeValue` names it everywhere else and gives the reason: a forgotten `await` is told
244
+ * "nothing about the one keyword that fixes it". This module cannot reach that helper — it imports
245
+ * `constants.ts` and nothing else, which is the property `AGENTS.md` cites as the point of the
246
+ * layer rule — so it is said here in words, the way `summarizeDiagnostics` said its own in 0.6.254.
247
+ *
248
+ * It is reachable on every time-bounded call in the package. `startSeconds` and `durationSeconds`
249
+ * come from a seek position, a playhead or a stored viewport, and `locate(seconds)` takes one
250
+ * directly — so `readWindow(recording, { signalIndices, startSeconds: seekPosition(), ... })` with
251
+ * an async `seekPosition` is one keyword short, and it was told its bound was "an object", which is
252
+ * true of the window object a reader might have passed instead.
253
+ *
254
+ * A property read, never a call: nothing here awaits, settles or subscribes to anything.
255
+ */
256
+ if (typeof (seconds as { then?: unknown } | undefined)?.then === 'function') {
257
+ return 'a pending Promise';
258
+ }
240
259
  return typeof seconds === 'object' ? 'an object' : `a ${typeof seconds}`;
241
260
  }
242
261