edfcore 0.4.254 → 0.4.255

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/cli-run.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * What `npx edfcore` actually does, with the process factored out.
3
3
  *
4
- * `cli.ts` is a shell that supplies real `node:fs` and `node:process`; everything decidable lives
5
- * here, behind an injected `CliIo`. That is not ceremony — a CLI tested by spawning a subprocess
6
- * can only be tested once the package is built, so the tests either skip in CI or test a stale
7
- * binary. This way the exit codes and the output are ordinary unit tests.
4
+ * Layer 7. `cli.ts` is a shell that supplies real `node:fs` and `node:process`; everything
5
+ * decidable lives here, behind an injected `CliIo`. That is not ceremony — a CLI tested by
6
+ * spawning a subprocess can only be tested once the package is built, so the tests either skip in
7
+ * CI or test a stale binary. This way the exit codes and the output are ordinary unit tests.
8
8
  */
9
9
  /**
10
10
  * A mistake in the command line, as opposed to a mistake in the file.
package/dist/cli-run.js CHANGED
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * What `npx edfcore` actually does, with the process factored out.
3
3
  *
4
- * `cli.ts` is a shell that supplies real `node:fs` and `node:process`; everything decidable lives
5
- * here, behind an injected `CliIo`. That is not ceremony — a CLI tested by spawning a subprocess
6
- * can only be tested once the package is built, so the tests either skip in CI or test a stale
7
- * binary. This way the exit codes and the output are ordinary unit tests.
4
+ * Layer 7. `cli.ts` is a shell that supplies real `node:fs` and `node:process`; everything
5
+ * decidable lives here, behind an injected `CliIo`. That is not ceremony — a CLI tested by
6
+ * spawning a subprocess can only be tested once the package is built, so the tests either skip in
7
+ * CI or test a stale binary. This way the exit codes and the output are ordinary unit tests.
8
8
  */
9
9
  import { countAnnotationsByText } from './annotations-query.js';
10
10
  import { trimEdfField } from './bytes/latin1.js';
