Skip to content

Commit ba94ffb

Browse files
committed
version bump 0.18.10
1 parent c03bc18 commit ba94ffb

22 files changed

+696
-318
lines changed

.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,11 @@ make.cmd
5858
xlsworker.js
5959
shim.js
6060
test.js
61+
hotcross.mjs
6162
test.mjs
6263
test.ts
64+
test.mts
65+
testnocp.ts
6366
.jscs.json
6467
.gitmodules
6568
.travis.yml

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ This log is intended to keep track of backwards-incompatible changes, including
44
but not limited to API changes and file location changes. Minor behavioral
55
changes may not be included if they are not expected to break existing code.
66

7+
## v0.18.10
8+
9+
* `exports` field in package.json to satiate ViteJS and newer tooling
10+
* JSC (Safari / Bun) perf, see <https://bugs.webkit.org/show_bug.cgi?id=243148>
11+
* workbook `bookType` property to denote the origin format when parsed from file
12+
* XLSX force export of stub cells with number formats when `sheetStubs` is set
13+
714
## v0.18.9
815

916
* XLSX / ODS write defined names

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ pkg: bin/xlsx.njs xlsx.js ## Build pkg standalone executable
137137
test mocha: test.js ## Run test suite
138138
mocha -R spec -t 30000
139139

140+
#* To run tests for one format, make test_<fmt>
141+
#* To run the core test suite, make test_misc
142+
140143
.PHONY: test-esm
141144
test-esm: test.mjs ## Run Node ESM test suite
142145
npx -y mocha@9 -R spec -t 30000 $<
@@ -156,8 +159,6 @@ test-deno: test.ts ## Run Deno test suite
156159
test-denocp: testnocp.ts ## Run Deno test suite (without codepage)
157160
deno test --allow-env --allow-read --allow-write --config misc/test.deno.jsonc $<
158161

159-
#* To run tests for one format, make test_<fmt>
160-
#* To run the core test suite, make test_misc
161162
TESTFMT=$(patsubst %,test_%,$(FMT))
162163
.PHONY: $(TESTFMT)
163164
$(TESTFMT): test_%:

bits/01_version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
XLSX.version = '0.18.9';
1+
XLSX.version = '0.18.10';

