edfcore 0.4.255 → 0.4.256

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.255";
112
+ export declare const VERSION = "0.4.256";
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.255';
82
+ export const VERSION = '0.4.256';
83
83
  //# sourceMappingURL=constants.js.map
@@ -1,10 +1,15 @@
1
1
  /**
2
2
  * Decimal text to exact 100 ns ticks.
3
3
  *
4
- * Layer 3. Sole owner of the string -> tick conversion, which is the whole reason event times
5
- * in edfcore compare exactly. `parseFloat`, `Number(text)` and float arithmetic appear nowhere
6
- * on that path: an onset written `+0.1` and one written `+0.3` are integers here, so equality,
7
- * ordering and subtraction are decided by the digits on disk rather than by float64 rounding.
4
+ * Layer 1, not 3 this file sits in `tal/` but does not belong to it. It imports `constants.ts`
5
+ * and nothing else, and `header/parse.ts` and `header/lookup.ts` at layer 2 both call it, so
6
+ * labelling it 3 with the rest of the directory made the only two upward runtime imports in the
7
+ * package (corrected in 0.4.256). A module's layer is its dependencies, not its folder.
8
+ *
9
+ * Sole owner of the string -> tick conversion, which is the whole reason event times in edfcore
10
+ * compare exactly. `parseFloat`, `Number(text)` and float arithmetic appear nowhere on that path:
11
+ * an onset written `+0.1` and one written `+0.3` are integers here, so equality, ordering and
12
+ * subtraction are decided by the digits on disk rather than by float64 rounding.
8
13
  */
9
14
  /**
10
15
  * One parsed onset or duration field.
@@ -1 +1 @@
1
- {"version":3,"file":"ticks.d.ts","sourceRoot":"","sources":["../../src/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M,CAAC;IACrB,mDAAmD;IACnD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAwED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAOxD;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAQ1D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIpD;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAGrD;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAGpD;AAKD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIrD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAQtD"}
package/dist/tal/ticks.js CHANGED
@@ -1,10 +1,15 @@
1
1
  /**
2
2
  * Decimal text to exact 100 ns ticks.
3
3
  *
4
- * Layer 3. Sole owner of the string -> tick conversion, which is the whole reason event times
5
- * in edfcore compare exactly. `parseFloat`, `Number(text)` and float arithmetic appear nowhere
6
- * on that path: an onset written `+0.1` and one written `+0.3` are integers here, so equality,
7
- * ordering and subtraction are decided by the digits on disk rather than by float64 rounding.
4
+ * Layer 1, not 3 this file sits in `tal/` but does not belong to it. It imports `constants.ts`
5
+ * and nothing else, and `header/parse.ts` and `header/lookup.ts` at layer 2 both call it, so
6
+ * labelling it 3 with the rest of the directory made the only two upward runtime imports in the
7
+ * package (corrected in 0.4.256). A module's layer is its dependencies, not its folder.
8
+ *
9
+ * Sole owner of the string -> tick conversion, which is the whole reason event times in edfcore
10
+ * compare exactly. `parseFloat`, `Number(text)` and float arithmetic appear nowhere on that path:
11
+ * an onset written `+0.1` and one written `+0.3` are integers here, so equality, ordering and
12
+ * subtraction are decided by the digits on disk rather than by float64 rounding.
8
13
  */
9
14
  import { TICKS_PER_SECOND } from '../constants.js';
10
15
  const ASCII_ZERO = 0x30;