package/dist/cli.d.ts CHANGED
@@ -2,8 +2,9 @@
2
2
  /**
3
3
  * `npx edfcore` — looking at a file without writing code.
4
4
  *
5
- * A separate entry point, never re-exported from the barrel, because it imports `node:fs` and
6
- * `node:process`. The universal entry must stay free of Node built-ins, and a test asserts it.
5
+ * Layer 7, and the package's `bin`. A separate entry point, never re-exported from the barrel,
6
+ * because it imports `node:fs` and `node:process`. The universal entry must stay free of Node
7
+ * built-ins, and a test asserts it.
7
8
  *
8
9
  * This file is only the wiring. The decisions live in `cli-run.ts`, so they can be tested without
9
10
  * spawning a process against a build that may not exist yet.
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;GAYG"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;GAaG"}
package/dist/cli.js CHANGED
@@ -2,8 +2,9 @@
2
2
  /**
3
3
  * `npx edfcore` — looking at a file without writing code.
4
4
  *
5
- * A separate entry point, never re-exported from the barrel, because it imports `node:fs` and
6
- * `node:process`. The universal entry must stay free of Node built-ins, and a test asserts it.
5
+ * Layer 7, and the package's `bin`. A separate entry point, never re-exported from the barrel,
6
+ * because it imports `node:fs` and `node:process`. The universal entry must stay free of Node
7
+ * built-ins, and a test asserts it.
7
8
  *
8
9
  * This file is only the wiring. The decisions live in `cli-run.ts`, so they can be tested without
9
10
  * spawning a process against a build that may not exist yet.
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;GAYG;AAEH,8FAA8F;AAC9F,2FAA2F;AAC3F,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AACnD,qDAAqD;AACrD,uFAAuF;AACvF,OAAO,KAAK,WAAW,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAc,aAAa,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM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7D,KAAK,IAAI,EAAE,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.4.254";
112
+ export declare const VERSION = "0.4.255";
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.254';
82
+ export const VERSION = '0.4.255';
83
83
  //# sourceMappingURL=constants.js.map
@@ -1,6 +1,9 @@
1
1
  /**
2
2
  * Diagnostics, counted.
3
3
  *
4
+ * Layer 1. Imports one type module and nothing else, which is what lets any layer summarise a
5
+ * diagnostics array without taking on a dependency.
6
+ *
4
7
  * `formatDiagnostics` turns a list into text for a human. This turns the same list into numbers
5
8
  * for a program: the question "is anything wrong with this header, and how wrong" has no answer
6
9
  * on `EdfHeader` — `validateRecording` produces a `report.ok`, but that needs a full scan, and a
@@ -1 +1 @@
1
- {"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../../src/diagnostics/summary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEjF;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,yFAAyF;IACzF,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC;IACxC,uEAAuE;IACvE,QAAQ,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;CAC1C;AAKD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,SAAS,aAAa,EAAE,GAAG,oBAAoB,CAiChG"}
1
+ {"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../../src/diagnostics/summary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEjF;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,yFAAyF;IACzF,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC;IACxC,uEAAuE;IACvE,QAAQ,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;CAC1C;AAKD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,SAAS,aAAa,EAAE,GAAG,oBAAoB,CAiChG"}
@@ -1,6 +1,9 @@
1
1
  /**
2
2
  * Diagnostics, counted.
3
3
  *
4
+ * Layer 1. Imports one type module and nothing else, which is what lets any layer summarise a
5
+ * diagnostics array without taking on a dependency.
6
+ *
4
7
  * `formatDiagnostics` turns a list into text for a human. This turns the same list into numbers
5
8
  * for a program: the question "is anything wrong with this header, and how wrong" has no answer
6
9
  * on `EdfHeader` — `validateRecording` produces a `report.ok`, but that needs a full scan, and a
@@ -1 +1 @@
1
- {"version":3,"file":"summary.js","sourceRoot":"","sources":["../../src/diagnostics/summary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AA+BH,qEAAqE;AACrE,MAAM,aAAa,GAAgC,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;AAErF;;;;;;;;;;GAUG;AACH,MAAM,UAAU,oBAAoB,CAAC,WAAqC;IACxE,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,KAA8B,CAAC;IAEnC,MAAM,MAAM,GAAG,IAAI,GAAG,EAAmC,CAAC;IAC1D,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;QACrC,IAAI,UAAU,CAAC,QAAQ,KAAK,OAAO;YAAE,MAAM,IAAI,CAAC,CAAC;aAC5C,IAAI,UAAU,CAAC,QAAQ,KAAK,SAAS;YAAE,QAAQ,IAAI,CAAC,CAAC;;YACrD,KAAK,IAAI,CAAC,CAAC;QAEhB,IAAI,KAAK,KAAK,SAAS,IAAI,aAAa,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;YACrF,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC;QAC9B,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAC7C,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE;YAC1B,IAAI,EAAE,U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AAK,KAAK,SAAS,IAAI,aAAa,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;YACrF,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC;QAC9B,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAC7C,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE;YAC1B,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,qFAAqF;YACrF,QAAQ,EAAE,QAAQ,EAAE,QAAQ,IAAI,UAAU,CAAC,QAAQ;YACnD,KAAK,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC,CAAC,GAAG,CAAC;SAClC,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,KAAK,EAAE,WAAW,CAAC,MAAM;QACzB,MAAM;QACN,QAAQ;QACR,KAAK;QACL,KAAK;QACL,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;KAC9E,CAAC;AACJ,CAAC"}
@@ -1,8 +1,10 @@
1
1
  /**
2
2
  * A validation report as text.
3
3
  *
4
- * Part of `edfcore/validate`. `validateRecording` returns a report a program can branch on; this
5
- * turns it into the thing a person reads at the end of a CI job or a conformance sweep.
4
+ * Layer 7, and pure. Part of `edfcore/validate`.
5
+ *
6
+ * `validateRecording` returns a report a program can branch on; this turns it into the thing a
7
+ * person reads at the end of a CI job or a conformance sweep.
6
8
  *
7
9
  * The one judgement it makes is what to lead with. A sweep over a damaged file can produce six
8
10
  * figures of diagnostics — `TIMEKEEPING_TAL_MISSING` is per record — and a wall of them buries
@@ -1 +1 @@
1
- {"version":3,"file":"format-report.d.ts","sourceRoot":"","sources":["../src/format-report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AASnF;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,gBAAgB,EACxB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,MAAM,CAoER;AAED,qFAAqF;AACrF,YAAY,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"format-report.d.ts","sourceRoot":"","sources":["../src/format-report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AASnF;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,gBAAgB,EACxB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,MAAM,CAoER;AAED,qFAAqF;AACrF,YAAY,EAAE,SAAS,EAAE,CAAC"}
@@ -1,8 +1,10 @@
1
1
  /**
2
2
  * A validation report as text.
3
3
  *
4
- * Part of `edfcore/validate`. `validateRecording` returns a report a program can branch on; this
5
- * turns it into the thing a person reads at the end of a CI job or a conformance sweep.
4
+ * Layer 7, and pure. Part of `edfcore/validate`.
5
+ *
6
+ * `validateRecording` returns a report a program can branch on; this turns it into the thing a
7
+ * person reads at the end of a CI job or a conformance sweep.
6
8
  *
7
9
  * The one judgement it makes is what to lead with. A sweep over a damaged file can produce six
8
10
  * figures of diagnostics — `TIMEKEEPING_TAL_MISSING` is per record — and a wall of them buries
@@ -1 +1 @@
1
- {"version":3,"file":"format-report.js","sourceRoot":"","sources":["../src/format-report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAA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AE,QAAQ,IAAI,iBAAiB,CAAC;QACxD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CACR,iBAAiB,CAAC,MAAM,CAAC,WAAW,EAAE;YACpC,QAAQ;YACR,GAAG,CAAC,OAAO,EAAE,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC;SACvF,CAAC,CACH,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,18 @@ 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.255
10
+
11
+ - **Gave four modules the layer declaration every other one has.** `AGENTS.md` states this
12
+ project's single architectural rule — `bytes`/`text` → `diagnostics` → `header`/`decode`/`tal` →
13
+ `time` → `io` → entry points, and a module may only import from a lower layer — and each file
14
+ repeats its own position on the first line of its docblock. Forty-eight of fifty-two did.
15
+ `cli.ts`, `cli-run.ts`, `diagnostics/summary.ts` and `format-report.ts` did not, so the one
16
+ invariant the codebase has was stated everywhere except where someone had skipped it, and
17
+ nothing noticed because nothing read the declarations. A missing one is now a failing test.
18
+ `removeComments: false` ships these docblocks in `dist/*.d.ts`, so a layer is also what an
19
+ editor shows on hover.
20
+
9
21
  ## 0.4.254
10
22
 
11
23
  - **Wrote down** that the `archive/pre-squash-2026-08-16` branch cannot be deleted, in the "things
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.4.254",
3
+ "version": "0.4.255",
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/cli-run.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * What `npx edfcore` actually does, with the process factored out.
3
3
  *
4
- * `cli.ts` is a shell that supplies real `node:fs` and `node:process`; everything decidable lives
5
- * here, behind an injected `CliIo`. That is not ceremony — a CLI tested by spawning a subprocess
6
- * can only be tested once the package is built, so the tests either skip in CI or test a stale
7
- * binary. This way the exit codes and the output are ordinary unit tests.
4
+ * Layer 7. `cli.ts` is a shell that supplies real `node:fs` and `node:process`; everything
5
+ * decidable lives here, behind an injected `CliIo`. That is not ceremony — a CLI tested by
6
+ * spawning a subprocess can only be tested once the package is built, so the tests either skip in
7
+ * CI or test a stale binary. This way the exit codes and the output are ordinary unit tests.
8
8
  */
