edfcore 0.6.268 → 0.6.270

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.268";
112
+ export declare const VERSION = "0.6.270";
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.268';
82
+ export const VERSION = '0.6.270';
83
83
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"format-report.d.ts","sourceRoot":"","sources":["../src/format-report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAOH,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAKnF;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,gBAAgB,EACxB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,MAAM,CAsMR;AAED,qFAAqF;AACrF,YAAY,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"format-report.d.ts","sourceRoot":"","sources":["../src/format-report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAOH,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAKnF;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,gBAAgB,EACxB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,MAAM,CA4NR;AAED,qFAAqF;AACrF,YAAY,EAAE,SAAS,EAAE,CAAC"}
@@ -107,6 +107,26 @@ export function formatValidationReport(report, options) {
107
107
  const named = Array.isArray(signals) &&
108
108
  (signals.length === 0 || typeof signals[0]?.label === 'string');
109
109
  if (!named) {
110
+ /*
111
+ * A FORGOTTEN AWAIT, which the sweep across 0.6.229–0.6.239 reached every header-taking CALL
112
+ * for and no header-taking OPTION. This is the only one: `options.header` is the one field in
113
+ * the package that holds a header, so it is the one place that sweep could not have covered by
114
+ * walking the entry points.
115
+ *
116
+ * `{ header: readHeader(source) }` is how it gets written, because this option "is also the
117
+ * one a caller adds last, to a call that already worked" — and the call it is added to is
118
+ * already `await`-ed, so the keyword is in the line and in the wrong place. "Nothing on it
119
+ * carries the labels" is true of a pending Promise and of almost everything else, and the
120
+ * advice names a field on a recording a caller holding a bare header may not have.
121
+ *
122
+ * A property read, never a call.
123
+ */
124
+ if (typeof options.header?.then === 'function') {
125
+ throw new RangeError('formatValidationReport(): options.header is a pending Promise — readHeader(source) is ' +
126
+ 'async, so the header is what it resolves to rather than what it returns. Next: await ' +
127
+ 'it once into a variable and put that on the option, or pass recording.header, which ' +
128
+ 'is already resolved.');
129
+ }
110
130
  throw new RangeError('formatValidationReport(): options.header is not a header — nothing on it carries the ' +
111
131
  'labels this names the rows with, which is all this option does. Next: pass ' +
112
132
  'recording.header, or omit it and the rows read `signal 0`.');
@@ -1 +1 @@
1
- {"version":3,"file":"format-report.js","sourceRoot":"","sources":["../src/format-report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGhD,+EAA+E;AAC/E,MAAM,iBAAiB,G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CACjC,KAAK,EAAE;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,GAC/E,MAAM,CAER"}
1
+ {"version":3,"file":"describe.d.ts","sourceRoot":"","sources":["../../src/text/describe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,iGAAiG;AACjG,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CA2DpD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,GAC/E,MAAM,CAER"}
@@ -38,6 +38,25 @@ export function describeValue(value) {
38
38
  if (ArrayBuffer.isView(value) || value instanceof ArrayBuffer) {
39
39
  return Object.prototype.toString.call(value).slice(8, -1);
40
40
  }
41
+ /*
42
+ * A REGEXP, by the same tag, for the same reason, in the place it is likeliest to turn up.
43
+ *
44
+ * `a-pattern-where-a-label-belongs.test.ts` makes the argument: `matchSignals` takes a pattern and
45
+ * `findSignals` takes a label, and "a montage selector is more often a pattern than an exact
46
+ * label" — so a RegExp handed to the label-matching half is the commoner of the two spellings of
47
+ * that confusion. The guard's advice already names the kind, "matchSignals(header, pattern) for a
48
+ * RegExp or a predicate", while the subject called it "an object" and left the reader to work out
49
+ * that the object they passed was one.
50
+ *
51
+ * A predicate needs nothing here: `typeof` answers `function` and the message says so. A RegExp is
52
+ * the only matcher `typeof` flattens into `object`.
53
+ *
54
+ * `String(value)` is the source as written — `/EEG/i` — which is the whole of what a reader needs
55
+ * to recognise it, and it is a pattern they typed rather than data read out of a file.
56
+ */
57
+ if (Object.prototype.toString.call(value) === '[object RegExp]') {
58
+ return `the RegExp ${String(value)}`;
59
+ }
41
60
  /*
42
61
  * A PENDING PROMISE, which is the one object worth naming.
43
62
  *
@@ -1 +1 @@
1
- {"version":3,"file":"describe.js","sourceRoot":"","sources":["../../src/text/describe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,iGAAiG;AACjG,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACpD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,cAAc,KAAK,GAAG,CAAC;IAC7D,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,cAAc,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;IAC5E,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,MAAM,CAAC;IAClC,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,WAAW,CAAC;IAC5C;;;;;;OAMG;IACH,IAAI,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,YAAY,WAAW,EAAE,CAAC;QAC9D,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5D,CAAC;IACD;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,OAAQ,KAA4B,CAAC,IAAI,KAAK,UAAU;QAAE,OAAO,mBAAmB,CAAC;IACzF,iGAAiG;IACjG,qFAAqF;IACrF,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,OAAO,KAAK,EAAE,CAAC;AACvE,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,mBAAmB,CACjC,KAAgF;IAEhF,OAAO,YAAY,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,aAA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,KAAK,OAAO,KAAK,EAAE,CAAC;AACvE,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,mBAAmB,CACjC,KAAgF;IAEhF,OAAO,YAAY,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,YAAY,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC;AAC5F,CAAC"}
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,42 @@ 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.270
10
+
11
+ - **Fixed** `formatValidationReport(report, { header: readHeader(source) })` being told "options.header
12
+ is not a header — nothing on it carries the labels this names the rows with". True of a pending
13
+ Promise, and of a chunk, a recording, a number and `{}`.
14
+ - The forgotten-await sweep of 0.6.229–0.6.239 reached every published call that takes a header, and
15
+ 0.6.238 recorded it as closed: "every header-taking call now names the keyword". That was true of
16
+ the arguments. `options.header` is the one field in the package that holds a header, so it is the
17
+ one place a sweep over entry points could not reach by walking their parameters.
18
+ - It is also where the keyword is likeliest to be on screen already and in the wrong place. This
19
+ option "is the one a caller adds last, to a call that already worked", and that call is awaited — so
20
+ a reader writing `{ header: readHeader(source) }` has an `await` in the line and no reason to look
21
+ at it.
22
+ - The old advice named `recording.header`, which a caller holding the bare header `readHeader` hands
23
+ back does not have. The new one says to await it once into a variable.
24
+ - The existing sentence is unchanged for the shapes it was written for — a chunk, whose `signals`
25
+ entries carry samples rather than labels, is the case 0.6.183 and 0.6.186 settled this rule for.
26
+
27
+ ## 0.6.269
28
+
29
+ - **Fixed** a RegExp being described as "an object" by the guards that refuse one. `typeof` answers
30
+ `object` for a RegExp and `function` for a predicate, so of the two kinds of matcher this package
31
+ accepts, exactly one was flattened into the word every wrong value shares — while the same
32
+ sentence's advice already named the kind: "matchSignals(header, pattern) for a RegExp or a
33
+ predicate".
34
+ - It is the spelling worth naming. `a-pattern-where-a-label-belongs.test.ts` states why: `matchSignals`
35
+ takes a pattern and `findSignals` takes a label, and "a montage selector is more often a pattern
36
+ than an exact label" — so the RegExp handed to the label-matching half is the commoner of the two,
37
+ and it was the one whose message could not say what had arrived.
38
+ - Named by its built-in tag, which `describe.ts` already uses for a binary value "because that IS the
39
+ mistake wherever one turns up", and 0.6.256 applied to a typed array. The tag rather than
40
+ `instanceof`, because it is the same across realms.
41
+ - The pattern is printed as written, flags and all — `the RegExp /EEG Fp1/i` — which is what a reader
42
+ needs to recognise something they typed. Every other spelling is unchanged, including a plain
43
+ object, an array and a `Map`, and the calls that genuinely take a pattern still take one.
44
+
9
45
  ## 0.6.268
10
46
 
11
47
  - **Fixed** an array of Promises where a diagnostics array belongs being refused as a by-code summary.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.6.268",
3
+ "version": "0.6.270",
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.268';
96
+ export const VERSION = '0.6.270';
@@ -121,6 +121,28 @@ export function formatValidationReport(
121
121
  Array.isArray(signals) &&
122
122
  (signals.length === 0 || typeof (signals[0] as { label?: unknown })?.label === 'string');
123
123
  if (!named) {
124
+ /*
125
+ * A FORGOTTEN AWAIT, which the sweep across 0.6.229–0.6.239 reached every header-taking CALL
126
+ * for and no header-taking OPTION. This is the only one: `options.header` is the one field in
127
+ * the package that holds a header, so it is the one place that sweep could not have covered by
128
+ * walking the entry points.
129
+ *
130
+ * `{ header: readHeader(source) }` is how it gets written, because this option "is also the
131
+ * one a caller adds last, to a call that already worked" — and the call it is added to is
132
+ * already `await`-ed, so the keyword is in the line and in the wrong place. "Nothing on it
133
+ * carries the labels" is true of a pending Promise and of almost everything else, and the
134
+ * advice names a field on a recording a caller holding a bare header may not have.
135
+ *
136
+ * A property read, never a call.
137
+ */
138
+ if (typeof (options.header as { then?: unknown } | null | undefined)?.then === 'function') {
139
+ throw new RangeError(
140
+ 'formatValidationReport(): options.header is a pending Promise — readHeader(source) is ' +
141
+ 'async, so the header is what it resolves to rather than what it returns. Next: await ' +
142
+ 'it once into a variable and put that on the option, or pass recording.header, which ' +
143
+ 'is already resolved.',
144
+ );
145
+ }
124
146
  throw new RangeError(
125
147
  'formatValidationReport(): options.header is not a header — nothing on it carries the ' +
126
148
  'labels this names the rows with, which is all this option does. Next: pass ' +
@@ -34,6 +34,25 @@ export function describeValue(value: unknown): string {
34
34
  if (ArrayBuffer.isView(value) || value instanceof ArrayBuffer) {
35
35
  return Object.prototype.toString.call(value).slice(8, -1);
36
36
  }
37
+ /*
38
+ * A REGEXP, by the same tag, for the same reason, in the place it is likeliest to turn up.
39
+ *
40
+ * `a-pattern-where-a-label-belongs.test.ts` makes the argument: `matchSignals` takes a pattern and
41
+ * `findSignals` takes a label, and "a montage selector is more often a pattern than an exact
42
+ * label" — so a RegExp handed to the label-matching half is the commoner of the two spellings of
43
+ * that confusion. The guard's advice already names the kind, "matchSignals(header, pattern) for a
44
+ * RegExp or a predicate", while the subject called it "an object" and left the reader to work out
45
+ * that the object they passed was one.
46
+ *
47
+ * A predicate needs nothing here: `typeof` answers `function` and the message says so. A RegExp is
48
+ * the only matcher `typeof` flattens into `object`.
49
+ *
50
+ * `String(value)` is the source as written — `/EEG/i` — which is the whole of what a reader needs
51
+ * to recognise it, and it is a pattern they typed rather than data read out of a file.
52
+ */
53
+ if (Object.prototype.toString.call(value) === '[object RegExp]') {
54
+ return `the RegExp ${String(value)}`;
55
+ }
37
56
  /*
38
57
  * A PENDING PROMISE, which is the one object worth naming.
39
58
  *