edfcore 0.6.285 → 0.6.286

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.
@@ -1 +1 @@
1
- {"version":3,"file":"annotations-query.d.ts","sourceRoot":"","sources":["../src/annotations-query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAmDrE;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,SAAS,aAAa,EAAE,EACrC,MAAM,EAAE,mBAAmB,GAC1B,SAAS,aAAa,EAAE,CA6E1B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,SAAS,aAAa,EAAE,EACrC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,GACnD,SAAS,aAAa,EAAE,CA8C1B;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,SAAS,aAAa,EAAE,GACpC,aAAa,CAAC;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CASlE;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,WAAW,EAAE,SAAS,aAAa,EAAE,EACrC,OAAO,EAAE,MAAM,GACd,SAAS,aAAa,EAAE,CA2B1B"}
1
+ {"version":3,"file":"annotations-query.d.ts","sourceRoot":"","sources":["../src/annotations-query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAmDrE;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,SAAS,aAAa,EAAE,EACrC,MAAM,EAAE,mBAAmB,GAC1B,SAAS,aAAa,EAAE,CA6E1B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,SAAS,aAAa,EAAE,EACrC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,GACnD,SAAS,aAAa,EAAE,CAwD1B;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,SAAS,aAAa,EAAE,GACpC,aAAa,CAAC;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CASlE;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,WAAW,EAAE,SAAS,aAAa,EAAE,EACrC,OAAO,EAAE,MAAM,GACd,SAAS,aAAa,EAAE,CA2B1B"}
@@ -18,7 +18,7 @@
18
18
  * one puts events in the neighbouring window on exactly the files that bother to state their
19
19
  * offset.
20
20
  */
21
- import { assertMatcher, matchesText } from './header/lookup.js';
21
+ import { assertMatcher, isRegExpMatcher, matchesText } from './header/lookup.js';
22
22
  import { secondsToTicks } from './tal/ticks.js';
23
23
  import { describeValue } from './text/describe.js';
24
24
  /**
@@ -166,9 +166,19 @@ export function filterAnnotationsByText(annotations, match) {
166
166
  assertAnnotations(annotations, 'filterAnnotationsByText');
167
167
  const test = typeof match === 'string'
168
168
  ? (text) => text === match
169
- : match instanceof RegExp
169
+ : isRegExpMatcher(match)
170
170
  ? // Not `match.test` directly: a `g` or `y` flag makes `test` stateful across the array
171
171
  // and silently returns about half the true matches. See `matchesText`.
172
+ //
173
+ // `isRegExpMatcher`, not `instanceof RegExp`, which was false for a pattern built in
174
+ // another realm — an iframe, a worker, an Electron contextBridge, jsdom, a Node `vm`
175
+ // context. 0.6.285 fixed the same dispatch in `matchSignals` and has the argument; this
176
+ // is the second of the two calls that share the rule, and the likelier of them to be
177
+ // running inside a worker, since narrowing a hypnogram to its stages is the work a viewer
178
+ // moves off the main thread. A cross-realm `/stage/i` was refused as "the matcher is the
179
+ // RegExp /stage/i, and this call takes a string matched verbatim, a RegExp, or a
180
+ // predicate on the text" — a sentence whose rule the argument satisfies, from a guard
181
+ // whose subject `describeValue` had already read off the same tag (0.6.286).
172
182
  matchesText(match)
173
183
  : assertMatcher(match, 'filterAnnotationsByText', 'a string matched verbatim, a RegExp, or a predicate on the text', 'pass the label as a string, or (text) => text.trim() === label for a file whose ' +
174
184
  'vocabulary is padded');
@@ -1 +1 @@
1
- {"version":3,"file":"annotations-query.js","sourceRoot":"","sources":["../src/annotations-query.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD;;;;;;;;;;;;GAYG;AACH,SAAS,iBAAiB,CAAC,WAAqC,EAAE,IAAY;IAC5E,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,UAAU,CAClB,GAAG,IAAI,2BAA2B,aAAa,CAAC,WAAW,CAAC,iCAAiC;YAC3F,0FAA0F;YAC1F,4CAA4C,CAC/C,CAAC;IACJ,CAAC;IACD;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,KAAK,GAAG,WAAW,CAAC,CAAC,CAAwD,CAAC;IACpF,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,KAAK,EAAE,yBAAyB,KAAK,QAAQ;QAAE,OAAO;IAC7F,MAAM,IAAI,UAAU,CAClB,GAAG,IAAI,wFAAwF;QAC7F,8FAA8F;QAC9F,8FAA8F;QAC9F,8DAA8D,CACjE,CAAC;AACJ,C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C,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzE,IAAI,cAAc,IAAI,KAAK,IAAI,iBAAiB,IAAI,KAAK,EAAE,CAAC;YAC1D,MAAM,IAAI,UAAU,CAClB,2FAA2F;gBACzF,yEAAyE;gBACzE,wFAAwF,CAC3F,CAAC;QACJ,CAAC;IACH,CAAC;IACD,MAAM,EAAE,GAAG,cAAc,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAC9C,OAAO,MAAM,CAAC,MAAM,CAClB,WAAW,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE;QAChC,MAAM,KAAK,GAAG,UAAU,CAAC,yBAAyB,CAAC;QACnD,MAAM,QAAQ,GAAG,UAAU,CAAC,aAAa,IAAI,EAAE,CAAC;QAChD,OAAO,QAAQ,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,IAAI,EAAE,GAAG,KAAK,GAAG,QAAQ,CAAC;IAC/E,CAAC,CAAC,CACH,CAAC;AACJ,CAAC"}
@@ -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.285";
112
+ export declare const VERSION = "0.6.286";
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.285';
82
+ export const VERSION = '0.6.286';
83
83
  //# sourceMappingURL=constants.js.map
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,19 @@ 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.286
10
+
11
+ - **Fixed** the second of the two calls that dispatched on `match instanceof RegExp`.
12
+ `filterAnnotationsByText` refused a RegExp built in another realm the same way `matchSignals` did
13
+ before 0.6.285 — "the matcher is the RegExp /stage/i, and this call takes a string matched
14
+ verbatim, a RegExp, or a predicate on the text" — naming the kind it had just refused, because
15
+ `describeValue` reads the built-in tag the dispatch would not.
16
+ - This is the likelier of the two to be running across a realm boundary. `annotations-query.ts` is
17
+ Layer 7 and pure, so narrowing a hypnogram to its stages is work a viewer can move into a worker,
18
+ and the pattern is then built there.
19
+ - The verbatim-string and predicate forms were never affected: `typeof` is realm-agnostic. Both calls
20
+ now share `isRegExpMatcher`.
21
+
9
22
  ## 0.6.285
10
23
 
11
24
  - **Fixed** `matchSignals` refusing a RegExp built in another realm — an iframe, a worker, an Electron
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.6.285",
3
+ "version": "0.6.286",
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",
@@ -19,7 +19,7 @@
19
19
  * offset.
20
20
  */
21
21
 
22
- import { assertMatcher, matchesText } from './header/lookup.js';
22
+ import { assertMatcher, isRegExpMatcher, matchesText } from './header/lookup.js';
23
23
  import { secondsToTicks } from './tal/ticks.js';
24
24
  import { describeValue } from './text/describe.js';
25
25
  import type { EdfAnnotation, EdfAnnotationWindow } from './types.js';
@@ -187,9 +187,19 @@ export function filterAnnotationsByText(
187
187
  const test =
188
188
  typeof match === 'string'
189
189
  ? (text: string): boolean => text === match
190
- : match instanceof RegExp
190
+ : isRegExpMatcher(match)
191
191
  ? // Not `match.test` directly: a `g` or `y` flag makes `test` stateful across the array
192
192
  // and silently returns about half the true matches. See `matchesText`.
193
+ //
194
+ // `isRegExpMatcher`, not `instanceof RegExp`, which was false for a pattern built in
195
+ // another realm — an iframe, a worker, an Electron contextBridge, jsdom, a Node `vm`
196
+ // context. 0.6.285 fixed the same dispatch in `matchSignals` and has the argument; this
197
+ // is the second of the two calls that share the rule, and the likelier of them to be
198
+ // running inside a worker, since narrowing a hypnogram to its stages is the work a viewer
199
+ // moves off the main thread. A cross-realm `/stage/i` was refused as "the matcher is the
200
+ // RegExp /stage/i, and this call takes a string matched verbatim, a RegExp, or a
201
+ // predicate on the text" — a sentence whose rule the argument satisfies, from a guard
202
+ // whose subject `describeValue` had already read off the same tag (0.6.286).
193
203
  matchesText(match)
194
204
  : assertMatcher(
195
205
  match,
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.285';
96
+ export const VERSION = '0.6.286';