edfcore 0.6.213 → 0.6.214

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.213";
112
+ export declare const VERSION = "0.6.214";
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.213';
82
+ export const VERSION = '0.6.214';
83
83
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
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,CAmBpD;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"}
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,CAwCpD;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,28 @@ 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 PENDING PROMISE, which is the one object worth naming.
43
+ *
44
+ * `assertRecording` made the argument in 0.6.89 and coined the phrase: a forgotten `await` "passes
45
+ * the pending Promise `openEdf` returns", and a message that names an internal field instead says
46
+ * "nothing about the one keyword that fixes it". It then named it for the recording alone.
47
+ *
48
+ * Five async calls in this package resolve to values other guards take: `readHeader` to a header,
49
+ * `buildRecordIndex` to an index, `readWindow` to the chunk array, `validateRecording` to a report,
50
+ * `readAnnotations` to a result. So `formatHeader(readHeader(source))`,
51
+ * `mergeChunks(readWindow(recording, selection))` and `contiguityOf(buildRecordIndex(recording))`
52
+ * are all one keyword short — and every one of them was told it had passed "an object", which is
53
+ * true of the thing they meant to pass too.
54
+ *
55
+ * Named here rather than at each guard, because this is the module whose whole subject is a value
56
+ * "said in a way that cannot read as an accepted one", and roughly forty messages read their
57
+ * subject out of it.
58
+ *
59
+ * A property read, never a call: nothing here awaits, settles or subscribes to anything.
60
+ */
61
+ if (typeof value.then === 'function')
62
+ return 'a pending Promise';
41
63
  // `an object` covers an array too: a reader who passed one knows which they passed, and printing
42
64
  // its contents is how a 512-signal selection ends up on one line behind `edfcore: `.
43
65
  return typeof value === 'object' ? 'an object' : `a ${typeof value}`;
@@ -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,KA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,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,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC;AAC5F,CAAC"}
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,21 @@ 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.214
10
+
11
+ - **Fixed** a forgotten `await` being described as "an object". 0.6.89 made the argument for the
12
+ recording and coined the phrase — a message that names an internal field says "nothing about the
13
+ one keyword that fixes it" — and `assertRecording` was the only guard that said "a pending
14
+ Promise".
15
+ - Five async calls here resolve to values other guards take: `readHeader` to a header,
16
+ `buildRecordIndex` to an index, `readWindow` to the chunk array, `validateRecording` to a report,
17
+ `readAnnotations` to a result. So `mergeChunks(readWindow(recording, selection))` and
18
+ `contiguityOf(buildRecordIndex(recording))` are one keyword short, and each was told it had passed
19
+ "an object" — which is true of the thing it meant to pass too.
20
+ - Named in `describeValue`, the module whose subject is a value "said in a way that cannot read as an
21
+ accepted one", so roughly forty messages get it at once. A property read, never a call: nothing
22
+ awaits, settles or subscribes to anything.
23
+
9
24
  ## 0.6.213
10
25
 
11
26
  - **Fixed** `EdfRangeError.requested` carrying whatever was refused. The field is declared a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.6.213",
3
+ "version": "0.6.214",
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.213';
96
+ export const VERSION = '0.6.214';
@@ -34,6 +34,27 @@ 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 PENDING PROMISE, which is the one object worth naming.
39
+ *
40
+ * `assertRecording` made the argument in 0.6.89 and coined the phrase: a forgotten `await` "passes
41
+ * the pending Promise `openEdf` returns", and a message that names an internal field instead says
42
+ * "nothing about the one keyword that fixes it". It then named it for the recording alone.
43
+ *
44
+ * Five async calls in this package resolve to values other guards take: `readHeader` to a header,
45
+ * `buildRecordIndex` to an index, `readWindow` to the chunk array, `validateRecording` to a report,
46
+ * `readAnnotations` to a result. So `formatHeader(readHeader(source))`,
47
+ * `mergeChunks(readWindow(recording, selection))` and `contiguityOf(buildRecordIndex(recording))`
48
+ * are all one keyword short — and every one of them was told it had passed "an object", which is
49
+ * true of the thing they meant to pass too.
50
+ *
51
+ * Named here rather than at each guard, because this is the module whose whole subject is a value
52
+ * "said in a way that cannot read as an accepted one", and roughly forty messages read their
53
+ * subject out of it.
54
+ *
55
+ * A property read, never a call: nothing here awaits, settles or subscribes to anything.
56
+ */
57
+ if (typeof (value as { then?: unknown }).then === 'function') return 'a pending Promise';
37
58
  // `an object` covers an array too: a reader who passed one knows which they passed, and printing
38
59
  // its contents is how a 512-signal selection ends up on one line behind `edfcore: `.
39
60
  return typeof value === 'object' ? 'an object' : `a ${typeof value}`;