bits/40_harb.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,12 +606,14 @@ var SYLK = /*#__PURE__*/(function() {
606606
preamble.push("B;Y" + (r.e.r - r.s.r + 1) + ";X" + (r.e.c - r.s.c + 1) + ";D" + [r.s.c,r.s.r,r.e.c,r.e.r].join(" "));
607607
preamble.push("O;L;D;B" + (d1904 ? ";V4" : "") + ";K47;G100 0.001");
608608
for(var R = r.s.r; R <= r.e.r; ++R) {
609+
var p = [];
609610
for(var C = r.s.c; C <= r.e.c; ++C) {
610611
var coord = encode_cell({r:R,c:C});
611612
cell = dense ? (ws[R]||[])[C]: ws[coord];
612613
if(!cell || (cell.v == null && (!cell.f || cell.F))) continue;
613-
o.push(write_ws_cell_sylk(cell, ws, R, C, opts)); // TODO: pass date1904 info
614+
p.push(write_ws_cell_sylk(cell, ws, R, C, opts)); // TODO: pass date1904 info
614615
}
616+
o.push(p.join(RS));
615617
}
616618
return preamble.join(RS) + RS + o.join(RS) + RS + "E" + RS;
617619
}

bits/90_utils.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ function sheet_add_json(_ws/*:?Worksheet*/, js/*:Array<any>*/, opts)/*:Worksheet
203203
_R = _origin.r; _C = _origin.c;
204204
}
205205
}
206-
var cell/*:Cell*/;
207206
var range/*:Range*/ = ({s: {c:0, r:0}, e: {c:_C, r:_R + js.length - 1 + offset}}/*:any*/);
208207
if(ws['!ref']) {
209208
var _range = safe_decode_range(ws['!ref']);
@@ -216,13 +215,15 @@ function sheet_add_json(_ws/*:?Worksheet*/, js/*:Array<any>*/, opts)/*:Worksheet
216215
var hdr/*:Array<string>*/ = o.header || [], C = 0;
217216

218217
js.forEach(function (JS, R/*:number*/) {
218+
if(!ws[_R + R + offset]) ws[_R + R + offset] = [];
219+
var ROW = ws[_R + R + offset];
219220
keys(JS).forEach(function(k) {
220221
if((C=hdr.indexOf(k)) == -1) hdr[C=hdr.length] = k;
221222
var v = JS[k];
222223
var t = 'z';
223224
var z = "";
224-
var ref = encode_cell({c:_C + C,r:_R + R + offset});
225-
cell = ws_get_cell_stub(ws, ref);
225+
var ref = dense ? "" : encode_cell({c:_C + C,r:_R + R + offset});
226+
var cell/*:Cell*/ = dense ? ROW[_C + C] : ws[ref];
226227
if(v && typeof v === 'object' && !(v instanceof Date)){
227228
ws[ref] = v;
228229
} else {
@@ -232,15 +233,12 @@ function sheet_add_json(_ws/*:?Worksheet*/, js/*:Array<any>*/, opts)/*:Worksheet
232233
else if(v instanceof Date) {
233234
t = 'd';
234235
if(!o.cellDates) { t = 'n'; v = datenum(v); }
235-
z = (cell.z && fmt_is_date(cell.z)) ? cell.z : (o.dateNF || table_fmt[14]);
236+
z = (cell != null && cell.z && fmt_is_date(cell.z)) ? cell.z : (o.dateNF || table_fmt[14]);
236237
}
237238
else if(v === null && o.nullError) { t = 'e'; v = 0; }
238239
if(!cell) {
239240
if(!dense) ws[ref] = cell = ({t:t, v:v}/*:any*/);
240-
else {
241-
if(!ws[_R + R + offset]) ws[_R + R + offset] = [];
242-
ws[_R + R + offset][_C + C] = cell = ({t:t, v:v}/*:any*/);
243-
}
241+
else ROW[_C + C] = cell = ({t:t, v:v}/*:any*/);
244242
}
245243
else {
246244
cell.t = t; cell.v = v;

demos/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ can be installed with Bash on Windows or with `cygwin`.
2121
- [`XMLHttpRequest and fetch`](xhr/)
2222
- [`Clipboard Data`](https://docs.sheetjs.com/docs/getting-started/demos/clipboard)
2323
- [`Typed Arrays for Machine Learning`](https://docs.sheetjs.com/docs/getting-started/demos/ml)
24+
- [`LocalStorage and SessionStorage`](https://docs.sheetjs.com/docs/getting-started/demos/database#localstorage-and-sessionstorage)
25+
- [`Web SQL Database`](https://docs.sheetjs.com/docs/getting-started/demos/database#websql)
26+
- [`IndexedDB`](https://docs.sheetjs.com/docs/getting-started/demos/database#indexeddb)
2427

2528
**Frameworks**
2629
- [`angularjs`](angular/)
@@ -51,6 +54,8 @@ can be installed with Bash on Windows or with `cygwin`.
5154
- [`Swift JSC and other engines`](altjs/)
5255
- [`"serverless" functions`](function/)
5356
- [`databases and key/value stores`](database/)
57+
- [`Databases and Structured Data Stores`](https://docs.sheetjs.com/docs/getting-started/demos/database)
58+
- [`NoSQL, K/V, and Unstructured Data Stores`](https://docs.sheetjs.com/docs/getting-started/demos/nosql)
5459
- [`internet explorer`](oldie/)
5560

5661
**Bundlers and Tooling**
@@ -60,6 +65,7 @@ can be installed with Bash on Windows or with `cygwin`.
6065
- [`parcel`](https://docs.sheetjs.com/docs/getting-started/demos/bundler#parcel)
6166
- [`requirejs`](requirejs/)
6267
- [`rollup`](rollup/)
68+
- [`snowpack`](https://docs.sheetjs.com/docs/getting-started/demos/bundler#snowpack)
6369
- [`systemjs`](systemjs/)
6470
- [`typescript`](typescript/)
6571
- [`webpack 2.x`](webpack/)

dist/xlsx.core.min.js

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/xlsx.core.min.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)