Skip to content

Commit 7d15f35

Browse files
committed
version bump 0.11.0: new minified versions
- build script strips `require` statements - finally every version is pinned (see #740 h/t @the-spyke) - removed colloquialisms in README
1 parent ce37f99 commit 7d15f35

21 files changed

Lines changed: 85 additions & 91 deletions

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ 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+
## 0.11.0 (2017-07-31)
8+
9+
* Strip `require` statements from minified version
10+
* minifier mangler enabled
711

812
## 0.10.9 (2017-07-28)
913

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ FLOWTARGET=$(LIB).flow.js
1414
FLOWAUX=$(patsubst %.js,%.flow.js,$(AUXTARGETS))
1515
AUXSCPTS=xlsxworker1.js xlsxworker2.js xlsxworker.js
1616
FLOWTGTS=$(TARGET) $(AUXTARGETS) $(AUXSCPTS)
17-
UGLIFYOPTS=--support-ie8
17+
UGLIFYOPTS=--support-ie8 -m
1818
CLOSURE=/usr/local/lib/node_modules/google-closure-compiler/compiler.jar
1919

2020
## Main Targets
@@ -52,13 +52,13 @@ init: ## Initial setup for development
5252

5353
.PHONY: dist
5454
dist: dist-deps $(TARGET) bower.json ## Prepare JS files for distribution
55-
cp $(TARGET) dist/
55+
<$(TARGET) sed "s/require('stream')/{}/g;s/require('.*')/null/g" > dist/$(TARGET)
5656
cp LICENSE dist/
57-
uglifyjs $(TARGET) $(UGLIFYOPTS) -o dist/$(LIB).min.js --source-map dist/$(LIB).min.map --preamble "$$(head -n 1 bits/00_header.js)"
57+
uglifyjs dist/$(TARGET) $(UGLIFYOPTS) -o dist/$(LIB).min.js --source-map dist/$(LIB).min.map --preamble "$$(head -n 1 bits/00_header.js)"
5858
misc/strip_sourcemap.sh dist/$(LIB).min.js
59-
uglifyjs $(REQS) $(TARGET) $(UGLIFYOPTS) -o dist/$(LIB).core.min.js --source-map dist/$(LIB).core.min.map --preamble "$$(head -n 1 bits/00_header.js)"
59+
uglifyjs $(REQS) dist/$(TARGET) $(UGLIFYOPTS) -o dist/$(LIB).core.min.js --source-map dist/$(LIB).core.min.map --preamble "$$(head -n 1 bits/00_header.js)"
6060
misc/strip_sourcemap.sh dist/$(LIB).core.min.js
61-
uglifyjs $(REQS) $(ADDONS) $(TARGET) $(AUXTARGETS) $(UGLIFYOPTS) -o dist/$(LIB).full.min.js --source-map dist/$(LIB).full.min.map --preamble "$$(head -n 1 bits/00_header.js)"
61+
uglifyjs $(REQS) $(ADDONS) dist/$(TARGET) $(AUXTARGETS) $(UGLIFYOPTS) -o dist/$(LIB).full.min.js --source-map dist/$(LIB).full.min.map --preamble "$$(head -n 1 bits/00_header.js)"
6262
misc/strip_sourcemap.sh dist/$(LIB).full.min.js
6363
cat <(head -n 1 bits/00_header.js) $(REQS) $(ADDONS) $(TARGET) $(AUXTARGETS) > demos/requirejs/$(LIB).full.js
6464

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ Excel 2007, nothing outside of SheetJS or Excel supported the format.
235235

236236
To promote a format-agnostic view, js-xlsx starts from a pure-JS representation
237237
that we call the ["Common Spreadsheet Format"](#common-spreadsheet-format).
238-
Emphasizing a uniform object representation enables radical features like format
238+
Emphasizing a uniform object representation enables new features like format
239239
conversion (e.g. reading an XLSX template and saving as XLS) and circumvents the
240240
"class trap". By abstracting the complexities of the various formats, tools
241241
need not worry about the specific file type!
@@ -440,7 +440,7 @@ On Windows XP and up you can get the base64 encoding using `certutil`:
440440
The most common and interesting formats (XLS, XLSX/M, XLSB, ODS) are ultimately
441441
ZIP or CFB containers of files. Neither format puts the directory structure at
442442
the beginning of the file: ZIP files place the Central Directory records at the
443-
end of the logical file, while CFB files can place the FAT structure anywhere in
443+
end of the logical file, while CFB files can place the storage info anywhere in
444444
the file! As a result, to properly handle these formats, a streaming function
445445
would have to buffer the entire file before commencing. That belies the
446446
expectations of streaming, so we do not provide any streaming read API.
@@ -1517,7 +1517,7 @@ The exported `write` and `writeFile` functions accept an options argument:
15171517
in this README may not be serialized.
15181518
- `cellDates` only applies to XLSX output and is not guaranteed to work with
15191519
third-party readers. Excel itself does not usually write cells with type `d`
1520-
so non-Excel tools may ignore the data or blow up in the presence of dates.
1520+
so non-Excel tools may ignore the data or error in the presence of dates.
15211521
- `Props` is an object mirroring the workbook `Props` field. See the table from
15221522
the [Workbook File Properties](#workbook-file-properties) section.
15231523
- if specified, the string from `themeXLSX` will be saved as the primary theme
@@ -1998,7 +1998,7 @@ standard, instead focusing on parts necessary to extract and store raw data.
19981998

19991999
UOS is a very similar format, and it comes in 2 varieties corresponding to ODS
20002000
and FODS respectively. For the most part, the difference between the formats
2001-
lies in the names of tags and attributes.
2001+
is in the names of tags and attributes.
20022002

20032003
</details>
20042004

@@ -2124,7 +2124,7 @@ Start a local server and navigate to that directory to run the tests.
21242124

21252125
To run the full in-browser tests, clone the repo for
21262126
[oss.sheetjs.com](https://github.com/SheetJS/SheetJS.github.io) and replace
2127-
the xlsx.js file (then fire up the browser and go to `stress.html`):
2127+
the xlsx.js file (then open a browser window and go to `stress.html`):
21282128

21292129
```bash
21302130
$ cp xlsx.js ../SheetJS.github.io

bits/01_version.js

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

dist/xlsx.core.min.js

Lines changed: 14 additions & 18 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.

dist/xlsx.full.min.js

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

dist/xlsx.full.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.

dist/xlsx.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
/*global global, exports, module, require:false, process:false, Buffer:false */
77
var XLSX = {};
88
(function make_xlsx(XLSX){
9-
XLSX.version = '0.10.9';
9+
XLSX.version = '0.11.0';
1010
var current_codepage = 1200;
1111
/*global cptable:true */
1212
if(typeof module !== "undefined" && typeof require !== 'undefined') {
13-
if(typeof cptable === 'undefined') global.cptable = require('./dist/cpexcel.js');
13+
if(typeof cptable === 'undefined') global.cptable = null;
1414
}
1515
function reset_cp() { set_cp(1200); }
1616
var set_cp = function(cp) { current_codepage = cp; };
@@ -1347,7 +1347,7 @@ function read_date(blob, offset) {
13471347

13481348
var fs;
13491349
function readFileSync(filename, options) {
1350-
if(fs == null) fs = require('fs');
1350+
if(fs == null) fs = null;
13511351
return parse(fs.readFileSync(filename), options);
13521352
}
13531353

@@ -1583,8 +1583,8 @@ var _fs, jszip;
15831583
if(typeof JSZip !== 'undefined') jszip = JSZip;
15841584
if (typeof exports !== 'undefined') {
15851585
if (typeof module !== 'undefined' && module.exports) {
1586-
if(typeof jszip === 'undefined') jszip = require('./jszip.js');
1587-
_fs = require('fs');
1586+
if(typeof jszip === 'undefined') jszip = null;
1587+
_fs = null;
15881588
}
15891589
}
15901590

@@ -2122,7 +2122,7 @@ var make_offcrypto = function(O, _crypto) {
21222122
var crypto;
21232123
if(typeof _crypto !== 'undefined') crypto = _crypto;
21242124
else if(typeof require !== 'undefined') {
2125-
try { crypto = require('crypto'); }
2125+
try { crypto = null; }
21262126
catch(e) { crypto = null; }
21272127
}
21282128

@@ -17974,7 +17974,7 @@ return utils;
1797417974
})(utils);
1797517975

1797617976
if(has_buf && typeof require != 'undefined') (function() {
17977-
var Readable = require('stream').Readable;
17977+
var Readable = {}.Readable;
1797817978

1797917979
var write_csv_stream = function(sheet, opts) {
1798017980
var stream = Readable();

dist/xlsx.min.js

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

0 commit comments

Comments
 (0)