edfcore 0.3.136 → 0.4.1
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/README.md +3 -3
- package/dist/constants.d.ts +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/constants.js.map +1 -1
- package/{CHANGELOG.md → docs/CHANGELOG.md} +30 -0
- package/package.json +7 -7
- package/src/constants.ts +1 -1
package/README.md
CHANGED
|
@@ -72,7 +72,7 @@ for (const event of annotations) {
|
|
|
72
72
|
}
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
> **Status: 0.
|
|
75
|
+
> **Status: 0.4.x, early.** edfcore runs 1,900+ tests on generated fixtures, and it's checked
|
|
76
76
|
> against public corpora it didn't author: the EDF, EDF+ and 24-bit BDF+ test files from
|
|
77
77
|
> teuniz.net, and PhysioNet's sleep-edfx (a real 22-hour polysomnography recording and its
|
|
78
78
|
> sleep-staging file). Those checks are numeric. Channels labelled `sine 8.5 Hz` decode to
|
|
@@ -352,7 +352,7 @@ whole point, since a reader that swapped the bounds would return plausible micro
|
|
|
352
352
|
sign and invert the clinical reading of the trace.
|
|
353
353
|
|
|
354
354
|
**Still open before 1.0.** Nothing named. The remaining work is API, not verification — see the
|
|
355
|
-
0.3 note in [CHANGELOG.md](https://github.com/tayal-sarthak/edfcore/blob/main/CHANGELOG.md).
|
|
355
|
+
0.3 note in [CHANGELOG.md](https://github.com/tayal-sarthak/edfcore/blob/main/docs/CHANGELOG.md).
|
|
356
356
|
|
|
357
357
|
**Shipped since 0.1.6.** Min/max envelope decimation (`readEnvelope`,
|
|
358
358
|
`readEnvelopeAtResolution`). BioSemi Status-byte helpers (`readTriggers`). Streaming iteration
|
|
@@ -361,7 +361,7 @@ the header and the validation report. Chunk joining that refuses to concatenate
|
|
|
361
361
|
(`mergeChunks`). Timeline lookup with no read (`segmentAt`, `gapAt`, `contiguityOf`). Signal
|
|
362
362
|
lookup by pattern (`matchSignals`) and ordered physical bounds (`physicalRangeOf`). See
|
|
363
363
|
[API — helpers](https://edfcore.vercel.app/docs/api-helpers) and
|
|
364
|
-
[CHANGELOG.md](https://github.com/tayal-sarthak/edfcore/blob/main/CHANGELOG.md).
|
|
364
|
+
[CHANGELOG.md](https://github.com/tayal-sarthak/edfcore/blob/main/docs/CHANGELOG.md).
|
|
365
365
|
|
|
366
366
|
**Still later, additive.** The `edffloat` logarithmic inverse transform, opt-in — still detected
|
|
367
367
|
and rejected, because applying an inverse edfcore cannot verify against a real edffloat file is
|
package/dist/constants.d.ts
CHANGED
|
@@ -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.
|
|
112
|
+
export declare const VERSION = "0.4.1";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,+EAA+E;AAC/E,eAAO,MAAM,sBAAsB,EAAG,GAAY,CAAC;AAEnD,gFAAgF;AAChF,eAAO,MAAM,uBAAuB,EAAG,GAAY,CAAC;AAEpD,gGAAgG;AAChG,eAAO,MAAM,qBAAqB,EAAG,iBAA0B,CAAC;AAChE,eAAO,MAAM,qBAAqB,EAAG,iBAA0B,CAAC;AAEhE,uFAAuF;AACvF,eAAO,MAAM,gCAAgC,EAAG,KAAc,CAAC;AAE/D;;;GAGG;AACH,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAE1C,+BAA+B;AAC/B,eAAO,MAAM,eAAe,EAAG,CAAC,KAAc,CAAC;AAC/C,eAAO,MAAM,eAAe,EAAG,KAAc,CAAC;AAE9C,0DAA0D;AAC1D,eAAO,MAAM,eAAe,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eAAO,MAAM,eAAe,EAAG,OAAgB,CAAC;AAEhD,mEAAmE;AACnE,eAAO,MAAM,oBAAoB,EAAG,IAAa,CAAC;AAElD,0FAA0F;AAC1F,eAAO,MAAM,6BAA6B,EAAE,MAA0B,CAAC;AAEvE;6FAC6F;AAC7F,eAAO,MAAM,4BAA4B,EAAG,EAAa,CAAC;AAC1D,eAAO,MAAM,oBAAoB,EAAG,EAAa,CAAC;AAClD,eAAO,MAAM,cAAc,EAAG,CAAa,CAAC;AAE5C,yEAAyE;AACzE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWhB,CAAC;AAEX;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;CAWtB,CAAC;AAEX,+FAA+F;AAC/F,eAAO,MAAM,0BAA0B;;;;;;;;;;;CAW7B,CAAC;AAEX,2EAA2E;AAC3E,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
package/dist/constants.js
CHANGED
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,+EAA+E;AAC/E,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAY,CAAC;AAEnD,gFAAgF;AAChF,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAY,CAAC;AAEpD,gGAAgG;AAChG,MAAM,CAAC,MAAM,qBAAqB,GAAG,iBAA0B,CAAC;AAChE,MAAM,CAAC,MAAM,qBAAqB,GAAG,iBAA0B,CAAC;AAEhE,uFAAuF;AACvF,MAAM,CAAC,MAAM,gCAAgC,GAAG,KAAc,CAAC;AAE/D;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAE1C,+BAA+B;AAC/B,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAc,CAAC;AAC/C,MAAM,CAAC,MAAM,e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,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE;CAC/B,CAAC;AAEX;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,KAAK,EAAE,EAAE;IACT,cAAc,EAAE,EAAE;IAClB,iBAAiB,EAAE,CAAC;IACpB,eAAe,EAAE,CAAC;IAClB,eAAe,EAAE,CAAC;IAClB,cAAc,EAAE,CAAC;IACjB,cAAc,EAAE,CAAC;IACjB,YAAY,EAAE,EAAE;IAChB,gBAAgB,EAAE,CAAC;IACnB,QAAQ,EAAE,EAAE;CACJ,CAAC;AAEX,+FAA+F;AAC/F,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,KAAK,EAAE,CAAC;IACR,cAAc,EAAE,EAAE;IAClB,iBAAiB,EAAE,EAAE;IACrB,eAAe,EAAE,GAAG;IACpB,eAAe,EAAE,GAAG;IACpB,cAAc,EAAE,GAAG;IACnB,cAAc,EAAE,GAAG;IACnB,YAAY,EAAE,GAAG;IACjB,gBAAgB,EAAE,GAAG;IACrB,QAAQ,EAAE,GAAG;CACL,CAAC;AAEX,2EAA2E;AAC3E,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC"}
|
|
@@ -6,6 +6,36 @@ 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.1
|
|
10
|
+
|
|
11
|
+
- **Moved** `CHANGELOG.md` to `docs/CHANGELOG.md`. It still ships in the tarball, so the release
|
|
12
|
+
record is still readable out of `node_modules/edfcore/` — at the new path. That is the only
|
|
13
|
+
change in this release a consumer can observe.
|
|
14
|
+
- The three build configs moved to `config/`, and every `npm` script now names its config instead
|
|
15
|
+
of relying on a tool's default lookup. Repository only: nothing under `src/` changed, so the API,
|
|
16
|
+
the shipped types and the arithmetic are identical to 0.4.0.
|
|
17
|
+
|
|
18
|
+
## 0.4.0
|
|
19
|
+
|
|
20
|
+
The public API is unchanged: nothing was added, removed or renamed, and no arithmetic moved. This
|
|
21
|
+
is a series marker, and it exists because the 0.3.104-0.3.136 patches carried observable changes
|
|
22
|
+
that a consumer pinning `~0.3.x` would rather have been told about in a version number:
|
|
23
|
+
|
|
24
|
+
- **Error classes.** `decodeAnnotations` and `readAnnotations` now throw `EdfChannelNotFoundError`,
|
|
25
|
+
not a plain `RangeError`, for a signal index the file does not have (0.3.106). Code branching on
|
|
26
|
+
`isEdfError` sees a different answer for that input.
|
|
27
|
+
- **Error codes.** `toPhysicalEnvelope` reports the cause the header recorded rather than always
|
|
28
|
+
`SCALE_UNAVAILABLE` (0.3.111).
|
|
29
|
+
- **Diagnostics.** A discarded TAL no longer also reports that it was kept (0.3.105), and
|
|
30
|
+
`validateHeader` now reports `DATE_UNPARSEABLE` for an unreadable startdate field that the EDF+
|
|
31
|
+
`Startdate` rescued — a case it previously called clean (0.3.107).
|
|
32
|
+
- **Message text.** Annotation text quoted in a diagnostic is escaped (0.3.104), the TAL
|
|
33
|
+
diagnostics carry the bytes their offsets name (0.3.115), and four refusals no longer prefix
|
|
34
|
+
themselves with a function the caller did not call (0.3.132-0.3.136).
|
|
35
|
+
|
|
36
|
+
Nothing here changes which samples you read. If you assert on message strings, read those four
|
|
37
|
+
entries; otherwise this is a drop-in replacement for 0.3.136.
|
|
38
|
+
|
|
9
39
|
## 0.3.136
|
|
10
40
|
|
|
11
41
|
- **Removed** the last hard-coded `readRecordBytes():` prefix, and pinned the rule. Eight modules
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "edfcore",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
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",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"type": "module",
|
|
33
33
|
"sideEffects": false,
|
|
34
34
|
"files": [
|
|
35
|
-
"CHANGELOG.md",
|
|
35
|
+
"docs/CHANGELOG.md",
|
|
36
36
|
"dist",
|
|
37
37
|
"src"
|
|
38
38
|
],
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
"vitest": "4.1.10"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
|
-
"build": "tsc -p tsconfig.build.json",
|
|
66
|
-
"typecheck": "tsc -p tsconfig.build.json --noEmit && tsc -p tsconfig.json",
|
|
67
|
-
"test": "vitest run",
|
|
68
|
-
"test:watch": "vitest",
|
|
69
|
-
"test:scratch": "vitest run --config vitest.scratch.config.ts",
|
|
65
|
+
"build": "tsc -p config/tsconfig.build.json",
|
|
66
|
+
"typecheck": "tsc -p config/tsconfig.build.json --noEmit && tsc -p tsconfig.json",
|
|
67
|
+
"test": "vitest run --config config/vitest.config.ts",
|
|
68
|
+
"test:watch": "vitest --config config/vitest.config.ts",
|
|
69
|
+
"test:scratch": "vitest run --config config/vitest.scratch.config.ts",
|
|
70
70
|
"lint": "biome check .",
|
|
71
71
|
"format": "biome format --write .",
|
|
72
72
|
"check": "npm run lint && npm run typecheck && npm run build && npm run test",
|
package/src/constants.ts
CHANGED