edfcore 0.6.256 → 0.6.257
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/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/format-header.d.ts.map +1 -1
- package/dist/format-header.js +19 -6
- package/dist/format-header.js.map +1 -1
- package/docs/CHANGELOG.md +21 -0
- package/package.json +1 -1
- package/src/constants.ts +1 -1
- package/src/format-header.ts +19 -6
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.6.
|
|
112
|
+
export declare const VERSION = "0.6.257";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-header.d.ts","sourceRoot":"","sources":["../src/format-header.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAUH,OAAO,KAAK,EAAmB,SAAS,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAsElF;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"format-header.d.ts","sourceRoot":"","sources":["../src/format-header.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAUH,OAAO,KAAK,EAAmB,SAAS,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAsElF;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,MAAM,CAyQrF"}
|
package/dist/format-header.js
CHANGED
|
@@ -147,14 +147,27 @@ export function formatHeader(header, options) {
|
|
|
147
147
|
*/
|
|
148
148
|
/*
|
|
149
149
|
* An ARRAY, which is an object, so the check below cannot see it. Same argument as `assertOptions`
|
|
150
|
-
* makes for the three listing formatters
|
|
151
|
-
*
|
|
152
|
-
*
|
|
150
|
+
* makes for the three listing formatters.
|
|
151
|
+
*
|
|
152
|
+
* NOT the same cost, and 0.6.247 wrote theirs in here. `redactFields` is the array-valued option
|
|
153
|
+
* that argument turns on, and it is not an option of this call — `FormatHeaderOptions` is
|
|
154
|
+
* `includePatientId` and `diagnosticsHint`. So the message named a field to pass on an object,
|
|
155
|
+
* and a reader who passed it got the silent failure `format.ts` reserves its strongest wording
|
|
156
|
+
* for: "the one option in this package whose silent failure sends a person's name somewhere it
|
|
157
|
+
* should not go", here spelled as an option that does nothing at all.
|
|
158
|
+
*
|
|
159
|
+
* And "nothing was withheld" is backwards for this formatter, which withholds by DEFAULT:
|
|
160
|
+
* `includePatientId` is opt-in and read as `=== true`, so an array left the identification OUT.
|
|
161
|
+
* The guard below says so correctly for a bare value, three lines away, and this one said the
|
|
162
|
+
* opposite of it.
|
|
153
163
|
*/
|
|
154
164
|
if (Array.isArray(options)) {
|
|
155
|
-
throw new RangeError('formatHeader(): the options are an array, and includePatientId and
|
|
156
|
-
'fields on the options rather than entries in a list — so
|
|
157
|
-
'
|
|
165
|
+
throw new RangeError('formatHeader(): the options are an array, and includePatientId and diagnosticsHint are ' +
|
|
166
|
+
'fields on the options rather than entries in a list — so the identification lines were ' +
|
|
167
|
+
'left out and the summary looks exactly like one that never asked for them. ' +
|
|
168
|
+
'Next: pass them on an object. Redaction is not an option here: this formatter omits the ' +
|
|
169
|
+
'identification unless includePatientId asks for it, and redactFields belongs to ' +
|
|
170
|
+
'formatDiagnostics(), which prints the raw bytes of a field it reports on.');
|
|
158
171
|
}
|
|
159
172
|
if (options !== undefined && typeof options !== 'object') {
|
|
160
173
|
throw new RangeError(`formatHeader(): the options are ${describeValue(options)}, not an object — ` +
|
|
@@ -1 +1 @@
|
|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K,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,27 @@ 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.6.257
|
|
10
|
+
|
|
11
|
+
- **Fixed** `formatHeader`'s array refusal naming `redactFields`, which is not an option of this call.
|
|
12
|
+
`FormatHeaderOptions` is `includePatientId` and `diagnosticsHint`, and nothing here reads a
|
|
13
|
+
`redactFields` at all — so the message told a reader to pass it on an object, and passing it does
|
|
14
|
+
nothing. That is the failure `format.ts` reserves its strongest wording for, "the one option in this
|
|
15
|
+
package whose silent failure sends a person's name somewhere it should not go", reached by following
|
|
16
|
+
edfcore's own advice and around `assertRedactableFields`, which exists so a name outside the
|
|
17
|
+
vocabulary "is refused rather than ignored".
|
|
18
|
+
- 0.6.247 wrote `assertOptions`' argument into this guard when it gave the four formatters an array
|
|
19
|
+
branch. It holds for the three listing formatters, whose `redactFields` really is the array-valued
|
|
20
|
+
option that makes the mistake likely. It does not hold here.
|
|
21
|
+
- **Fixed** the same message stating the consequence backwards. This formatter withholds by default —
|
|
22
|
+
`includePatientId` is opt-in and read as `=== true` — so an array leaves the identification OUT, not
|
|
23
|
+
in. "Nothing was withheld" was the opposite of the bare-value guard three lines below it, which has
|
|
24
|
+
always said "the identification lines would have been left out and the summary would look exactly
|
|
25
|
+
like one that never asked for them". Two copies of one fact, in one function, disagreeing about
|
|
26
|
+
which way a person's name leaks.
|
|
27
|
+
- The refusal now names the two real options, states the direction both guards agree on, and says
|
|
28
|
+
where redaction lives: `formatDiagnostics()`, which prints the raw bytes of a field it reports on.
|
|
29
|
+
|
|
9
30
|
## 0.6.256
|
|
10
31
|
|
|
11
32
|
- **Fixed** `decodeStatusWord(digital)` — the whole Status channel where one sample of it belongs —
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
package/src/format-header.ts
CHANGED
|
@@ -157,15 +157,28 @@ export function formatHeader(header: EdfHeader, options?: FormatHeaderOptions):
|
|
|
157
157
|
*/
|
|
158
158
|
/*
|
|
159
159
|
* An ARRAY, which is an object, so the check below cannot see it. Same argument as `assertOptions`
|
|
160
|
-
* makes for the three listing formatters
|
|
161
|
-
*
|
|
162
|
-
*
|
|
160
|
+
* makes for the three listing formatters.
|
|
161
|
+
*
|
|
162
|
+
* NOT the same cost, and 0.6.247 wrote theirs in here. `redactFields` is the array-valued option
|
|
163
|
+
* that argument turns on, and it is not an option of this call — `FormatHeaderOptions` is
|
|
164
|
+
* `includePatientId` and `diagnosticsHint`. So the message named a field to pass on an object,
|
|
165
|
+
* and a reader who passed it got the silent failure `format.ts` reserves its strongest wording
|
|
166
|
+
* for: "the one option in this package whose silent failure sends a person's name somewhere it
|
|
167
|
+
* should not go", here spelled as an option that does nothing at all.
|
|
168
|
+
*
|
|
169
|
+
* And "nothing was withheld" is backwards for this formatter, which withholds by DEFAULT:
|
|
170
|
+
* `includePatientId` is opt-in and read as `=== true`, so an array left the identification OUT.
|
|
171
|
+
* The guard below says so correctly for a bare value, three lines away, and this one said the
|
|
172
|
+
* opposite of it.
|
|
163
173
|
*/
|
|
164
174
|
if (Array.isArray(options)) {
|
|
165
175
|
throw new RangeError(
|
|
166
|
-
'formatHeader(): the options are an array, and includePatientId and
|
|
167
|
-
'fields on the options rather than entries in a list — so
|
|
168
|
-
'
|
|
176
|
+
'formatHeader(): the options are an array, and includePatientId and diagnosticsHint are ' +
|
|
177
|
+
'fields on the options rather than entries in a list — so the identification lines were ' +
|
|
178
|
+
'left out and the summary looks exactly like one that never asked for them. ' +
|
|
179
|
+
'Next: pass them on an object. Redaction is not an option here: this formatter omits the ' +
|
|
180
|
+
'identification unless includePatientId asks for it, and redactFields belongs to ' +
|
|
181
|
+
'formatDiagnostics(), which prints the raw bytes of a field it reports on.',
|
|
169
182
|
);
|
|
170
183
|
}
|
|
171
184
|
if (options !== undefined && typeof options !== 'object') {
|