edfcore 0.4.456 → 0.4.458

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.4.456";
112
+ export declare const VERSION = "0.4.458";
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.4.456';
82
+ export const VERSION = '0.4.458';
83
83
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../src/inspect.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAUH,OAAO,KAAK,EAAE,UAAU,EAAiB,aAAa,EAAc,WAAW,EAAE,MAAM,YAAY,CAAC;AAgFpG;;;;;;;;;;;GAWG;AACH,wBAAsB,UAAU,CAC9B,MAAM,EAAE,UAAU,EAClB,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,aAAa,CAAC,CAiGxB"}
1
+ {"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../src/inspect.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAUH,OAAO,KAAK,EAAE,UAAU,EAAiB,aAAa,EAAc,WAAW,EAAE,MAAM,YAAY,CAAC;AA6FpG;;;;;;;;;;;GAWG;AACH,wBAAsB,UAAU,CAC9B,MAAM,EAAE,UAAU,EAClB,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,aAAa,CAAC,CAiGxB"}
package/dist/inspect.js CHANGED
@@ -75,6 +75,19 @@ function diagnosticOf(error) {
75
75
  return (formatError.diagnostic ??
76
76
  createDiagnostic({ code: formatError.code, message: formatError.message }));
77
77
  }
78
+ /*
79
+ * Unreachable today, and kept deliberately rather than deleted.
80
+ *
81
+ * `inspectEdf` wraps exactly one call, and every `EdfError` `parseHeader` can throw is an
82
+ * `EdfFormatError`: a `DiagnosticSink` is the only channel a fatal takes, and both `fatal` and
83
+ * `report` construct that class. Its one other throw is a plain `RangeError` for a bad
84
+ * `sourceByteLength`, which is not an `EdfError` and is rethrown a line earlier.
85
+ *
86
+ * It stays because the day a parse-time rule refuses with an `EdfRangeError` or an
87
+ * `EdfSourceError` — a budget check moved earlier, a scaling rule that refuses on the header —
88
+ * this is the arm that has to be here, and a missing one is harder to notice than an idle one.
89
+ * `tests/integration/inspection-failed-guard.test.ts` pins the premise so that stays honest.
90
+ */
78
91
  return createDiagnostic({
79
92
  // Not a format code: the header did not fail its grammar, some other rule refused it. The
80
93
  // code union is open precisely so a case like this does not have to borrow a wrong name.
@@ -1 +1 @@
1
- {"version":3,"file":"inspect.js","sourceRoot":"","sources":["../src/inspect.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAsC,UAAU,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGnE,kFAAkF;AAClF,MAAM,iBAAiB,GAAG,GAAG,GAAG,IA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,CAAC,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC;SACpD,CAAC;IACJ,CAAC;AACH,CAAC"}
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,44 @@ 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.4.458
10
+
11
+ - **Added** tests for a bad HTTP status during a READ, which had never run. `httpSource` reports a
12
+ status from two places and they are different events: the length probe's "could not read" means
13
+ the source never existed, and that one was covered; the one inside a read happens on a source
14
+ that already opened a file, already parsed its header and is part way through a recording.
15
+ - That is the failure this adapter meets most. A signed URL whose expiry passed during a long
16
+ overnight study, a rotated token, a tightened bucket policy, a 500 from an origin behind a CDN —
17
+ all of them are mid-read statuses, and the message is written for that reader specifically: it
18
+ names the byte range being fetched and ends by asking about authentication headers and expiry,
19
+ neither of which means anything for a URL that never worked.
20
+ - Three statuses are checked because the status is quoted rather than classified. edfcore has no
21
+ opinion about which 4xx or 5xx means what, and a reader matching the message against an access
22
+ log needs the number the server actually sent.
23
+ - Also pinned: a failed read leaves no state behind. Without that case, every assertion here would
24
+ pass on an implementation that latched the first failure and refused every read afterwards —
25
+ which for a renewed token is the difference between a retry that works and a source that is
26
+ finished.
27
+
28
+ ## 0.4.457
29
+
30
+ - **Documented** `INSPECTION_FAILED` as unreachable today, and added the test that keeps that
31
+ statement honest.
32
+ - `diagnosticOf` in `inspect.ts` has two arms: an `EdfFormatError` becomes the diagnostic it is
33
+ already carrying, and anything else becomes `INSPECTION_FAILED`. Nothing can reach the second.
34
+ `inspectEdf` wraps exactly one call, and every `EdfError` `parseHeader` throws is an
35
+ `EdfFormatError` — a `DiagnosticSink` is the only channel a fatal takes, and both `fatal` and
36
+ `report` construct that class. Its one other throw is a plain `RangeError`, rethrown a line
37
+ earlier.
38
+ - Kept rather than deleted, for the reason `validate.ts` gives about its own idle date check: the
39
+ day a parse-time rule refuses with an `EdfRangeError` or an `EdfSourceError`, this is the arm
40
+ that has to be there, and a missing guard is harder to notice than an idle one.
41
+ - The new test checks the premise structurally — no module the parse reaches constructs and throws
42
+ an `EdfError` directly — and `header/lookup.ts`, which is on the graph and does throw two channel
43
+ errors, is exempted by a check rather than by name: the only binding anything on the parse path
44
+ imports from it is `isAnnotationLabel`, a pure predicate. An import of `getSignal` added there
45
+ fails the test, in the same commit that would make this code reachable.
46
+
9
47
  ## 0.4.456
10
48
 
11
49
  - **Added** a test for the line that divides the two kinds of failure inside `inspectEdf`: the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.4.456",
3
+ "version": "0.4.458",
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.4.456';
96
+ export const VERSION = '0.4.458';
package/src/inspect.ts CHANGED
@@ -79,6 +79,19 @@ function diagnosticOf(error: EdfError): EdfDiagnostic {
79
79
  createDiagnostic({ code: formatError.code, message: formatError.message })
80
80
  );
81
81
  }
82
+ /*
83
+ * Unreachable today, and kept deliberately rather than deleted.
84
+ *
85
+ * `inspectEdf` wraps exactly one call, and every `EdfError` `parseHeader` can throw is an
86
+ * `EdfFormatError`: a `DiagnosticSink` is the only channel a fatal takes, and both `fatal` and
87
+ * `report` construct that class. Its one other throw is a plain `RangeError` for a bad
88
+ * `sourceByteLength`, which is not an `EdfError` and is rethrown a line earlier.
89
+ *
90
+ * It stays because the day a parse-time rule refuses with an `EdfRangeError` or an
91
+ * `EdfSourceError` — a budget check moved earlier, a scaling rule that refuses on the header —
92
+ * this is the arm that has to be here, and a missing one is harder to notice than an idle one.
93
+ * `tests/integration/inspection-failed-guard.test.ts` pins the premise so that stays honest.
94
+ */
82
95
  return createDiagnostic({
83
96
  // Not a format code: the header did not fail its grammar, some other rule refused it. The
84
97
  // code union is open precisely so a case like this does not have to borrow a wrong name.