edfcore 0.4.86 → 0.4.88
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/diagnostics/summary.d.ts +10 -0
- package/dist/diagnostics/summary.d.ts.map +1 -1
- package/dist/diagnostics/summary.js.map +1 -1
- package/docs/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/src/constants.ts +1 -1
- package/src/diagnostics/summary.ts +10 -0
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.4.
|
|
112
|
+
export declare const VERSION = "0.4.88";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
|
@@ -13,11 +13,21 @@
|
|
|
13
13
|
* signal is fine. Refusing the whole recording on that count throws away good data.
|
|
14
14
|
*/
|
|
15
15
|
import type { EdfDiagnostic, EdfDiagnosticCode, EdfSeverity } from '../types.js';
|
|
16
|
+
/**
|
|
17
|
+
* One diagnostic code and how often it fired. The severity is carried here too so a caller
|
|
18
|
+
* ranking codes never has to reach back into the diagnostics array to find out whether the most
|
|
19
|
+
* frequent one is also the most serious — it usually is not.
|
|
20
|
+
*/
|
|
16
21
|
export interface EdfCodeCount {
|
|
17
22
|
readonly code: EdfDiagnosticCode;
|
|
18
23
|
readonly severity: EdfSeverity;
|
|
19
24
|
readonly count: number;
|
|
20
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Counts over a diagnostics array, for deciding what to show before showing anything. A file
|
|
28
|
+
* with four hundred notes is a real case — one bad field repeated per record — so the summary
|
|
29
|
+
* exists to be rendered instead of the list, not alongside it.
|
|
30
|
+
*/
|
|
21
31
|
export interface EdfDiagnosticSummary {
|
|
22
32
|
readonly total: number;
|
|
23
33
|
readonly errors: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../../src/diagnostics/summary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEjF,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,yFAAyF;IACzF,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC;IACxC,uEAAuE;IACvE,QAAQ,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;CAC1C;AAKD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,SAAS,aAAa,EAAE,GAAG,oBAAoB,CAiChG"}
|
|
1
|
+
{"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../../src/diagnostics/summary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEjF;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,yFAAyF;IACzF,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC;IACxC,uEAAuE;IACvE,QAAQ,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;CAC1C;AAKD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,SAAS,aAAa,EAAE,GAAG,oBAAoB,CAiChG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary.js","sourceRoot":"","sources":["../../src/diagnostics/summary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;
|
|
1
|
+
{"version":3,"file":"summary.js","sourceRoot":"","sources":["../../src/diagnostics/summary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AA+BH,qEAAqE;AACrE,MAAM,aAAa,GAAgC,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;AAErF;;;;;;;;;;GAUG;AACH,MAAM,UAAU,oBAAoB,CAAC,WAAqC;IACxE,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,IAAI,QAAQ,GAAG,CAAC,CAAC;IACjB,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,KAA8B,CAAC;IAEnC,MAAM,MAAM,GAAG,IAAI,GAAG,EAAmC,CAAC;IAC1D,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;QACrC,IAAI,UAAU,CAAC,QAAQ,KAAK,OAAO;YAAE,MAAM,IAAI,CAAC,CAAC;aAC5C,IAAI,UAAU,CAAC,QAAQ,KAAK,SAAS;YAAE,QAAQ,IAAI,CAAC,CAAC;;YACrD,KAAK,IAAI,CAAC,CAAC;QAEhB,IAAI,KAAK,KAAK,SAAS,IAAI,aAAa,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;YACrF,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC;QAC9B,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAC7C,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE;YAC1B,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,qFAAqF;YACrF,QAAQ,EAAE,QAAQ,EAAE,QAAQ,IAAI,UAAU,CAAC,QAAQ;YACnD,KAAK,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC,CAAC,GAAG,CAAC;SAClC,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,KAAK,EAAE,WAAW,CAAC,MAAM;QACzB,MAAM;QACN,QAAQ;QACR,KAAK;QACL,KAAK;QACL,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;KAC9E,CAAC;AACJ,CAAC"}
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,18 @@ 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.88
|
|
10
|
+
|
|
11
|
+
- **Added** a docblock to `EdfCodeCount` saying why it carries `severity` beside the count.
|
|
12
|
+
`byCode` is sorted most-frequent-first, and the most frequent code is usually not the most
|
|
13
|
+
serious one, so the severity has to travel with it.
|
|
14
|
+
|
|
15
|
+
## 0.4.87
|
|
16
|
+
|
|
17
|
+
- **Added** a docblock to `EdfDiagnosticSummary` saying what it is FOR. A file can carry hundreds
|
|
18
|
+
of notes when one bad field repeats per record, so the summary is meant to be rendered instead
|
|
19
|
+
of the list rather than beside it.
|
|
20
|
+
|
|
9
21
|
## 0.4.86
|
|
10
22
|
|
|
11
23
|
- **Added** a docblock to `EdfSeverity` naming the `info` exemption on the type. That level
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
|
@@ -15,12 +15,22 @@
|
|
|
15
15
|
|
|
16
16
|
import type { EdfDiagnostic, EdfDiagnosticCode, EdfSeverity } from '../types.js';
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* One diagnostic code and how often it fired. The severity is carried here too so a caller
|
|
20
|
+
* ranking codes never has to reach back into the diagnostics array to find out whether the most
|
|
21
|
+
* frequent one is also the most serious — it usually is not.
|
|
22
|
+
*/
|
|
18
23
|
export interface EdfCodeCount {
|
|
19
24
|
readonly code: EdfDiagnosticCode;
|
|
20
25
|
readonly severity: EdfSeverity;
|
|
21
26
|
readonly count: number;
|
|
22
27
|
}
|
|
23
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Counts over a diagnostics array, for deciding what to show before showing anything. A file
|
|
31
|
+
* with four hundred notes is a real case — one bad field repeated per record — so the summary
|
|
32
|
+
* exists to be rendered instead of the list, not alongside it.
|
|
33
|
+
*/
|
|
24
34
|
export interface EdfDiagnosticSummary {
|
|
25
35
|
readonly total: number;
|
|
26
36
|
readonly errors: number;
|