@ai-matrx/records 0.76.14 → 0.76.16
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 +10 -0
- package/dist/core/index.cjs +1 -32
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +2 -33
- package/dist/core/index.js.map +1 -1
- package/dist/memory/index.cjs.map +1 -1
- package/dist/memory/index.d.cts +1 -1
- package/dist/memory/index.d.ts +1 -1
- package/dist/memory/index.js.map +1 -1
- package/dist/templates/index.cjs +0 -1
- package/dist/templates/index.cjs.map +1 -1
- package/dist/templates/index.d.cts +2 -2
- package/dist/templates/index.d.ts +2 -2
- package/dist/templates/index.js +0 -1
- package/dist/templates/index.js.map +1 -1
- package/dist/{types-DvhixdUB.d.ts → types-C6gdqgsI.d.ts} +1 -1
- package/dist/{types-D9HN8YZS.d.cts → types-Mx-Wzm_d.d.cts} +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/records
|
|
2
2
|
|
|
3
|
+
## 0.76.16
|
|
4
|
+
|
|
5
|
+
- `importCsv` / `parseCsv` give back the values our own guarded exports were written from (`'+1 949 807 2145` → `+1 949 807 2145`), through kit 0.32.0's `parseDelimited` (AP-2 A1/A7). Test: `src/core/io.test.ts`. Needs kit 0.32.0.
|
|
6
|
+
|
|
7
|
+
## 0.76.15
|
|
8
|
+
|
|
9
|
+
- `parseCsv` / `importCsv` read through THE one reader, kit `parseDelimited` (AP-2; was a hand-rolled char loop). Needs kit 0.31.0.
|
|
10
|
+
|
|
11
|
+
**Consumer action:** none.
|
|
12
|
+
|
|
3
13
|
## 0.76.14
|
|
4
14
|
|
|
5
15
|
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
package/dist/core/index.cjs
CHANGED
|
@@ -9908,38 +9908,7 @@ async function exportXlsx(fields, rows2, sheetLabel = "Records") {
|
|
|
9908
9908
|
return writeWorkbookBytes({ sheets: [{ name, rows: toAoa(fields, rows2) }] });
|
|
9909
9909
|
}
|
|
9910
9910
|
function parseCsv(text2) {
|
|
9911
|
-
|
|
9912
|
-
let row = [];
|
|
9913
|
-
let cell = "";
|
|
9914
|
-
let quoted = false;
|
|
9915
|
-
for (let i = 0; i < text2.length; i += 1) {
|
|
9916
|
-
const ch = text2[i];
|
|
9917
|
-
if (quoted) {
|
|
9918
|
-
if (ch === '"') {
|
|
9919
|
-
if (text2[i + 1] === '"') {
|
|
9920
|
-
cell += '"';
|
|
9921
|
-
i += 1;
|
|
9922
|
-
} else quoted = false;
|
|
9923
|
-
} else cell += ch;
|
|
9924
|
-
continue;
|
|
9925
|
-
}
|
|
9926
|
-
if (ch === '"') quoted = true;
|
|
9927
|
-
else if (ch === ",") {
|
|
9928
|
-
row.push(cell);
|
|
9929
|
-
cell = "";
|
|
9930
|
-
} else if (ch === "\n" || ch === "\r") {
|
|
9931
|
-
if (ch === "\r" && text2[i + 1] === "\n") i += 1;
|
|
9932
|
-
row.push(cell);
|
|
9933
|
-
rows2.push(row);
|
|
9934
|
-
row = [];
|
|
9935
|
-
cell = "";
|
|
9936
|
-
} else cell += ch;
|
|
9937
|
-
}
|
|
9938
|
-
if (cell.length > 0 || row.length > 0) {
|
|
9939
|
-
row.push(cell);
|
|
9940
|
-
rows2.push(row);
|
|
9941
|
-
}
|
|
9942
|
-
return rows2;
|
|
9911
|
+
return (0, import_delimited.parseDelimited)(text2, { delimiter: ",", skipEmptyLines: true }).data;
|
|
9943
9912
|
}
|
|
9944
9913
|
function importCsv(text2) {
|
|
9945
9914
|
return fromMatrix(parseCsv(text2));
|