javascript-excel 2.1.0 → 2.2.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 +1 -1
- package/dist/import.cjs +1 -1
- 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-CMealW1i.js → pipeline-BNhGRJcx.js} +1 -1
- package/dist/{pipeline-Dc15gn1t.cjs → pipeline-DLYtAkPU.cjs} +1 -1
- package/dist/{read-CFQ09LlL.js → read-CFmZioBG.js} +300 -55
- package/dist/{read-DYDDLxUE.cjs → read-D5Gz4ph8.cjs} +300 -55
- package/dist/read.cjs +1 -1
- package/dist/read.d.cts +35 -1
- package/dist/read.d.ts +35 -1
- package/dist/read.js +1 -1
- package/dist/worker.cjs +2 -2
- package/dist/worker.js +2 -2
- package/package.json +1 -1
package/dist/read.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_read = require("./read-
|
|
3
|
+
const require_read = require("./read-D5Gz4ph8.cjs");
|
|
4
4
|
exports.DEFAULT_READ_LIMITS = require_read.DEFAULT_READ_LIMITS;
|
|
5
5
|
exports.detectFormat = require_read.detectFormat;
|
|
6
6
|
exports.isDataLossWarning = require_warnings.isDataLossWarning;
|
package/dist/read.d.cts
CHANGED
|
@@ -59,7 +59,11 @@ export interface ReadOptions {
|
|
|
59
59
|
/** Called as warnings occur, in addition to `ReadResult.warnings`. */
|
|
60
60
|
onWarning?: ((w: ExcelWarning) => void) | undefined;
|
|
61
61
|
}
|
|
62
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* Limits for untrusted input. Exceeding one throws `LimitError` (`LIMIT_EXCEEDED`, `details.limit` names it).
|
|
64
|
+
* New optional members may be added in minor releases, so do not write `Required<ReadLimits>` literals;
|
|
65
|
+
* spread `DEFAULT_READ_LIMITS` instead.
|
|
66
|
+
*/
|
|
63
67
|
export interface ReadLimits {
|
|
64
68
|
maxInputBytes: number;
|
|
65
69
|
maxEntries: number;
|
|
@@ -82,8 +86,38 @@ export interface ReadLimits {
|
|
|
82
86
|
* still compiles; when it is left out the default applies.
|
|
83
87
|
*/
|
|
84
88
|
maxXmlTokenLength?: number;
|
|
89
|
+
/**
|
|
90
|
+
* Sheet entries (`<sheet>` elements, worksheets or not) that `xl/workbook.xml`
|
|
91
|
+
* may declare. Checked while that part is parsed, before any sheet is read;
|
|
92
|
+
* `readSheetNames` applies it too. Default 10,000 (`DEFAULT_READ_LIMITS`).
|
|
93
|
+
* It bounds the sheet list and the bookkeeping per entry. It does not bound
|
|
94
|
+
* memory on its own: several entries can name the same part, which is then
|
|
95
|
+
* read once per entry; memory is bounded by `maxCells`, `maxItems` and
|
|
96
|
+
* `maxTotalBytes`, which count what every sheet builds and every read of a
|
|
97
|
+
* part. On a `LimitError`, `details.value` is `max + 1` and
|
|
98
|
+
* `details.part` names the workbook part.
|
|
99
|
+
*
|
|
100
|
+
* Optional only so that a complete `ReadLimits` object written for 2.0 or
|
|
101
|
+
* 2.1 still compiles; when it is left out the default applies.
|
|
102
|
+
*/
|
|
103
|
+
maxSheets?: number;
|
|
85
104
|
/** All sheets together. */
|
|
86
105
|
maxCells: number;
|
|
106
|
+
/**
|
|
107
|
+
* Items other than cells that a read builds, all sheets together (added in
|
|
108
|
+
* 2.2): one per column object of a `<col>` range, row-property object,
|
|
109
|
+
* merge, hyperlink (with the empty cell it may create), selection, defined
|
|
110
|
+
* name, kept style record (number format, cell format, indexed colour, and
|
|
111
|
+
* with `styles` on: font, fill, gradient stop, border), custom document
|
|
112
|
+
* property, and rich-text run after the first of a string. Each is counted
|
|
113
|
+
* before it is built. `readSheetNames` counts defined names. Default
|
|
114
|
+
* 10,000,000 (`DEFAULT_READ_LIMITS`). On a `LimitError`, `details.value` is
|
|
115
|
+
* `max + 1`.
|
|
116
|
+
*
|
|
117
|
+
* Optional only so that a complete `ReadLimits` object written for 2.0 or
|
|
118
|
+
* 2.1 still compiles; when it is left out the default applies.
|
|
119
|
+
*/
|
|
120
|
+
maxItems?: number;
|
|
87
121
|
maxSharedStrings: number;
|
|
88
122
|
/**
|
|
89
123
|
* Warnings kept before the cap applies. Past it, informational warnings are dropped and
|
package/dist/read.d.ts
CHANGED
|
@@ -59,7 +59,11 @@ export interface ReadOptions {
|
|
|
59
59
|
/** Called as warnings occur, in addition to `ReadResult.warnings`. */
|
|
60
60
|
onWarning?: ((w: ExcelWarning) => void) | undefined;
|
|
61
61
|
}
|
|
62
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* Limits for untrusted input. Exceeding one throws `LimitError` (`LIMIT_EXCEEDED`, `details.limit` names it).
|
|
64
|
+
* New optional members may be added in minor releases, so do not write `Required<ReadLimits>` literals;
|
|
65
|
+
* spread `DEFAULT_READ_LIMITS` instead.
|
|
66
|
+
*/
|
|
63
67
|
export interface ReadLimits {
|
|
64
68
|
maxInputBytes: number;
|
|
65
69
|
maxEntries: number;
|
|
@@ -82,8 +86,38 @@ export interface ReadLimits {
|
|
|
82
86
|
* still compiles; when it is left out the default applies.
|
|
83
87
|
*/
|
|
84
88
|
maxXmlTokenLength?: number;
|
|
89
|
+
/**
|
|
90
|
+
* Sheet entries (`<sheet>` elements, worksheets or not) that `xl/workbook.xml`
|
|
91
|
+
* may declare. Checked while that part is parsed, before any sheet is read;
|
|
92
|
+
* `readSheetNames` applies it too. Default 10,000 (`DEFAULT_READ_LIMITS`).
|
|
93
|
+
* It bounds the sheet list and the bookkeeping per entry. It does not bound
|
|
94
|
+
* memory on its own: several entries can name the same part, which is then
|
|
95
|
+
* read once per entry; memory is bounded by `maxCells`, `maxItems` and
|
|
96
|
+
* `maxTotalBytes`, which count what every sheet builds and every read of a
|
|
97
|
+
* part. On a `LimitError`, `details.value` is `max + 1` and
|
|
98
|
+
* `details.part` names the workbook part.
|
|
99
|
+
*
|
|
100
|
+
* Optional only so that a complete `ReadLimits` object written for 2.0 or
|
|
101
|
+
* 2.1 still compiles; when it is left out the default applies.
|
|
102
|
+
*/
|
|
103
|
+
maxSheets?: number;
|
|
85
104
|
/** All sheets together. */
|
|
86
105
|
maxCells: number;
|
|
106
|
+
/**
|
|
107
|
+
* Items other than cells that a read builds, all sheets together (added in
|
|
108
|
+
* 2.2): one per column object of a `<col>` range, row-property object,
|
|
109
|
+
* merge, hyperlink (with the empty cell it may create), selection, defined
|
|
110
|
+
* name, kept style record (number format, cell format, indexed colour, and
|
|
111
|
+
* with `styles` on: font, fill, gradient stop, border), custom document
|
|
112
|
+
* property, and rich-text run after the first of a string. Each is counted
|
|
113
|
+
* before it is built. `readSheetNames` counts defined names. Default
|
|
114
|
+
* 10,000,000 (`DEFAULT_READ_LIMITS`). On a `LimitError`, `details.value` is
|
|
115
|
+
* `max + 1`.
|
|
116
|
+
*
|
|
117
|
+
* Optional only so that a complete `ReadLimits` object written for 2.0 or
|
|
118
|
+
* 2.1 still compiles; when it is left out the default applies.
|
|
119
|
+
*/
|
|
120
|
+
maxItems?: number;
|
|
87
121
|
maxSharedStrings: number;
|
|
88
122
|
/**
|
|
89
123
|
* Warnings kept before the cap applies. Past it, informational warnings are dropped and
|
package/dist/read.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as isDataLossWarning } from "./warnings-BPz1Ia3s.js";
|
|
2
|
-
import { i as readSheetNames, n as detectFormat, r as read, t as DEFAULT_READ_LIMITS } from "./read-
|
|
2
|
+
import { i as readSheetNames, n as detectFormat, r as read, t as DEFAULT_READ_LIMITS } from "./read-CFmZioBG.js";
|
|
3
3
|
export { DEFAULT_READ_LIMITS, detectFormat, isDataLossWarning, read, readSheetNames };
|
package/dist/worker.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_csv = require("./csv-DzGOFyHs.cjs");
|
|
3
3
|
const require_errors = require("./errors-DOPrrGS4.cjs");
|
|
4
|
-
const require_read = require("./read-
|
|
5
|
-
const require_pipeline = require("./pipeline-
|
|
4
|
+
const require_read = require("./read-D5Gz4ph8.cjs");
|
|
5
|
+
const require_pipeline = require("./pipeline-DLYtAkPU.cjs");
|
|
6
6
|
const require_write = require("./write-DKXhuvKR.cjs");
|
|
7
7
|
// src/worker.ts
|
|
8
8
|
/** Marks the library's messages, so an app can use the same worker for its own messages too. */
|
package/dist/worker.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as toCsv, r as readCsv } from "./csv-CrWF7JS1.js";
|
|
2
2
|
import { a as LimitError, i as FormatError, n as EnvironmentError, o as ValidationError, r as ExcelError, s as isExcelError, t as CsvError } from "./errors-CvGlfw0E.js";
|
|
3
|
-
import { r as read } from "./read-
|
|
4
|
-
import { t as importDataset } from "./pipeline-
|
|
3
|
+
import { r as read } from "./read-CFmZioBG.js";
|
|
4
|
+
import { t as importDataset } from "./pipeline-BNhGRJcx.js";
|
|
5
5
|
import { r as toUint8Array } from "./write-BVXB2_2C.js";
|
|
6
6
|
// src/worker.ts
|
|
7
7
|
/** Marks the library's messages, so an app can use the same worker for its own messages too. */
|
package/package.json
CHANGED