edf2csv 0.5.29 → 0.5.31

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/package.json +2 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,47 @@
3
3
  Notable changes to edf2csv. Versions follow [semantic versioning](https://semver.org); while the
4
4
  major version is 0, a minor bump may contain breaking changes.
5
5
 
6
+ ## 0.5.31
7
+
8
+ ### Fixed: the API reference's sample-time recipe disagreed with the tool by half a second
9
+
10
+ api.md's streaming example computes each record's start as `index * recordDuration`, and the
11
+ caveat under it named EDF+D as the only case needing the record starts from
12
+ `readAnnotations()`. It assumes two things, and EDF+ guarantees neither.
13
+
14
+ The second is that the first record sits at zero, which a *continuous* file is free not to do.
15
+ `fractional-start.edf` is EDF+C with records at 0.5, 1.5 and 2.5 seconds — contiguous, and
16
+ half a second later than the arithmetic says. The recipe times its first sample at 0.000;
17
+ `convert()` writes 0.500 for that sample. The annotation onsets in the same file keep their
18
+ true values, so an analysis built on the recipe puts every event half a second away from the
19
+ samples it describes.
20
+
21
+ The tool has recovered that offset since 0.4.9 and `src/convert/timing.ts` describes the
22
+ failure at length; the recipe was the one place still doing it the old way. It now reads
23
+ `readOrigin()` — the cheap version, at most sixteen records rather than the whole annotation
24
+ channel — and a test runs the recipe against `convert()` on that fixture and requires every
25
+ timestamp to match.
26
+
27
+ ## 0.5.30
28
+
29
+ ### Fixed: `npm pack` on a clean checkout produced a package with no code in it
30
+
31
+ Four files, no `dist/`, no bin, nothing importable — and `npm pack` reported success. Anyone
32
+ packing the repository, or installing it from a git URL, got a package that installs cleanly
33
+ and does nothing.
34
+
35
+ `prepublishOnly` builds, and runs only for `npm publish`. `npm pack` goes round it, as does a
36
+ git-URL install. Published versions were therefore always fine, which is exactly why this
37
+ could sit there unnoticed: the one path that was covered is the one everybody sees.
38
+
39
+ A `prepack` script builds now, which is the hook both `npm pack` and `npm publish` run. The
40
+ tarball goes from 4 files to 76; installed into a fresh directory it answers `npx edf2csv
41
+ --version`, exports its 28 names, and converts a recording.
42
+
43
+ A test holds the shape rather than the tarball, since packing inside the suite would mean
44
+ running a build inside a build: `files` says what ships, `bin`/`exports`/`types` say what has
45
+ to be in it, and `prepack` is what makes the second true when the first is read.
46
+
6
47
  ## 0.5.29
7
48
 
8
49
  ### Fixed: an annotation channel with no room in it hid the timekeeping in the channel after it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edf2csv",
3
- "version": "0.5.29",
3
+ "version": "0.5.31",
4
4
  "description": "Convert EDF, EDF+ and BDF biosignal recordings (European Data Format) to CSV from the command line. Local, streaming, and never resamples or alters units.",
5
5
  "keywords": [
6
6
  "edf",
@@ -57,6 +57,7 @@
57
57
  "scripts": {
58
58
  "build": "tsc -p tsconfig.json",
59
59
  "clean": "node -e \"fs.rmSync('dist',{recursive:true,force:true})\"",
60
+ "prepack": "npm run build",
60
61
  "fixtures": "node test/fixtures/generate.mjs",
61
62
  "test": "npm run build && npm run fixtures && node --test test/*.test.js",
62
63
  "typecheck": "tsc -p tsconfig.json --noEmit",