edfcore 0.4.468 → 0.4.470

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.468";
112
+ export declare const VERSION = "0.4.470";
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.468';
82
+ export const VERSION = '0.4.470';
83
83
  //# sourceMappingURL=constants.js.map
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,45 @@ 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.470
10
+
11
+ - **Added** process-level tests for `cli.ts`'s failure handling. Every other CLI test drives
12
+ `runCli` through an injected `CliIo`, which is deliberate and is why they run without a build;
13
+ it also means the shell around it — argv, the exit code, the real streams, and the one
14
+ `readFile` in the package that is not a `ByteSource` — was reached only by `cli-pipe.test.ts`,
15
+ for EPIPE alone. Three promises had nothing checking them.
16
+ - A DIRECTORY is named as one. Node answers `fs.readFile` with `EISDIR: illegal operation on a
17
+ directory, read`, an errno with no path in it and no move to make; `fileSource` was fixed for
18
+ this in 0.3.98 and the CLI, which reads the file itself, in 0.4.178. Removing that translation
19
+ failed nothing. `ENOENT` is asserted to pass through unchanged, because Node's own text already
20
+ names the path and replacing it would be worse.
21
+ - The EXIT CODE separates a typo from a bad file: 2 for a `CliUsageError`, 1 for anything else.
22
+ `documented-exit-codes.test.ts` pins what `runCli` returns; the mapping from a THROWN error to a
23
+ code lives in a `catch` no injected `CliIo` can reach, and collapsing both to 1 was invisible.
24
+ - And a failure is one line. An `EdfError` already says what is wrong, where and what to do next,
25
+ so a stack trace over the top of it buries the only useful line — asserted by matching for a
26
+ run of ` at ` frames on both a directory and a truncated file.
27
+ - Skips when `dist/` is absent, for the same reason `cli-pipe.test.ts` does: spawning is the only
28
+ way to run any of this, and a pass nobody earned is worse than a skip.
29
+
30
+ ## 0.4.469
31
+
32
+ - **Added** the cases where a 206's `Content-Range` cannot be parsed at all. edfcore checks that
33
+ header against the range it asked for, because `assertExactRead` is a length guard and cannot
34
+ see a right-sized body taken from the wrong offset — but `rangeFromContentRange` returns
35
+ `undefined` for anything outside `bytes <first>-<last>/`, and `undefined` means "no usable
36
+ claim", not "the claim was wrong".
37
+ - Every existing case supplied a well-formed header or none at all, so the two `return undefined`
38
+ lines in the middle had never run. Turning either into a refusal would reject reads that are
39
+ fine, from servers that are behaving within RFC 7233.
40
+ - Four shapes reach them and all four occur: a range unit that is not `bytes`, the unsatisfiable
41
+ `bytes */total` form, a header truncated before the total, and byte positions past 2^53 from a
42
+ proxy in front of an object store that counts in something else. A `FetchLike` double answering
43
+ every header with `null` is the fifth, and is the reason the rule is written this way.
44
+ - The non-vacuous half is asserted on both sides of them: a header that DOES parse and names a
45
+ different part of the resource is still refused, and a short body behind an unreadable header is
46
+ still caught by length. "Unreadable" has not become "unchecked".
47
+
9
48
  ## 0.4.468
10
49
 
11
50
  - **Added** tests for the half of `redactDiagnostic` that had never been asked: what happens to a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.4.468",
3
+ "version": "0.4.470",
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.468';
96
+ export const VERSION = '0.4.470';