edf2csv 0.5.139 → 0.5.141

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/CHANGELOG.md CHANGED
@@ -3,6 +3,32 @@
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.141
7
+
8
+ ### Fixed: the usage-error table was missing three of them
9
+
10
+ warnings-and-errors keeps a table of the ways a command exits 2. It listed `--decimals` and not
11
+ `--jobs` or `--layout`, which are refused the same way, and it never gained the `--channels`
12
+ term naming the annotation channel that 0.5.122 added. cli-reference's own exit-2 list picked
13
+ these up in 0.5.130; this is the second place that enumerates them.
14
+
15
+ ## 0.5.140
16
+
17
+ ### Fixed: two diagnostic codes documented above the wrong one
18
+
19
+ `DiagnosticCode` is an exported type, so its per-member comments are what an editor shows on
20
+ hover and what ships in the `.d.ts`. Both of these sat above `MISSING_EDF_PLUS_MARKER`:
21
+
22
+ ```ts
23
+ /** The header's start date or time is not a date or a time. ... */
24
+ /** An annotation channel with a non-zero origin, in a file marked neither EDF+C nor EDF+D. ... */
25
+ | 'MISSING_EDF_PLUS_MARKER'
26
+ | 'START_TIME_UNREADABLE'
27
+ ```
28
+
29
+ So hovering `MISSING_EDF_PLUS_MARKER` described a bad start date, and `START_TIME_UNREADABLE`
30
+ had nothing at all. Each comment now sits above the code it is about.
31
+
6
32
  ## 0.5.139
7
33
 
8
34
  ### Fixed: "1 signals require 512 bytes"
@@ -15,6 +15,7 @@ export type DiagnosticCode = 'MIXED_SAMPLING_RATES' | 'DISCONTINUOUS' | 'RECORD_
15
15
  * `start_datetime_local` null in metadata.json with nothing saying why — on the field the
16
16
  * documented recipe for an absolute instant depends on.
17
17
  */
18
+ | 'START_TIME_UNREADABLE'
18
19
  /**
19
20
  * An annotation channel with a non-zero origin, in a file marked neither EDF+C nor EDF+D.
20
21
  *
@@ -22,7 +23,7 @@ export type DiagnosticCode = 'MIXED_SAMPLING_RATES' | 'DISCONTINUOUS' | 'RECORD_
22
23
  * label instead. So a file carrying one without the marker got samples timed from zero and events
23
24
  * timed from the origin, and the two CSVs came out on clocks seconds apart.
24
25
  */
