8000 version bump 0.18.12 · SheetJS/sheetjs@81b231d · GitHub
[go: up one dir, main page]

Skip to content

Commit 81b231d

Browse files
committed
version bump 0.18.12
1 parent 1491302 commit 81b231d

29 files changed

+1690
-1306
lines changed

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ make.cmd
5858
xlsworker.js
5959
shim.js
6060
test.js
61-
hotcross.mjs
6261
test.mjs
6362
test.ts
6463
test.mts
6564
testnocp.ts
65+
testbun.mjs
6666
.jscs.json
6767
.gitmodules
6868
.travis.yml

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ 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.12
8+
9+
* `package.json` added types in `exports` structure
10+
* uncapped NUMBERS single-sheet single-table export
11+
* DBF export records using supported codepages
12+
713
## v0.18.11
814

915
* Base64 input ignore data URI wrapper

bits/00_header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
22
/* vim: set ts=2: */
33
/*exported XLSX */
4-
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false, DataView:false, Deno:false */
4+
/*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false, DataView:false, Deno:false, Set:false */
55
var XLSX = {};
66
function make_xlsx_lib(XLSX){

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.11';
1+
XLSX.version = '0.18.12';

bits/05_buf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ var bconcat = has_buf ? function(bufs) { return Buffer.concat(bufs.map(function(
7171
for(i = 0, maxlen = 0; i < bufs.length; maxlen += len, ++i) {
7272
len = bufs[i].length;
7373
if(bufs[i] instanceof Uint8Array) o.set(bufs[i], maxlen);
74-
else if(typeof bufs[i] == "string") { throw "wtf"; }
74+
else if(typeof bufs[i] == "string") o.set(new Uint8Array(s2a(bufs[i])), maxlen);
7575
else o.set(new Uint8Array(bufs[i]), maxlen);
7676
}
7777
return o;

bits/18_cfb.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,9 +1500,9 @@ function write_zip(cfb/*:CFBContainer*/, options/*:CFBWriteOpts*/)/*:RawBytes*/
15001500
var namebuf = new_buf(fp.length);
15011501
for(j = 0; j < fp.length; ++j) namebuf.write_shift(1, fp.charCodeAt(j) & 0x7F);
15021502
namebuf = namebuf.slice(0, namebuf.l);
1503-
crcs[fcnt] = CRC32.buf(/*::((*/fi.content/*::||[]):any)*/, 0);
1503+
crcs[fcnt] = typeof fi.content == "string" ? CRC32.bstr(fi.content, 0) : CRC32.buf(/*::((*/fi.content/*::||[]):any)*/, 0);
15041504

1505-
var outbuf = fi.content/*::||[]*/;
1505+
var outbuf = typeof fi.content == "string" ? s2a(fi.content) : fi.content/*::||[]*/;
15061506
if(method == 8) outbuf = _deflateRawSync(outbuf);
15071507

15081508
/* local file header */

bits/40_harb.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,7 @@ function dbf_to_workbook(buf, opts)/*:Workbook*/ {
238238
var o = sheet_to_workbook(dbf_to_sheet(buf, opts), opts);
239239
o.bookType = "dbf";
240240
return o;
241-
}
242-
catch(e) { if(opts && opts.WTF) throw e; }
241+
} catch(e) { if(opts && opts.WTF) throw e; }
243242
return ({SheetNames:[],Sheets:{}});
244243
}
245244

bits/85_parsezip.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ function safe_parse_sheet(zip, path/*:string*/, relsPath/*:string*/, sheet, idx/
3636
sheets[sheet] = _ws;
3737

3838
/* scan rels for comments and threaded comments */
39-
var tcomments = [];
39+
var comments = [], tcomments = [];
4040
if(sheetRels && sheetRels[sheet]) keys(sheetRels[sheet]).forEach(function(n) {
4141
var dfile = "";
4242
if(sheetRels[sheet][n].Type == RELS.CMNT) {
4343
dfile = resolve_path(sheetRels[sheet][n].Target, path);
44-
var comments = parse_cmnt(getzipdata(zip, dfile, true), dfile, opts);
44+
comments = parse_cmnt(getzipdata(zip, dfile, true), dfile, opts);
4545
if(!comments || !comments.length) return;
4646
sheet_insert_comments(_ws, comments, false);
4747
}

bits/86_writezip.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ function write_zip_xlsb(wb/*:Workbook*/, opts/*:WriteOpts*/)/*:ZIP*/ {
101101
/* TODO: something more intelligent with themes */
102102

103103
f = "xl/theme/theme1.xml";
104-
zip_add_file(zip, f, write_theme(wb.Themes, opts));
104+
var ww = write_theme(wb.Themes, opts);
105+
zip_add_file(zip, f, ww);
105106
ct.themes.push(f);
106107
add_rels(opts.wbrels, -1, "theme/theme1.xml", RELS.THEME);
107108

bits/90_utils.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ function sheet_add_json(_ws/*:?Worksheet*/, js/*:Array<any>*/, opts)/*:Worksheet
213213
if(_R == -1) { _R = 0; range.e.r = js.length - 1 + offset; }
214214
}
215215
var hdr/*:Array<string>*/ = o.header || [], C = 0;
216-
216+
var ROW = [];
217217
js.forEach(function (JS, R/*:number*/) {
218-
if(!ws[_R + R + offset]) ws[_R + R + offset] = [];
219-
var ROW = ws[_R + R + offset];
218+
if(dense && !ws[_R + R + offset]) ws[_R + R + offset] = [];
219+
if(dense) ROW = ws[_R + R + offset];
220220
keys(JS).forEach(function(k) {
221221
if((C=hdr.indexOf(k)) == -1) hdr[C=hdr.length] = k;
222222
var v = JS[k];
@@ -239,8 +239,7 @@ function sheet_add_json(_ws/*:?Worksheet*/, js/*:Array<any>*/, opts)/*:Worksheet
239239
if(!cell) {
240240
if(!dense) ws[ref] = cell = ({t:t, v:v}/*:any*/);
241241
else ROW[_C + C] = cell = ({t:t, v:v}/*:any*/);
242-
}
243-
else {
242+
} else {
244243
cell.t = t; cell.v = v;
245244
delete cell.w; delete cell.R;
246245
if(z) cell.z = z;

0 commit comments

Comments
 (0)
0