edfcore 0.5.46 → 0.5.47

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.46";
112
+ export declare const VERSION = "0.5.47";
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.46';
82
+ export const VERSION = '0.5.47';
83
83
  //# sourceMappingURL=constants.js.map
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,26 @@ 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.47
10
+
11
+ - **Added** the transformation of appending bytes after the last record: exactly one diagnostic, and
12
+ nothing else moves. `header-recovery-advice.test.ts` covers what the two codes claim — that the
13
+ extra bytes are never decoded and that reaching them by record number is refused. Nothing covered
14
+ the transformation itself.
15
+ - It matters because the recovery is arithmetic on the file's length. `parseHeader` computes the
16
+ record count the file can actually hold and compares it with the declared one, so a change in
17
+ length reaches `recordCount`, `dataByteLength`, the timeline and everything derived from them.
18
+ Getting the recovery right and the arithmetic around it wrong would look, from any single
19
+ assertion, like the recovery working.
20
+ - The boundary is checked at the byte. Fewer bytes than a record is `PARTIAL_FINAL_RECORD` — a
21
+ writer that stopped mid-record. A whole record's worth or more is `TRAILING_BYTES` — something
22
+ else appended after a complete file. One byte either side of `recordByteLength` decides which, and
23
+ edfcore never reports both.
24
+ - Everything else is compared against the untouched file at six append sizes: the samples of every
25
+ record, the annotations and the record onsets, `recordCount`, `dataByteLength`, `spanSeconds` and
26
+ `coveredSeconds` — and the header and a full validation sweep each gain exactly one code and lose
27
+ none.
28
+
9
29
  ## 0.5.46
10
30
 
11
31
  - **Added** the same recording cut into records four different ways. "The record is the unit of I/O,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.5.46",
3
+ "version": "0.5.47",
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.46';
96
+ export const VERSION = '0.5.47';