25
- | 'MISSING_EDF_PLUS_MARKER' | 'START_TIME_UNREADABLE'
26
+ | 'MISSING_EDF_PLUS_MARKER'
26
27
  /**
27
28
  * `--info --stdout` on a recording `--stdout` would refuse.
28
29
  *
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/edf/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAqEH;;;GAGG;AACH,MAAM,OAAO,QAAS,SAAQ,KAAK;IACxB,IAAI,CAAe;IACnB,IAAI,CAAqB;IAElC,YAAY,IAAkB,EAAE,OAAe,EAAE,IAAa;QAC5D,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF","sourcesContent":["/**\n * Error and diagnostic types.\n *\n * The distinction that matters here: an EdfError means we cannot produce\n * trustworthy output and must stop. A Diagnostic with severity 'warning' means\n * we can continue, but the user needs to know something about their data that\n * they would not otherwise see.\n */\n\nexport type DiagnosticCode =\n | 'MIXED_SAMPLING_RATES'\n | 'DISCONTINUOUS'\n | 'RECORD_COUNT_UNKNOWN'\n | 'RECORD_COUNT_MISMATCH'\n | 'TRAILING_BYTES'\n | 'DEGENERATE_DIGITAL_RANGE'\n | 'DEGENERATE_PHYSICAL_RANGE'\n | 'UNUSABLE_PHYSICAL_RANGE'\n | 'INVERTED_PHYSICAL_RANGE'\n | 'DUPLICATE_LABEL'\n | 'EMPTY_LABEL'\n | 'NO_ANNOTATIONS'\n | 'ANNOTATION_DECODE_FAILED'\n | 'COMMA_DECIMAL'\n | 'LARGE_OUTPUT'\n | 'NO_SIGNAL_CHANNELS'\n | 'NO_SAMPLES'\n | 'STALE_OUTPUT'\n | 'INPUT_CHANGED'\n | 'EMPTY_WINDOW'\n | 'TIME_RESOLUTION'\n | 'VALUE_RESOLUTION'\n | 'HEADER_BYTES_MISMATCH'\n | 'NONPRINTABLE_LABEL'\n /**\n * The header's start date or time is not a date or a time.\n *\n * Every other unusable header field reports itself. This one did not, so a recording whose\n * timestamp cannot be read converted in silence, passed `--strict`, and left\n * `start_datetime_local` null in metadata.json with nothing saying why — on the field the\n * documented recipe for an absolute instant depends on.\n */\n /**\n * An annotation channel with a non-zero origin, in a file marked neither EDF+C nor EDF+D.\n *\n * The marker decides whether the origin is applied, and the annotation channel is found by\n * label instead. So a file carrying one without the marker got samples timed from zero and events\n * timed from the origin, and the two CSVs came out on clocks seconds apart.\n */\n | 'MISSING_EDF_PLUS_MARKER'\n | 'START_TIME_UNREADABLE'\n /**\n * `--info --stdout` on a recording `--stdout` would refuse.\n *\n * Only `--info` raises it. A conversion refuses outright instead, with the same words —\n * this is that refusal shown ahead of time, which is what `--info` is for.\n */\n | 'STDOUT_UNSUPPORTED';\n\nexport interface Diagnostic {\n code: DiagnosticCode;\n severity: 'warning' | 'info';\n message: string;\n /** What the user can do about it. Omitted when there is nothing useful to say. */\n hint?: string;\n}\n\nexport type EdfErrorCode =\n | 'FILE_TOO_SMALL'\n | 'BAD_HEADER_FIELD'\n | 'NO_DATA_RECORDS'\n | 'INVALID_SIGNAL_COUNT'\n | 'INVALID_RECORD_DURATION'\n | 'NO_SAMPLES'\n | 'UNREADABLE';\n\n/**\n * A fatal problem with the recording itself. Carries a stable `code` so the CLI\n * can map it to an exit status, and a `hint` so the user is not left guessing.\n */\nexport class EdfError extends Error {\n readonly code: EdfErrorCode;\n readonly hint: string | undefined;\n\n constructor(code: EdfErrorCode, message: string, hint?: string) {\n super(message);\n this.name = 'EdfError';\n this.code = code;\n this.hint = hint;\n }\n}\n"]}
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/edf/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAqEH;;;GAGG;AACH,MAAM,OAAO,QAAS,SAAQ,KAAK;IACxB,IAAI,CAAe;IACnB,IAAI,CAAqB;IAElC,YAAY,IAAkB,EAAE,OAAe,EAAE,IAAa;QAC5D,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF","sourcesContent":["/**\n * Error and diagnostic types.\n *\n * The distinction that matters here: an EdfError means we cannot produce\n * trustworthy output and must stop. A Diagnostic with severity 'warning' means\n * we can continue, but the user needs to know something about their data that\n * they would not otherwise see.\n */\n\nexport type DiagnosticCode =\n | 'MIXED_SAMPLING_RATES'\n | 'DISCONTINUOUS'\n | 'RECORD_COUNT_UNKNOWN'\n | 'RECORD_COUNT_MISMATCH'\n | 'TRAILING_BYTES'\n | 'DEGENERATE_DIGITAL_RANGE'\n | 'DEGENERATE_PHYSICAL_RANGE'\n | 'UNUSABLE_PHYSICAL_RANGE'\n | 'INVERTED_PHYSICAL_RANGE'\n | 'DUPLICATE_LABEL'\n | 'EMPTY_LABEL'\n | 'NO_ANNOTATIONS'\n | 'ANNOTATION_DECODE_FAILED'\n | 'COMMA_DECIMAL'\n | 'LARGE_OUTPUT'\n | 'NO_SIGNAL_CHANNELS'\n | 'NO_SAMPLES'\n | 'STALE_OUTPUT'\n | 'INPUT_CHANGED'\n | 'EMPTY_WINDOW'\n | 'TIME_RESOLUTION'\n | 'VALUE_RESOLUTION'\n | 'HEADER_BYTES_MISMATCH'\n | 'NONPRINTABLE_LABEL'\n /**\n * The header's start date or time is not a date or a time.\n *\n * Every other unusable header field reports itself. This one did not, so a recording whose\n * timestamp cannot be read converted in silence, passed `--strict`, and left\n * `start_datetime_local` null in metadata.json with nothing saying why — on the field the\n * documented recipe for an absolute instant depends on.\n */\n | 'START_TIME_UNREADABLE'\n /**\n * An annotation channel with a non-zero origin, in a file marked neither EDF+C nor EDF+D.\n *\n * The marker decides whether the origin is applied, and the annotation channel is found by\n * label instead. So a file carrying one without the marker got samples timed from zero and events\n * timed from the origin, and the two CSVs came out on clocks seconds apart.\n */\n | 'MISSING_EDF_PLUS_MARKER'\n /**\n * `--info --stdout` on a recording `--stdout` would refuse.\n *\n * Only `--info` raises it. A conversion refuses outright instead, with the same words —\n * this is that refusal shown ahead of time, which is what `--info` is for.\n */\n | 'STDOUT_UNSUPPORTED';\n\nexport interface Diagnostic {\n code: DiagnosticCode;\n severity: 'warning' | 'info';\n message: string;\n /** What the user can do about it. Omitted when there is nothing useful to say. */\n hint?: string;\n}\n\nexport type EdfErrorCode =\n | 'FILE_TOO_SMALL'\n | 'BAD_HEADER_FIELD'\n | 'NO_DATA_RECORDS'\n | 'INVALID_SIGNAL_COUNT'\n | 'INVALID_RECORD_DURATION'\n | 'NO_SAMPLES'\n | 'UNREADABLE';\n\n/**\n * A fatal problem with the recording itself. Carries a stable `code` so the CLI\n * can map it to an exit status, and a `hint` so the user is not left guessing.\n */\nexport class EdfError extends Error {\n readonly code: EdfErrorCode;\n readonly hint: string | undefined;\n\n constructor(code: EdfErrorCode, message: string, hint?: string) {\n super(message);\n this.name = 'EdfError';\n this.code = code;\n this.hint = hint;\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edf2csv",
3
- "version": "0.5.139",
3
+ "version": "0.5.141",
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",