javascript-excel 2.2.0 → 2.3.0
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 +4 -2
- package/dist/{csv-CrWF7JS1.js → csv-Bck8eW_D.js} +29 -7
- package/dist/{csv-DzGOFyHs.cjs → csv-f4P3fGs-.cjs} +34 -6
- package/dist/csv.cjs +1 -1
- package/dist/csv.d.cts +8 -0
- package/dist/csv.d.ts +8 -0
- package/dist/csv.js +1 -1
- package/dist/import.cjs +1 -1
- package/dist/import.d.cts +2 -2
- package/dist/import.d.ts +2 -2
- package/dist/import.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{pipeline-BNhGRJcx.js → pipeline-2dgQM9E9.js} +267 -134
- package/dist/{pipeline-6PmlmH1-.d.ts → pipeline-Bh7FUyzW.d.ts} +40 -6
- package/dist/{pipeline-C63qD7Ym.d.cts → pipeline-D1eAhqJu.d.cts} +40 -6
- package/dist/{pipeline-DLYtAkPU.cjs → pipeline-LCTU0Eg_.cjs} +267 -134
- package/dist/{read-D5Gz4ph8.cjs → read-BYI7EVMo.cjs} +236 -52
- package/dist/{read-CFmZioBG.js → read-BnXzPjGc.js} +225 -53
- package/dist/read.cjs +1 -1
- package/dist/read.d.cts +20 -2
- package/dist/read.d.ts +20 -2
- package/dist/read.js +1 -1
- package/dist/worker.cjs +3 -3
- package/dist/worker.d.cts +1 -1
- package/dist/worker.d.ts +1 -1
- package/dist/worker.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -153,6 +153,8 @@ const { columns, data, issues, meta } = await importDataset(file, {
|
|
|
153
153
|
console.log(meta.header, columns.map((c) => `${c.key}: ${c.type}`), data.length, issues);
|
|
154
154
|
```
|
|
155
155
|
|
|
156
|
+
A field typed `'day'` (in `types` or the schema) holds a calendar day: a date-time such as `31.10.2026 08:15` becomes 00:00 of 2026-10-31 in `dateZone`, and `toCsv` writes it as `2026-10-31`. `'date'` keeps the time of day.
|
|
157
|
+
|
|
156
158
|
## In a Web Worker
|
|
157
159
|
|
|
158
160
|
<!-- example: examples/snippets/src/worker.ts -->
|
|
@@ -179,13 +181,13 @@ const bytes = await excel.write(workbook, { signal: controller.signal, onProgres
|
|
|
179
181
|
- **Reader:** `.xlsx`, `.xlsm`, `.xltx` and `.xltm`, including ISO 29500 Strict files.
|
|
180
182
|
- Reads values, shared, inline and rich strings, and formula text with cached values (shared formulas expanded).
|
|
181
183
|
- Styles come back as shared frozen objects. Merges, column widths and row heights, views and panes, print setup, hyperlinks, defined names and document properties are read too.
|
|
182
|
-
- **Untrusted files:** bounded by limits on size, zip entries, compression ratio, XML depth and token length, sheets, cells and
|
|
184
|
+
- **Untrusted files:** bounded by limits on size, zip entries, compression ratio, XML depth and token length, sheets, cells, shared strings and the length of one cell's text. A `DOCTYPE` is rejected, nothing is ever fetched or executed, and file content never becomes an object key.
|
|
183
185
|
- **Rejected formats:** `.xls`, `.xlsb`, `.ods` and encrypted files throw `UNSUPPORTED_FORMAT`.
|
|
184
186
|
- **CSV:** RFC 4180 parsing with delimiter detection, BOM and CRLF/LF/CR handling, lenient or strict modes, and optional type inference. `readCsv` decodes bytes in any `TextDecoder` encoding. Serializing gives you quoting, a BOM for Excel, ISO dates and a formula-injection guard, which is on by default.
|
|
185
187
|
- **Datasets:** `fromDataset` and `fromDatasets` support `key`, `path` and function accessors, grouped headers, number formats, widths and a totals row. `toDataset` reads a sheet back into `{ columns, data }`.
|
|
186
188
|
- **DOM:** `fromTable` handles `colspan`/`rowspan` merges, `data-*` type hints and computed styles. `download()` needs no dependency, and the module is safe to import during SSR.
|
|
187
189
|
- **Worker:** progress, warnings and `AbortSignal` work across the boundary, and results are transferred, not copied.
|
|
188
|
-
- **Import:** `importDataset` turns a user's `.xlsx` or `.csv` into `{ columns, data }`. It detects title and header rows, including multi-row headers. It infers column types all-or-nothing, parses numbers and dates in an explicit locale (`1.234,56`, `15/01/2024`) and maps columns to your fields by name or alias. Problems are reported per row with their cell. Preview reads (`preview`) and `maxRows` stop reading early, and it also runs in the worker.
|
|
190
|
+
- **Import:** `importDataset` turns a user's `.xlsx` or `.csv` into `{ columns, data }`. It detects title and header rows, including multi-row headers. It infers column types all-or-nothing, parses numbers and dates in an explicit locale (`1.234,56`, `15/01/2024`, and with `twoDigitYearPivot` two-digit years such as `31.10.26`) and maps columns to your fields by name or alias. Problems are reported per row with their cell. Preview reads (`preview`) and `maxRows` stop reading early, and it also runs in the worker.
|
|
189
191
|
- **Not in 2.0:** `.xls`/`.xlsb`/`.ods`, charts, images, comments, pivot tables, conditional formatting and formula evaluation. These are planned for later releases, not ruled out.
|
|
190
192
|
|
|
191
193
|
## Runtime support
|
|
@@ -66,6 +66,18 @@ function cellRef(row, col) {
|
|
|
66
66
|
}
|
|
67
67
|
return `${name}${row + 1}`;
|
|
68
68
|
}
|
|
69
|
+
// src/internal/csv/parse.ts
|
|
70
|
+
/**
|
|
71
|
+
* CSV parser (RFC 4180, lenient by default). docs/api.md §5.3.
|
|
72
|
+
*
|
|
73
|
+
* A hand-written scanner: one pass over the string, no regular expressions on
|
|
74
|
+
* the hot path, no recursion. The parser works one record at a time, so the
|
|
75
|
+
* async API can stop between records to check an AbortSignal and yield.
|
|
76
|
+
*/
|
|
77
|
+
/** Default `maxFieldBytes`: 1 MiB of UTF-8 per field. */
|
|
78
|
+
const DEFAULT_MAX_FIELD_BYTES = 1048576;
|
|
79
|
+
/** Default `maxCellTextLength`: 1 Mi UTF-16 code units per field, as `DEFAULT_READ_LIMITS` for xlsx (JSE-58). */
|
|
80
|
+
const DEFAULT_MAX_CELL_TEXT_LENGTH = 1048576;
|
|
69
81
|
/** Default `maxWarnings`: warnings kept per parse before the cap (internal/warning-cap.ts) applies. */
|
|
70
82
|
const MAX_WARNINGS = 1e3;
|
|
71
83
|
const CANDIDATES = [
|
|
@@ -271,12 +283,20 @@ var CsvParser = class {
|
|
|
271
283
|
}
|
|
272
284
|
checkSize(value, row, col) {
|
|
273
285
|
const max = this.cfg.maxFieldBytes;
|
|
274
|
-
if (value.length * 3
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
286
|
+
if (value.length * 3 > max) {
|
|
287
|
+
const bytes = utf8Length(value);
|
|
288
|
+
if (bytes > max) throw new LimitError("LIMIT_EXCEEDED", `Field at row ${row + 1} is ${bytes} bytes; maxFieldBytes is ${max}.`, { details: {
|
|
289
|
+
limit: "maxFieldBytes",
|
|
290
|
+
value: bytes,
|
|
291
|
+
max,
|
|
292
|
+
ref: cellRef(row, col)
|
|
293
|
+
} });
|
|
294
|
+
}
|
|
295
|
+
const maxText = this.cfg.maxCellTextLength;
|
|
296
|
+
if (value.length > maxText) throw new LimitError("LIMIT_EXCEEDED", `Field at row ${row + 1} is ${value.length} characters; maxCellTextLength is ${maxText}.`, { details: {
|
|
297
|
+
limit: "maxCellTextLength",
|
|
298
|
+
value: value.length,
|
|
299
|
+
max: maxText,
|
|
280
300
|
ref: cellRef(row, col)
|
|
281
301
|
} });
|
|
282
302
|
}
|
|
@@ -317,6 +337,7 @@ function validateConfig(cfg) {
|
|
|
317
337
|
if (cfg.delimiterCandidates !== void 0) checkCandidates(cfg.delimiterCandidates, cfg.quote);
|
|
318
338
|
if (!(cfg.maxRows >= 0)) throw new TypeError("maxRows must be a non-negative number");
|
|
319
339
|
if (!(cfg.maxFieldBytes > 0)) throw new TypeError("maxFieldBytes must be a positive number");
|
|
340
|
+
if (!(cfg.maxCellTextLength > 0)) throw new TypeError("maxCellTextLength must be a positive number");
|
|
320
341
|
checkMaxWarnings("maxWarnings", cfg.maxWarnings);
|
|
321
342
|
}
|
|
322
343
|
/** A delimiter or quote: exactly one UTF-16 code unit, not CR or LF. */
|
|
@@ -551,6 +572,7 @@ function parseConfig(options) {
|
|
|
551
572
|
strict: (o.mode ?? "lenient") === "strict",
|
|
552
573
|
maxRows: o.maxRows ?? Number.POSITIVE_INFINITY,
|
|
553
574
|
maxFieldBytes: o.maxFieldBytes ?? 1048576,
|
|
575
|
+
maxCellTextLength: o.maxCellTextLength === void 0 ? DEFAULT_MAX_CELL_TEXT_LENGTH : o.maxCellTextLength,
|
|
554
576
|
dateZone: o.dateZone ?? "local",
|
|
555
577
|
maxWarnings: o.maxWarnings === void 0 ? MAX_WARNINGS : o.maxWarnings
|
|
556
578
|
};
|
|
@@ -659,4 +681,4 @@ function yieldToEventLoop() {
|
|
|
659
681
|
else Promise.resolve().then(resolve);
|
|
660
682
|
});
|
|
661
683
|
}
|
|
662
|
-
export { toCsvBlob as a, toCsv as i, parseCsv as n, readCsv as r, CSV_MIME as t };
|
|
684
|
+
export { toCsvBlob as a, toCsv as i, parseCsv as n, DEFAULT_MAX_FIELD_BYTES as o, readCsv as r, CSV_MIME as t };
|
|
@@ -66,6 +66,18 @@ function cellRef(row, col) {
|
|
|
66
66
|
}
|
|
67
67
|
return `${name}${row + 1}`;
|
|
68
68
|
}
|
|
69
|
+
// src/internal/csv/parse.ts
|
|
70
|
+
/**
|
|
71
|
+
* CSV parser (RFC 4180, lenient by default). docs/api.md §5.3.
|
|
72
|
+
*
|
|
73
|
+
* A hand-written scanner: one pass over the string, no regular expressions on
|
|
74
|
+
* the hot path, no recursion. The parser works one record at a time, so the
|
|
75
|
+
* async API can stop between records to check an AbortSignal and yield.
|
|
76
|
+
*/
|
|
77
|
+
/** Default `maxFieldBytes`: 1 MiB of UTF-8 per field. */
|
|
78
|
+
const DEFAULT_MAX_FIELD_BYTES = 1048576;
|
|
79
|
+
/** Default `maxCellTextLength`: 1 Mi UTF-16 code units per field, as `DEFAULT_READ_LIMITS` for xlsx (JSE-58). */
|
|
80
|
+
const DEFAULT_MAX_CELL_TEXT_LENGTH = 1048576;
|
|
69
81
|
/** Default `maxWarnings`: warnings kept per parse before the cap (internal/warning-cap.ts) applies. */
|
|
70
82
|
const MAX_WARNINGS = 1e3;
|
|
71
83
|
const CANDIDATES = [
|
|
@@ -271,12 +283,20 @@ var CsvParser = class {
|
|
|
271
283
|
}
|
|
272
284
|
checkSize(value, row, col) {
|
|
273
285
|
const max = this.cfg.maxFieldBytes;
|
|
274
|
-
if (value.length * 3
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
286
|
+
if (value.length * 3 > max) {
|
|
287
|
+
const bytes = utf8Length(value);
|
|
288
|
+
if (bytes > max) throw new require_errors.LimitError("LIMIT_EXCEEDED", `Field at row ${row + 1} is ${bytes} bytes; maxFieldBytes is ${max}.`, { details: {
|
|
289
|
+
limit: "maxFieldBytes",
|
|
290
|
+
value: bytes,
|
|
291
|
+
max,
|
|
292
|
+
ref: cellRef(row, col)
|
|
293
|
+
} });
|
|
294
|
+
}
|
|
295
|
+
const maxText = this.cfg.maxCellTextLength;
|
|
296
|
+
if (value.length > maxText) throw new require_errors.LimitError("LIMIT_EXCEEDED", `Field at row ${row + 1} is ${value.length} characters; maxCellTextLength is ${maxText}.`, { details: {
|
|
297
|
+
limit: "maxCellTextLength",
|
|
298
|
+
value: value.length,
|
|
299
|
+
max: maxText,
|
|
280
300
|
ref: cellRef(row, col)
|
|
281
301
|
} });
|
|
282
302
|
}
|
|
@@ -317,6 +337,7 @@ function validateConfig(cfg) {
|
|
|
317
337
|
if (cfg.delimiterCandidates !== void 0) checkCandidates(cfg.delimiterCandidates, cfg.quote);
|
|
318
338
|
if (!(cfg.maxRows >= 0)) throw new TypeError("maxRows must be a non-negative number");
|
|
319
339
|
if (!(cfg.maxFieldBytes > 0)) throw new TypeError("maxFieldBytes must be a positive number");
|
|
340
|
+
if (!(cfg.maxCellTextLength > 0)) throw new TypeError("maxCellTextLength must be a positive number");
|
|
320
341
|
require_infer.checkMaxWarnings("maxWarnings", cfg.maxWarnings);
|
|
321
342
|
}
|
|
322
343
|
/** A delimiter or quote: exactly one UTF-16 code unit, not CR or LF. */
|
|
@@ -551,6 +572,7 @@ function parseConfig(options) {
|
|
|
551
572
|
strict: (o.mode ?? "lenient") === "strict",
|
|
552
573
|
maxRows: o.maxRows ?? Number.POSITIVE_INFINITY,
|
|
553
574
|
maxFieldBytes: o.maxFieldBytes ?? 1048576,
|
|
575
|
+
maxCellTextLength: o.maxCellTextLength === void 0 ? DEFAULT_MAX_CELL_TEXT_LENGTH : o.maxCellTextLength,
|
|
554
576
|
dateZone: o.dateZone ?? "local",
|
|
555
577
|
maxWarnings: o.maxWarnings === void 0 ? MAX_WARNINGS : o.maxWarnings
|
|
556
578
|
};
|
|
@@ -665,6 +687,12 @@ Object.defineProperty(exports, "CSV_MIME", {
|
|
|
665
687
|
return CSV_MIME;
|
|
666
688
|
}
|
|
667
689
|
});
|
|
690
|
+
Object.defineProperty(exports, "DEFAULT_MAX_FIELD_BYTES", {
|
|
691
|
+
enumerable: true,
|
|
692
|
+
get: function() {
|
|
693
|
+
return DEFAULT_MAX_FIELD_BYTES;
|
|
694
|
+
}
|
|
695
|
+
});
|
|
668
696
|
Object.defineProperty(exports, "parseCsv", {
|
|
669
697
|
enumerable: true,
|
|
670
698
|
get: function() {
|
package/dist/csv.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_warnings = require("./warnings-CJPiDqei.cjs");
|
|
3
|
-
const require_csv = require("./csv-
|
|
3
|
+
const require_csv = require("./csv-f4P3fGs-.cjs");
|
|
4
4
|
exports.CSV_MIME = require_csv.CSV_MIME;
|
|
5
5
|
exports.isDataLossWarning = require_warnings.isDataLossWarning;
|
|
6
6
|
exports.parseCsv = require_csv.parseCsv;
|
package/dist/csv.d.cts
CHANGED
|
@@ -44,6 +44,14 @@ export interface CsvParseOptions {
|
|
|
44
44
|
maxRows?: number | undefined;
|
|
45
45
|
/** Largest field, in UTF-8 bytes; a bigger one throws `LimitError` (`LIMIT_EXCEEDED`). Default 1,048,576 (1 MiB). */
|
|
46
46
|
maxFieldBytes?: number | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Longest field, in characters (UTF-16 code units, as `string.length` counts them, after
|
|
49
|
+
* unquoting); a longer one throws `LimitError` (`LIMIT_EXCEEDED`, `details.limit`
|
|
50
|
+
* `'maxCellTextLength'`). The same limit as `ReadLimits.maxCellTextLength` for xlsx (added in
|
|
51
|
+
* 2.3). Both this and `maxFieldBytes` apply; with both defaults a field over 1 MiB is reported
|
|
52
|
+
* as `maxFieldBytes`, as before. A positive number; default 1,048,576 (1 Mi).
|
|
53
|
+
*/
|
|
54
|
+
maxCellTextLength?: number | undefined;
|
|
47
55
|
/**
|
|
48
56
|
* Warnings kept before the cap applies (as `ReadLimits.maxWarnings` for `read`). Past it,
|
|
49
57
|
* informational warnings are dropped and counted in one `WARNINGS_TRUNCATED` at the end;
|
package/dist/csv.d.ts
CHANGED
|
@@ -44,6 +44,14 @@ export interface CsvParseOptions {
|
|
|
44
44
|
maxRows?: number | undefined;
|
|
45
45
|
/** Largest field, in UTF-8 bytes; a bigger one throws `LimitError` (`LIMIT_EXCEEDED`). Default 1,048,576 (1 MiB). */
|
|
46
46
|
maxFieldBytes?: number | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Longest field, in characters (UTF-16 code units, as `string.length` counts them, after
|
|
49
|
+
* unquoting); a longer one throws `LimitError` (`LIMIT_EXCEEDED`, `details.limit`
|
|
50
|
+
* `'maxCellTextLength'`). The same limit as `ReadLimits.maxCellTextLength` for xlsx (added in
|
|
51
|
+
* 2.3). Both this and `maxFieldBytes` apply; with both defaults a field over 1 MiB is reported
|
|
52
|
+
* as `maxFieldBytes`, as before. A positive number; default 1,048,576 (1 Mi).
|
|
53
|
+
*/
|
|
54
|
+
maxCellTextLength?: number | undefined;
|
|
47
55
|
/**
|
|
48
56
|
* Warnings kept before the cap applies (as `ReadLimits.maxWarnings` for `read`). Past it,
|
|
49
57
|
* informational warnings are dropped and counted in one `WARNINGS_TRUNCATED` at the end;
|
package/dist/csv.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as isDataLossWarning } from "./warnings-BPz1Ia3s.js";
|
|
2
|
-
import { a as toCsvBlob, i as toCsv, n as parseCsv, r as readCsv, t as CSV_MIME } from "./csv-
|
|
2
|
+
import { a as toCsvBlob, i as toCsv, n as parseCsv, r as readCsv, t as CSV_MIME } from "./csv-Bck8eW_D.js";
|
|
3
3
|
export { CSV_MIME, isDataLossWarning, parseCsv, readCsv, toCsv, toCsvBlob };
|
package/dist/import.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_pipeline = require("./pipeline-
|
|
2
|
+
const require_pipeline = require("./pipeline-LCTU0Eg_.cjs");
|
|
3
3
|
const require_warnings = require("./warnings-CJPiDqei.cjs");
|
|
4
4
|
exports.applyMapping = require_pipeline.applyMapping;
|
|
5
5
|
exports.coerceColumns = require_pipeline.coerceColumns;
|
package/dist/import.d.cts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* (docs/api.md §5.6). Header detection, type inference, locale-aware
|
|
4
4
|
* parsing and column mapping, plus the `importDataset` pipeline.
|
|
5
5
|
*/
|
|
6
|
-
import { A as
|
|
6
|
+
import { A as NumberGroup, C as coerceColumns, D as ImportLocale, E as HeaderDetection, M as parseNumber, O as detectHeader, S as TypeOptions, T as DetectHeaderOptions, _ as ColumnType, a as ImportProgress, b as ImportIssueCode, c as FieldSpec, d as MappableDataset, f as MappedDataset, g as CoerceResult, h as mapColumns, i as ImportMeta, j as parseDate, k as DateOrder, l as ImportSchema, m as applyMapping, n as ImportDatasetOptions, o as importDataset, p as MappingResult, r as ImportDatasetResult, s as ColumnMapping, t as DroppedIssues, u as ImportedColumn, v as DatasetLike, w as inferColumnTypes, x as InferredColumn, y as ImportIssue } from "./pipeline-D1eAhqJu.cjs";
|
|
7
7
|
import { a as isDataLossWarning, c as BlobType, i as ExcelWarningCode, n as ExcelPartKind, o as BinaryInput, r as ExcelWarning, s as BlobLike, t as DroppedWarnings } from "./warnings-DhonqJ7A.cjs";
|
|
8
8
|
import { t as AbortSignalLike } from "./signal-Dz0ZYe6d.cjs";
|
|
9
9
|
import { ReadLimits, SheetInfo } from "./read.cjs";
|
|
10
|
-
export { type AbortSignalLike, type BinaryInput, type BlobLike, type BlobType, type CoerceResult, type ColumnMapping, type ColumnType, type DatasetLike, type DateOrder, type DetectHeaderOptions, type DroppedWarnings, type ExcelPartKind, type ExcelWarning, type ExcelWarningCode, type FieldSpec, type HeaderDetection, type ImportDatasetOptions, type ImportDatasetResult, type ImportIssue, type ImportIssueCode, type ImportLocale, type ImportMeta, type ImportProgress, type ImportSchema, type ImportedColumn, type InferredColumn, type MappableDataset, type MappedDataset, type MappingResult, type NumberGroup, type ReadLimits, type SheetInfo, type TypeOptions, applyMapping, coerceColumns, detectHeader, importDataset, inferColumnTypes, isDataLossWarning, mapColumns, parseDate, parseNumber };
|
|
10
|
+
export { type AbortSignalLike, type BinaryInput, type BlobLike, type BlobType, type CoerceResult, type ColumnMapping, type ColumnType, type DatasetLike, type DateOrder, type DetectHeaderOptions, type DroppedIssues, type DroppedWarnings, type ExcelPartKind, type ExcelWarning, type ExcelWarningCode, type FieldSpec, type HeaderDetection, type ImportDatasetOptions, type ImportDatasetResult, type ImportIssue, type ImportIssueCode, type ImportLocale, type ImportMeta, type ImportProgress, type ImportSchema, type ImportedColumn, type InferredColumn, type MappableDataset, type MappedDataset, type MappingResult, type NumberGroup, type ReadLimits, type SheetInfo, type TypeOptions, applyMapping, coerceColumns, detectHeader, importDataset, inferColumnTypes, isDataLossWarning, mapColumns, parseDate, parseNumber };
|
package/dist/import.d.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* (docs/api.md §5.6). Header detection, type inference, locale-aware
|
|
4
4
|
* parsing and column mapping, plus the `importDataset` pipeline.
|
|
5
5
|
*/
|
|
6
|
-
import { A as
|
|
6
|
+
import { A as NumberGroup, C as coerceColumns, D as ImportLocale, E as HeaderDetection, M as parseNumber, O as detectHeader, S as TypeOptions, T as DetectHeaderOptions, _ as ColumnType, a as ImportProgress, b as ImportIssueCode, c as FieldSpec, d as MappableDataset, f as MappedDataset, g as CoerceResult, h as mapColumns, i as ImportMeta, j as parseDate, k as DateOrder, l as ImportSchema, m as applyMapping, n as ImportDatasetOptions, o as importDataset, p as MappingResult, r as ImportDatasetResult, s as ColumnMapping, t as DroppedIssues, u as ImportedColumn, v as DatasetLike, w as inferColumnTypes, x as InferredColumn, y as ImportIssue } from "./pipeline-Bh7FUyzW.js";
|
|
7
7
|
import { a as isDataLossWarning, c as BlobType, i as ExcelWarningCode, n as ExcelPartKind, o as BinaryInput, r as ExcelWarning, s as BlobLike, t as DroppedWarnings } from "./warnings-DhonqJ7A.js";
|
|
8
8
|
import { t as AbortSignalLike } from "./signal-Dz0ZYe6d.js";
|
|
9
9
|
import { ReadLimits, SheetInfo } from "./read.js";
|
|
10
|
-
export { type AbortSignalLike, type BinaryInput, type BlobLike, type BlobType, type CoerceResult, type ColumnMapping, type ColumnType, type DatasetLike, type DateOrder, type DetectHeaderOptions, type DroppedWarnings, type ExcelPartKind, type ExcelWarning, type ExcelWarningCode, type FieldSpec, type HeaderDetection, type ImportDatasetOptions, type ImportDatasetResult, type ImportIssue, type ImportIssueCode, type ImportLocale, type ImportMeta, type ImportProgress, type ImportSchema, type ImportedColumn, type InferredColumn, type MappableDataset, type MappedDataset, type MappingResult, type NumberGroup, type ReadLimits, type SheetInfo, type TypeOptions, applyMapping, coerceColumns, detectHeader, importDataset, inferColumnTypes, isDataLossWarning, mapColumns, parseDate, parseNumber };
|
|
10
|
+
export { type AbortSignalLike, type BinaryInput, type BlobLike, type BlobType, type CoerceResult, type ColumnMapping, type ColumnType, type DatasetLike, type DateOrder, type DetectHeaderOptions, type DroppedIssues, type DroppedWarnings, type ExcelPartKind, type ExcelWarning, type ExcelWarningCode, type FieldSpec, type HeaderDetection, type ImportDatasetOptions, type ImportDatasetResult, type ImportIssue, type ImportIssueCode, type ImportLocale, type ImportMeta, type ImportProgress, type ImportSchema, type ImportedColumn, type InferredColumn, type MappableDataset, type MappedDataset, type MappingResult, type NumberGroup, type ReadLimits, type SheetInfo, type TypeOptions, applyMapping, coerceColumns, detectHeader, importDataset, inferColumnTypes, isDataLossWarning, mapColumns, parseDate, parseNumber };
|
package/dist/import.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as mapColumns, c as parseNumber, i as applyMapping, n as coerceColumns, o as detectHeader, r as inferColumnTypes, s as parseDate, t as importDataset } from "./pipeline-
|
|
1
|
+
import { a as mapColumns, c as parseNumber, i as applyMapping, n as coerceColumns, o as detectHeader, r as inferColumnTypes, s as parseDate, t as importDataset } from "./pipeline-2dgQM9E9.js";
|
|
2
2
|
import { t as isDataLossWarning } from "./warnings-BPz1Ia3s.js";
|
|
3
3
|
export { applyMapping, coerceColumns, detectHeader, importDataset, inferColumnTypes, isDataLossWarning, mapColumns, parseDate, parseNumber };
|
package/dist/index.cjs
CHANGED
|
@@ -11,7 +11,7 @@ const require_numfmt = require("./numfmt-DwsnhZKe.cjs");
|
|
|
11
11
|
const require_address = require("./address-DZBHchLv.cjs");
|
|
12
12
|
// src/index.ts
|
|
13
13
|
/** Package version. Set from package.json by `npm run version-packages` (scripts/sync-version.mjs); a unit test checks it. */
|
|
14
|
-
const VERSION = "2.
|
|
14
|
+
const VERSION = "2.3.0";
|
|
15
15
|
exports.BUILTIN_NUM_FMTS = require_numfmt.BUILTIN_NUM_FMTS;
|
|
16
16
|
exports.CsvError = require_errors.CsvError;
|
|
17
17
|
exports.EnvironmentError = require_errors.EnvironmentError;
|
package/dist/index.d.cts
CHANGED
|
@@ -293,5 +293,5 @@ export declare function encodeRange(r: RangeAddress): string;
|
|
|
293
293
|
/** 'A1:C3' or 'A1' → range, normalised so start is top-left. */
|
|
294
294
|
export declare function decodeRange(ref: string): RangeAddress;
|
|
295
295
|
/** Package version. Set from package.json by `npm run version-packages` (scripts/sync-version.mjs); a unit test checks it. */
|
|
296
|
-
export declare const VERSION = "2.
|
|
296
|
+
export declare const VERSION = "2.3.0";
|
|
297
297
|
export { type AbortSignalLike, type Alignment, type AutoWidthOptions, type BinaryInput, type BlobLike, type BlobType, type Border, type BorderSide, type BorderStyle, type Cell, type CellAddress, type CellErrorValue, type CellInput, type CellTextOptions, type CellType, type CellValue, type Color, type ColorContext, type ColumnDef, type ColumnProps, type ColumnTotal, type ColumnWidth, type Dataset, type DatasetBlock, type DatasetOptions, type DatasetResult, type DateOptions, type DefinedName, type DocProperties, type DroppedWarnings, type ErrorCode, type ExcelErrorCode, type ExcelErrorOptions, type ExcelPartKind, type ExcelWarning, type ExcelWarningCode, type Fill, type Font, type GradientFill, type GroupColumn, type Hyperlink, type LeafColumn, type NumFmt, type PatternFill, type PatternType, type PrintSetup, type Progress, type RangeAddress, type RichText, type RichTextRun, type RowProps, type Sheet, type SheetNameProblem, type SheetView, type Style, type Theme, type ToDatasetOptions, type Workbook, type WriteOptions, XLSX_MIME, isDataLossWarning, toBlob, toUint8Array };
|
package/dist/index.d.ts
CHANGED
|
@@ -293,5 +293,5 @@ export declare function encodeRange(r: RangeAddress): string;
|
|
|
293
293
|
/** 'A1:C3' or 'A1' → range, normalised so start is top-left. */
|
|
294
294
|
export declare function decodeRange(ref: string): RangeAddress;
|
|
295
295
|
/** Package version. Set from package.json by `npm run version-packages` (scripts/sync-version.mjs); a unit test checks it. */
|
|
296
|
-
export declare const VERSION = "2.
|
|
296
|
+
export declare const VERSION = "2.3.0";
|
|
297
297
|
export { type AbortSignalLike, type Alignment, type AutoWidthOptions, type BinaryInput, type BlobLike, type BlobType, type Border, type BorderSide, type BorderStyle, type Cell, type CellAddress, type CellErrorValue, type CellInput, type CellTextOptions, type CellType, type CellValue, type Color, type ColorContext, type ColumnDef, type ColumnProps, type ColumnTotal, type ColumnWidth, type Dataset, type DatasetBlock, type DatasetOptions, type DatasetResult, type DateOptions, type DefinedName, type DocProperties, type DroppedWarnings, type ErrorCode, type ExcelErrorCode, type ExcelErrorOptions, type ExcelPartKind, type ExcelWarning, type ExcelWarningCode, type Fill, type Font, type GradientFill, type GroupColumn, type Hyperlink, type LeafColumn, type NumFmt, type PatternFill, type PatternType, type PrintSetup, type Progress, type RangeAddress, type RichText, type RichTextRun, type RowProps, type Sheet, type SheetNameProblem, type SheetView, type Style, type Theme, type ToDatasetOptions, type Workbook, type WriteOptions, XLSX_MIME, isDataLossWarning, toBlob, toUint8Array };
|
package/dist/index.js
CHANGED
|
@@ -10,5 +10,5 @@ import { n as isDateFormat, t as BUILTIN_NUM_FMTS } from "./numfmt-Ci_oW11p.js";
|
|
|
10
10
|
import { a as decodeRange, c as encodeRange, i as decodeCol, n as MAX_ROWS, o as encodeCell, r as decodeCell, s as encodeCol, t as MAX_COLS } from "./address-DUn7-5OS.js";
|
|
11
11
|
// src/index.ts
|
|
12
12
|
/** Package version. Set from package.json by `npm run version-packages` (scripts/sync-version.mjs); a unit test checks it. */
|
|
13
|
-
const VERSION = "2.
|
|
13
|
+
const VERSION = "2.3.0";
|
|
14
14
|
export { BUILTIN_NUM_FMTS, CsvError, EnvironmentError, ExcelError, FormatError, LimitError, MAX_COLS, MAX_ROWS, VERSION, ValidationError, XLSX_MIME, cellText, dateToSerial, decodeCell, decodeCol, decodeRange, encodeCell, encodeCol, encodeRange, fromDataset, fromDatasets, isDataLossWarning, isDateFormat, isExcelError, mergeStyles, resolveColor, sanitizeSheetName, serialToDate, toBlob, toDataset, toUint8Array, validateSheetName };
|