@@ -1 +1 @@
1
- {"version":3,"file":"ticks.js","sourceRoot":"","sources":["../../src/tal/ticks.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAoBnD,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,WAAW,GAAG,IAAI,CAAC;AACzB,MAAM,SAAS,GAAG,IAAI,CAAC;AAEvB,gGAAgG;AAChG,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAE/B,uEAAuE;AACvE,MAAM,sBAAsB,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAQxD,MAAM,gBAAgB,GAAmB,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;AAElE,SAAS,YAAY,CAAC,IAAY;IAChC,OAAO,IAAI,IAAI,UAAU,IAAI,IAAI,IAAI,UAAU,CAAC;AAClD,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,mBAAmB,CAAC,IAAY,EAAE,KAAa;IACtD,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC;IACxB,IAAI,CAAC,GAAG,KAAK,CAAC;IACd,IAAI,KAAK,GAAG,EAAE,CAAC;IAEf,OAAO,CAAC,GAAG,GAAG,EAAE,CAAC;QACf,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAChC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;YAAE,MAAM;QAC/B,KAAK,GAAG,KAAK,GAAG,GAA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AE,CAAC;AAC3D,CAAC;AAED,MAAM,SAAS,GAAW,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC;AACvC,MAAM,SAAS,GAAW,EAAE,IAAI,GAAG,GAAG,EAAE,CAAC;AAEzC;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,eAAe,CAAC,KAAa;IAC3C,IAAI,KAAK,GAAG,SAAS;QAAE,OAAO,SAAS,CAAC;IACxC,IAAI,KAAK,GAAG,SAAS;QAAE,OAAO,SAAS,CAAC;IACxC,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,cAAc,CAAC,OAAe;IAC5C,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,UAAU,CAClB,iDAAiD,OAAO,IAAI;YAC1D,6CAA6C,CAChD,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,sBAAsB,CAAC,CAAC,CAAC;AAC9D,CAAC"}
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,22 @@ 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.256
10
+
11
+ - **Corrected** `src/tal/ticks.ts` from layer 3 to layer 1, and started enforcing the direction
12
+ the layers imply. `AGENTS.md` has always said a module may only import from a lower layer, and
13
+ every module now declares its own — but nothing compared the two, and applying that comparison
14
+ for the first time found two upward runtime imports, both real and both the same mistake:
15
+ `header/parse.ts` and `header/lookup.ts` at layer 2 call `tal/ticks.ts`, which was labelled 3
16
+ because it lives in `tal/`. It imports `constants.ts` and nothing else. A module's layer is its
17
+ dependencies, not its folder, so the fix was the number and no code moved.
18
+ - **Exempted** `import type`, which is the architecture rather than a loophole: `src/types.ts`
19
+ opens by saying it emits no runtime code so any layer may import it without creating a
20
+ dependency edge. Without the exemption the check would report `types.ts` importing
21
+ `diagnostics/codes.ts` — precisely the edge that does not exist. Level imports are allowed too;
22
+ there are 28 of them inside layers 2, 3 and 7, so "only from a lower layer" is shorthand for
23
+ "never from a higher one".
24
+
9
25
  ## 0.4.255
10
26
 
11
27
  - **Gave four modules the layer declaration every other one has.** `AGENTS.md` states this
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.4.255",
3
+ "version": "0.4.256",
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.255';
96
+ export const VERSION = '0.4.256';
package/src/tal/ticks.ts CHANGED
@@ -1,10 +1,15 @@
1
1
  /**
2
2
  * Decimal text to exact 100 ns ticks.
3
3
  *
4
- * Layer 3. Sole owner of the string -> tick conversion, which is the whole reason event times
5
- * in edfcore compare exactly. `parseFloat`, `Number(text)` and float arithmetic appear nowhere
6
- * on that path: an onset written `+0.1` and one written `+0.3` are integers here, so equality,
7
- * ordering and subtraction are decided by the digits on disk rather than by float64 rounding.
4
+ * Layer 1, not 3 this file sits in `tal/` but does not belong to it. It imports `constants.ts`
5
+ * and nothing else, and `header/parse.ts` and `header/lookup.ts` at layer 2 both call it, so
6
+ * labelling it 3 with the rest of the directory made the only two upward runtime imports in the
7
+ * package (corrected in 0.4.256). A module's layer is its dependencies, not its folder.
8
+ *
9
+ * Sole owner of the string -> tick conversion, which is the whole reason event times in edfcore
10
+ * compare exactly. `parseFloat`, `Number(text)` and float arithmetic appear nowhere on that path:
11
+ * an onset written `+0.1` and one written `+0.3` are integers here, so equality, ordering and
12
+ * subtraction are decided by the digits on disk rather than by float64 rounding.
8
13
  */
9
14
 
10
15
  import { TICKS_PER_SECOND } from '../constants.js';