@dpuse/dpuse-tool-adaltas-csv-parser 1.0.112 → 1.0.114
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/README.md
CHANGED
|
@@ -61,7 +61,7 @@ License data is updated each time `npm run document` is run, using [license-chec
|
|
|
61
61
|
|
|
62
62
|
| Dependency | Version | License(s) | Document |
|
|
63
63
|
| :----------------------------------------------------------- | :-----: | :--------- | :-------------------------------------------------------------------- |
|
|
64
|
-
| [@dpuse/dpuse-shared](https://github.com/dpuse/dpuse-shared) | 1.0.
|
|
64
|
+
| [@dpuse/dpuse-shared](https://github.com/dpuse/dpuse-shared) | 1.0.136 | MIT | [LICENSE](licenses/downloads/@dpuse/dpuse-shared@1.0.136-LICENSE.txt) |
|
|
65
65
|
| [csv-parse](https://github.com/adaltas/node-csv) | 7.0.3 | MIT | [LICENSE](licenses/downloads/csv-parse@7.0.3-LICENSE.txt) |
|
|
66
66
|
| [valibot](https://github.com/open-circle/valibot) | 1.5.0 | MIT | [LICENSE](licenses/downloads/valibot@1.5.0-LICENSE.txt) |
|
|
67
67
|
|
|
@@ -69,9 +69,9 @@ License data is updated each time `npm run document` is run, using [license-chec
|
|
|
69
69
|
|
|
70
70
|
The dependency tree below shows how each package in the table above is reached — direct and transitive — along with its installed version, release date, and update status. A package that does not ship itself, such as one whose parts are bundled separately, is left out and what ships beneath it is shown in its place. Packages flagged ❗ have a newer version available; ⚠️ indicates a package that hasn't been updated in the last 6 months or longer. Neither flag necessarily indicates a problem: we let new releases stabilise before upgrading, and some packages are mature and stable (have limited or no dependencies), so they require no active development.
|
|
71
71
|
|
|
72
|
-
- **[@dpuse/dpuse-shared](https://github.com/dpuse/dpuse-shared)** 1.0.
|
|
72
|
+
- **[@dpuse/dpuse-shared](https://github.com/dpuse/dpuse-shared)** 1.0.136 — this month: 2026-10-25
|
|
73
73
|
- **[valibot](https://github.com/open-circle/valibot)** 1.5.0 — 1 mth ago: 2026-09-09
|
|
74
|
-
- **[csv-parse](https://github.com/adaltas/node-csv)** 7.0.3 —
|
|
74
|
+
- **[csv-parse](https://github.com/adaltas/node-csv)** 7.0.3 — 1 mth ago: 2026-09-25
|
|
75
75
|
|
|
76
76
|
<!-- DEPENDENCY_LICENSES_END -->
|
|
77
77
|
|
|
@@ -85,10 +85,10 @@ _Note: Sonda's Vite reports currently exclude CSS files, since Vite does not gen
|
|
|
85
85
|
|
|
86
86
|
| Chunk/Module/File | Composition |
|
|
87
87
|
| :-------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------- |
|
|
88
|
-
| **dist/dpuse-tool-adaltas-csv-parser.es.js** | 125.
|
|
89
|
-
| csv-parse → dist/esm/index.js | `████████████████░░░░` 78.
|
|
90
|
-
| @dpuse/dpuse-shared → dist/dpuse-shared.es.js | `██░░░░░░░░░░░░░░░░░░` 12.
|
|
91
|
-
| src → index.ts | `█░░░░░░░░░░░░░░░░░░░` 3.4% · 4.
|
|
88
|
+
| **dist/dpuse-tool-adaltas-csv-parser.es.js** | 125.9 kB · gzip 31.6 kB · 100.0% of the build |
|
|
89
|
+
| csv-parse → dist/esm/index.js | `████████████████░░░░` 78.8% · 99.2 kB |
|
|
90
|
+
| @dpuse/dpuse-shared → dist/dpuse-shared.es.js | `██░░░░░░░░░░░░░░░░░░` 12.1% · 15.2 kB |
|
|
91
|
+
| src → index.ts | `█░░░░░░░░░░░░░░░░░░░` 3.4% · 4.3 kB |
|
|
92
92
|
| (bundler output, whitespace & JSON) | `█░░░░░░░░░░░░░░░░░░░` 5.7% · 7.2 kB |
|
|
93
93
|
|
|
94
94
|
Bars show each row's share of its output file.
|
|
@@ -2900,7 +2900,7 @@ var Tr = {
|
|
|
2900
2900
|
status: /* @__PURE__ */ Z(Cr),
|
|
2901
2901
|
statusId: /* @__PURE__ */ Z(Sr)
|
|
2902
2902
|
};
|
|
2903
|
-
({ ...Tr }), J({ en: "Data Positioning Events" }), J({ en: "Delimited Text" }), J({ en: "JSON" }), J({ en: "JSON Lines" }), J({ en: "Markdown" }), J({ en: "SPSS" }), J({ en: "Plain Text" }), J({ en: "XLSX" }), J({ en: "XML" }), J({ en: "Newline" }), J({ en: "Carriage Return" }), J({ en: "Carriage Return/Newline" }), J({ en: "Colon" }), J({ en: "Comma" }), J({ en: "Exclamation Mark" }), J({ en: "Record Separator" }), J({ en: "Semicolon" }), J({ en: "Space" }), J({ en: "Tab" }), J({ en: "Underscore" }), J({ en: "Unit Separator" }), J({ en: "Vertical Bar" }), $([
|
|
2903
|
+
({ ...Tr }), J({ en: "Apache Arrow" }), J({ en: "Apache Avro" }), J({ en: "Data Positioning Events" }), J({ en: "Delimited Text" }), J({ en: "JSON" }), J({ en: "JSON Lines" }), J({ en: "Markdown" }), J({ en: "OpenDocument Spreadsheet" }), J({ en: "Apache Parquet" }), J({ en: "SPSS" }), J({ en: "SQLite" }), J({ en: "Plain Text" }), J({ en: "XLSM" }), J({ en: "XLSX" }), J({ en: "XML" }), J({ en: "Newline" }), J({ en: "Carriage Return" }), J({ en: "Carriage Return/Newline" }), J({ en: "Colon" }), J({ en: "Comma" }), J({ en: "Exclamation Mark" }), J({ en: "Record Separator" }), J({ en: "Semicolon" }), J({ en: "Space" }), J({ en: "Tab" }), J({ en: "Underscore" }), J({ en: "Unit Separator" }), J({ en: "Vertical Bar" }), $([
|
|
2904
2904
|
"app",
|
|
2905
2905
|
"engine",
|
|
2906
2906
|
"connector",
|
|
@@ -3522,12 +3522,12 @@ var Lr = {
|
|
|
3522
3522
|
});
|
|
3523
3523
|
});
|
|
3524
3524
|
}
|
|
3525
|
-
async parseText(e, t) {
|
|
3526
|
-
let
|
|
3525
|
+
async parseText(e, t, n = !1) {
|
|
3526
|
+
let r = Ur(e), { parsedRecords: i, valueDelimiterId: a } = await Wr(e, t, n);
|
|
3527
3527
|
return {
|
|
3528
|
-
parsedRecords:
|
|
3529
|
-
recordDelimiterId:
|
|
3530
|
-
valueDelimiterId:
|
|
3528
|
+
parsedRecords: i,
|
|
3529
|
+
recordDelimiterId: r,
|
|
3530
|
+
valueDelimiterId: a
|
|
3531
3531
|
};
|
|
3532
3532
|
}
|
|
3533
3533
|
};
|
|
@@ -3564,27 +3564,27 @@ function Ur(e) {
|
|
|
3564
3564
|
let t = (e.match(/\r\n/g) ?? []).length, n = (e.match(/(?<!\r)\n/g) ?? []).length, r = (e.match(/\r(?!\n)/g) ?? []).length;
|
|
3565
3565
|
return t >= n && t >= r ? "\r\n" : n >= t && n >= r ? "\n" : r >= t && r >= n ? "\r" : "\n";
|
|
3566
3566
|
}
|
|
3567
|
-
async function Wr(e, t) {
|
|
3568
|
-
let
|
|
3569
|
-
for (let
|
|
3570
|
-
let { error: t, records:
|
|
3567
|
+
async function Wr(e, t, n) {
|
|
3568
|
+
let r, i, a, o = [], s, c = !1;
|
|
3569
|
+
for (let l of t) {
|
|
3570
|
+
let { error: t, records: u } = await Gr(e, l, n);
|
|
3571
3571
|
if (t != null) {
|
|
3572
|
-
|
|
3572
|
+
s ??= t;
|
|
3573
3573
|
continue;
|
|
3574
3574
|
}
|
|
3575
|
-
if (
|
|
3576
|
-
let { averageValueCount:
|
|
3577
|
-
(!
|
|
3575
|
+
if (c = !0, u.length === 0) continue;
|
|
3576
|
+
let { averageValueCount: d, sumOfValueCountDiffs: f } = Kr(u);
|
|
3577
|
+
(!a || f <= a) && (!i || d > i) && (r = l, i = d, a = f, o = u);
|
|
3578
3578
|
}
|
|
3579
|
-
if (!
|
|
3579
|
+
if (!c && s != null) throw s;
|
|
3580
3580
|
return {
|
|
3581
|
-
parsedRecords:
|
|
3582
|
-
valueDelimiterId:
|
|
3581
|
+
parsedRecords: o,
|
|
3582
|
+
valueDelimiterId: r != null && qr(o) ? r : void 0
|
|
3583
3583
|
};
|
|
3584
3584
|
}
|
|
3585
|
-
function Gr(e, t) {
|
|
3586
|
-
return new Promise((
|
|
3587
|
-
let
|
|
3585
|
+
function Gr(e, t, n) {
|
|
3586
|
+
return new Promise((r) => {
|
|
3587
|
+
let i = [], a = ar({
|
|
3588
3588
|
...Lr,
|
|
3589
3589
|
cast: (e, t) => ({
|
|
3590
3590
|
value: e,
|
|
@@ -3593,16 +3593,16 @@ function Gr(e, t) {
|
|
|
3593
3593
|
delimiter: t,
|
|
3594
3594
|
relax_column_count: !0
|
|
3595
3595
|
});
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
}),
|
|
3599
|
-
n
|
|
3596
|
+
a.on("data", (e) => {
|
|
3597
|
+
i.push(e);
|
|
3598
|
+
}), a.on("error", (e) => {
|
|
3599
|
+
r(!n && e.code === "CSV_QUOTE_NOT_CLOSED" ? { records: i } : {
|
|
3600
3600
|
error: e,
|
|
3601
|
-
records:
|
|
3601
|
+
records: i
|
|
3602
3602
|
});
|
|
3603
|
-
}),
|
|
3604
|
-
|
|
3605
|
-
}),
|
|
3603
|
+
}), a.on("end", () => {
|
|
3604
|
+
r({ records: i });
|
|
3605
|
+
}), a.write(e), a.end();
|
|
3606
3606
|
});
|
|
3607
3607
|
}
|
|
3608
3608
|
function Kr(e) {
|