edfcore 0.4.455 → 0.4.457
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.
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/inspect.d.ts.map +1 -1
- package/dist/inspect.js +13 -0
- package/dist/inspect.js.map +1 -1
- package/docs/CHANGELOG.md +36 -0
- package/package.json +1 -1
- package/src/constants.ts +1 -1
- package/src/inspect.ts +13 -0
package/dist/constants.d.ts
CHANGED
|
@@ -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.
|
|
112
|
+
export declare const VERSION = "0.4.457";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
package/dist/inspect.d.ts.map
CHANGED
|
@@ -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;
|
|
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.
|
package/dist/inspect.js.map
CHANGED
|
@@ -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,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ACT,OAAO,EAAE,WAAW,CAAC,WAAW,CAAC;YACjC,MAAM,EAAE,SAAS;YACjB,UAAU;YACV,SAAS;YACT,WAAW;YACX,yFAAyF;YACzF,6EAA6E;YAC7E,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC;SACpD,CAAC;IACJ,CAAC;AACH,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.4.457
|
|
10
|
+
|
|
11
|
+
- **Documented** `INSPECTION_FAILED` as unreachable today, and added the test that keeps that
|
|
12
|
+
statement honest.
|
|
13
|
+
- `diagnosticOf` in `inspect.ts` has two arms: an `EdfFormatError` becomes the diagnostic it is
|
|
14
|
+
already carrying, and anything else becomes `INSPECTION_FAILED`. Nothing can reach the second.
|
|
15
|
+
`inspectEdf` wraps exactly one call, and every `EdfError` `parseHeader` throws is an
|
|
16
|
+
`EdfFormatError` — a `DiagnosticSink` is the only channel a fatal takes, and both `fatal` and
|
|
17
|
+
`report` construct that class. Its one other throw is a plain `RangeError`, rethrown a line
|
|
18
|
+
earlier.
|
|
19
|
+
- Kept rather than deleted, for the reason `validate.ts` gives about its own idle date check: the
|
|
20
|
+
day a parse-time rule refuses with an `EdfRangeError` or an `EdfSourceError`, this is the arm
|
|
21
|
+
that has to be there, and a missing guard is harder to notice than an idle one.
|
|
22
|
+
- The new test checks the premise structurally — no module the parse reaches constructs and throws
|
|
23
|
+
an `EdfError` directly — and `header/lookup.ts`, which is on the graph and does throw two channel
|
|
24
|
+
errors, is exempted by a check rather than by name: the only binding anything on the parse path
|
|
25
|
+
imports from it is `isAnnotationLabel`, a pure predicate. An import of `getSignal` added there
|
|
26
|
+
fails the test, in the same commit that would make this code reachable.
|
|
27
|
+
|
|
28
|
+
## 0.4.456
|
|
29
|
+
|
|
30
|
+
- **Added** a test for the line that divides the two kinds of failure inside `inspectEdf`: the
|
|
31
|
+
`if (!isEdfError(error)) throw error` at the top of its `catch`.
|
|
32
|
+
- A defect in the file is reported, never thrown — that is what triage is for, and it is well
|
|
33
|
+
covered. A mistake in the ARGUMENTS has to stay a throw, and nothing in the suite had ever
|
|
34
|
+
thrown a non-`EdfError` out of `parseHeader`, so the rethrow never ran. Replacing it with a
|
|
35
|
+
`return` failed nothing.
|
|
36
|
+
- The cost of losing it is specific. `EdfInspection` carries no field meaning "the arguments were
|
|
37
|
+
wrong", so a swallowed `RangeError` comes back as `ok: false` with a diagnostic list blaming
|
|
38
|
+
the file for a number the caller supplied.
|
|
39
|
+
- The reachable caller bug is a `ByteSource` reporting a `byteLength` past 2^53 — a hand-written
|
|
40
|
+
adapter over a paged API, or a `Content-Range` nobody checked. `assertByteSource` accepts it
|
|
41
|
+
because it is a number, and `parseHeader` refuses it because it cannot be a byte count. The
|
|
42
|
+
test asserts `isEdfError` is false on what comes back, since that is the predicate the
|
|
43
|
+
documented `catch` recipe branches on.
|
|
44
|
+
|
|
9
45
|
## 0.4.455
|
|
10
46
|
|
|
11
47
|
- **Fixed** a test that refused what it was named after by accident. `timeline.test.ts` listed
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
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.
|