9
9
 
10
10
  import { countAnnotationsByText } from './annotations-query.js';
package/src/cli.ts CHANGED
@@ -2,8 +2,9 @@
2
2
  /**
3
3
  * `npx edfcore` — looking at a file without writing code.
4
4
  *
5
- * A separate entry point, never re-exported from the barrel, because it imports `node:fs` and
6
- * `node:process`. The universal entry must stay free of Node built-ins, and a test asserts it.
5
+ * Layer 7, and the package's `bin`. A separate entry point, never re-exported from the barrel,
6
+ * because it imports `node:fs` and `node:process`. The universal entry must stay free of Node
7
+ * built-ins, and a test asserts it.
7
8
  *
8
9
  * This file is only the wiring. The decisions live in `cli-run.ts`, so they can be tested without
9
10
  * spawning a process against a build that may not exist yet.
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.254';
96
+ export const VERSION = '0.4.255';
@@ -1,6 +1,9 @@
1
1
  /**
2
2
  * Diagnostics, counted.
3
3
  *
4
+ * Layer 1. Imports one type module and nothing else, which is what lets any layer summarise a
5
+ * diagnostics array without taking on a dependency.
6
+ *
4
7
  * `formatDiagnostics` turns a list into text for a human. This turns the same list into numbers
5
8
  * for a program: the question "is anything wrong with this header, and how wrong" has no answer
6
9
  * on `EdfHeader` — `validateRecording` produces a `report.ok`, but that needs a full scan, and a
@@ -1,8 +1,10 @@
1
1
  /**
2
2
  * A validation report as text.
3
3
  *
4
- * Part of `edfcore/validate`. `validateRecording` returns a report a program can branch on; this
5
- * turns it into the thing a person reads at the end of a CI job or a conformance sweep.
4
+ * Layer 7, and pure. Part of `edfcore/validate`.
5
+ *
6
+ * `validateRecording` returns a report a program can branch on; this turns it into the thing a
7
+ * person reads at the end of a CI job or a conformance sweep.
6
8
  *
7
9
  * The one judgement it makes is what to lead with. A sweep over a damaged file can produce six
8
10
  * figures of diagnostics — `TIMEKEEPING_TAL_MISSING` is per record — and a wall of them buries