edfcore 0.5.36 → 0.5.37

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.5.36";
112
+ export declare const VERSION = "0.5.37";
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.5.36';
82
+ export const VERSION = '0.5.37';
83
83
  //# sourceMappingURL=constants.js.map
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,28 @@ 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.5.37
10
+
11
+ - **Added** the safety property for the CLI. `fuzz.test.ts` states it for the library — for any byte
12
+ sequence, edfcore either parses it or throws an `EdfError`, never a bare `TypeError`, never a
13
+ hang, never believable garbage. The CLI is a second surface over the same parser, with its own
14
+ formatting, six commands and exit codes, and nothing had ever pointed it at bytes nobody chose.
15
+ Every CLI test in the suite feeds it a file written to make a point.
16
+ - That matters because of how `cli.ts` ends. `main()` catches everything and reports
17
+ `edfcore: ${error.message}` with exit 1, so a `TypeError` escaping `runCli` does not crash — it
18
+ arrives as a line with no code, no byte offset and no `Next:` clause, wearing the prefix a real
19
+ diagnostic wears. The failure is indistinguishable from a working refusal unless something checks
20
+ the class.
21
+ - Two properties now run over ~1,300 cases — random bytes, single-bit flips of a good file,
22
+ truncation at every length, and each header and per-signal field replaced with something that
23
+ breaks it. Every rejection is an `EdfError` whose message opens with a bracketed code and ends
24
+ with a `Next:` clause. And nothing reaches stdout before a rejection, so
25
+ `edfcore json big.edf > out.json` either writes a whole document or writes nothing — a redirect
26
+ cannot leave a half-written file beside a non-zero exit.
27
+ - The exit codes are checked for reachability rather than assumed: 0 for a clean file, 1 for one
28
+ that reads and fails validation, 2 for bad usage. `parseArgs` over 500 arbitrary argv arrays
29
+ throws nothing but `CliUsageError`, which is what keeps 2 distinguishable from 1.
30
+
9
31
  ## 0.5.36
10
32
 
11
33
  - **Added** the `ByteSource` `data-sources.md` tells you to write, written and read through. "Writing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.5.36",
3
+ "version": "0.5.37",
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.5.36';
96
+ export const VERSION = '0.5.37';