edf2csv 0.5.104 → 0.5.106

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,53 @@
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.106
7
+
8
+ ### Fixed: two warnings printed together, and the second denied the first
9
+
10
+ ```
11
+ warning: This is a discontinuous (EDF+D) recording: its data records are not contiguous in time.
12
+ Each row carries its true recording time, so gaps stay visible instead of being closed.
13
+ warning: This file is marked discontinuous but has no annotation channel, so where its records
14
+ sit in time is not recorded anywhere.
15
+ Times are written as if the records were contiguous. Any gaps are lost.
16
+ ```
17
+
18
+ The column runs contiguously from zero. No row carries a true recording time, because none is
19
+ recorded — which the second warning says plainly, four lines under the first one promising the
20
+ opposite.
21
+
22
+ The header parser raises the first, and it cannot know: whether the record starts can be derived
23
+ is settled after the annotation channel has been read. So the promise is withdrawn where the
24
+ answer is, the way `withoutFileRateWarning` already drops a header diagnostic the plan has
25
+ superseded. A file that can keep it keeps it — `discontinuous.edf` still says gaps stay visible,
26
+ and its rows still carry the nine-second gap.
27
+
28
+ ## 0.5.105
29
+
30
+ ### Fixed: a BDF+ recording was told it is "marked continuous (EDF+C)"
31
+
32
+ ```
33
+ warning: This file is marked continuous (EDF+C), but 2 of its 3 data records say they start
34
+ somewhere other than where continuity puts them.
35
+ Times are written as if the records were contiguous, which is what EDF+C means. If
36
+ the recording really has gaps, the file should have been marked EDF+D.
37
+ ```
38
+
39
+ on a file whose reserved field reads `BDF+C`. Neither `EDF+C` nor `EDF+D` appears anywhere in
40
+ it, so a reader who greps the header for what the warning names finds nothing — and `EDF+D` is
41
+ not a value BDF+ defines, so the remedy is for the wrong format. `continuity` normalises the
42
+ BDF markers to the internal `EDF+` tags, and this message printed the tag.
43
+
44
+ The sibling discontinuous warning has substituted the BDF spelling since 0.3.x, in the same
45
+ file, from the same header field. The continuous branch never got it.
46
+
47
+ It reads `BDF+C` and `BDF+D` for a BDF+ file now, and the test refuses either EDF marker
48
+ anywhere in the message or its hint. An EDF file is unchanged.
49
+
50
+ The same sentence counted with a hard-coded plural: "1 of its 3 data records say they start
51
+ ... where continuity puts them". It says "says it starts ... puts it" at one.
52
+
6
53
  ## 0.5.104
7
54
 
8
55
  ### Fixed: signals.csv and annotations.csv came out a thousand seconds apart, in silence
package/dist/cli.js CHANGED
@@ -23,7 +23,7 @@ import { ChannelSelectionError } from './convert/channels.js';
23
23
  // Shared with the library so a bad option is the same error whichever way it arrived.
24
24
  import { OptionError } from './convert/options.js';
25
25
  import { TimeRangeError, parseTimeSpec } from './convert/time-range.js';
26
- import { deriveRecordStarts } from './convert/timing.js';
26
+ import { deriveRecordStarts, withTimingPromiseKept } from './convert/timing.js';
27
27
  import { formatDiagnostics, formatInfo, infoJson, formatSummary, printable, printableLines, summaryJson } from './cli/report.js';
28
28
  import { counted, listed } from './format/list.js';
29
29
  import { VERSION } from './version.js';
@@ -750,7 +750,7 @@ async function showInfo(input, shared, asJson, jsonIndent, batch = false, toStdo
750
750
  audit?.verify();
751
751
  // Under --json the warnings travel inside the document, exactly as they do for a
752
752
  // conversion, so stderr stays empty and the whole result is one parseable thing.
753
- const diagnostics = [...withoutFileRateWarning(file.diagnostics), ...plan.diagnostics];
753
+ const diagnostics = [...withTimingPromiseKept(withoutFileRateWarning(file.diagnostics), timing.starts !== null), ...plan.diagnostics];
754
754
  if (!asJson && diagnostics.length > 0) {
755
755
  /*
756
756
  Named when there is more than one recording to confuse it with.