diff --git a/CHANGELOG.md b/CHANGELOG.md index 97410bc8fe062c6edc5b73ed72a8b5201b54fba4..332de5fae6ffbf134aafce1092fcbebed4ae56e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ This log is intended to keep track of backwards-incompatible changes, including but not limited to API changes and file location changes. Minor behavioral changes may not be included if they are not expected to break existing code. +## 0.11.0 (2017-07-31) + +* Strip `require` statements from minified version +* minifier mangler enabled ## 0.10.9 (2017-07-28) diff --git a/Makefile b/Makefile index 6fdbf873f49727467c4ce2c3b513897b7b72cdcf..73dac61059ead3a29b6ef759d4a2a4e526781914 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ FLOWTARGET=$(LIB).flow.js FLOWAUX=$(patsubst %.js,%.flow.js,$(AUXTARGETS)) AUXSCPTS=xlsxworker1.js xlsxworker2.js xlsxworker.js FLOWTGTS=$(TARGET) $(AUXTARGETS) $(AUXSCPTS) -UGLIFYOPTS=--support-ie8 +UGLIFYOPTS=--support-ie8 -m CLOSURE=/usr/local/lib/node_modules/google-closure-compiler/compiler.jar ## Main Targets @@ -52,13 +52,13 @@ init: ## Initial setup for development .PHONY: dist dist: dist-deps $(TARGET) bower.json ## Prepare JS files for distribution - cp $(TARGET) dist/ + <$(TARGET) sed "s/require('stream')/{}/g;s/require('.*')/null/g" > dist/$(TARGET) cp LICENSE dist/ - uglifyjs $(TARGET) $(UGLIFYOPTS) -o dist/$(LIB).min.js --source-map dist/$(LIB).min.map --preamble "$$(head -n 1 bits/00_header.js)" + uglifyjs dist/$(TARGET) $(UGLIFYOPTS) -o dist/$(LIB).min.js --source-map dist/$(LIB).min.map --preamble "$$(head -n 1 bits/00_header.js)" misc/strip_sourcemap.sh dist/$(LIB).min.js - 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)" + 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)" misc/strip_sourcemap.sh dist/$(LIB).core.min.js - 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)" + 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)" misc/strip_sourcemap.sh dist/$(LIB).full.min.js cat <(head -n 1 bits/00_header.js) $(REQS) $(ADDONS) $(TARGET) $(AUXTARGETS) > demos/requirejs/$(LIB).full.js diff --git a/README.md b/README.md index c59a64733a45dd4dfe0f08a9883a36729f3dba3f..d5dfab83d2cf5297a848f0fe4cc6d744657ca249 100644 --- a/README.md +++ b/README.md @@ -235,7 +235,7 @@ Excel 2007, nothing outside of SheetJS or Excel supported the format. To promote a format-agnostic view, js-xlsx starts from a pure-JS representation that we call the ["Common Spreadsheet Format"](#common-spreadsheet-format). -Emphasizing a uniform object representation enables radical features like format +Emphasizing a uniform object representation enables new features like format conversion (e.g. reading an XLSX template and saving as XLS) and circumvents the "class trap". By abstracting the complexities of the various formats, tools 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`: The most common and interesting formats (XLS, XLSX/M, XLSB, ODS) are ultimately ZIP or CFB containers of files. Neither format puts the directory structure at the beginning of the file: ZIP files place the Central Directory records at the -end of the logical file, while CFB files can place the FAT structure anywhere in +end of the logical file, while CFB files can place the storage info anywhere in the file! As a result, to properly handle these formats, a streaming function would have to buffer the entire file before commencing. That belies the 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: in this README may not be serialized. - `cellDates` only applies to XLSX output and is not guaranteed to work with third-party readers. Excel itself does not usually write cells with type `d` - so non-Excel tools may ignore the data or blow up in the presence of dates. + so non-Excel tools may ignore the data or error in the presence of dates. - `Props` is an object mirroring the workbook `Props` field. See the table from the [Workbook File Properties](#workbook-file-properties) section. - 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. UOS is a very similar format, and it comes in 2 varieties corresponding to ODS and FODS respectively. For the most part, the difference between the formats -lies in the names of tags and attributes. +is in the names of tags and attributes. @@ -2124,7 +2124,7 @@ Start a local server and navigate to that directory to run the tests. To run the full in-browser tests, clone the repo for [oss.sheetjs.com](https://github.com/SheetJS/SheetJS.github.io) and replace -the xlsx.js file (then fire up the browser and go to `stress.html`): +the xlsx.js file (then open a browser window and go to `stress.html`): ```bash $ cp xlsx.js ../SheetJS.github.io diff --git a/bits/01_version.js b/bits/01_version.js index fbfc2dc519af5a88625a77a838304e6a660b74e3..a57a7a90dd949dc8d8d10ad1ba01dfe1ad5c2a63 100644 --- a/bits/01_version.js +++ b/bits/01_version.js @@ -1 +1 @@ -XLSX.version = '0.10.9'; +XLSX.version = '0.11.0'; diff --git a/dist/xlsx.core.min.js b/dist/xlsx.core.min.js index b70a5b92730b535678bc43b3bbc488ed9a07275d..3700a2e4fd43877b5c95c6160ea15111333a4585 100644 Binary files a/dist/xlsx.core.min.js and b/dist/xlsx.core.min.js differ diff --git a/dist/xlsx.core.min.map b/dist/xlsx.core.min.map index eab9ba0dcff8ac912749a5b47fb6cd44de2111a0..1f4f805a3ba9de19c6defdee6974895b0192aaa2 100644 Binary files a/dist/xlsx.core.min.map and b/dist/xlsx.core.min.map differ diff --git a/dist/xlsx.full.min.js b/dist/xlsx.full.min.js index da946616194f9a71b57c847c2a94bb80b6bb30bd..e52fb1e6b595c97339eb78e6fe8dcaba1a277400 100644 Binary files a/dist/xlsx.full.min.js and b/dist/xlsx.full.min.js differ diff --git a/dist/xlsx.full.min.map b/dist/xlsx.full.min.map index 2e01736e47f7cffd04910c2460b2848013cc604e..41b97d15447500df54d2c2b70e57500360634b24 100644 Binary files a/dist/xlsx.full.min.map and b/dist/xlsx.full.min.map differ diff --git a/dist/xlsx.js b/dist/xlsx.js index 4b9217a38600c2e2f75a68a0fcd92625dfd4f02b..3379fb22a34f16b4ba704146329a8f83fded328f 100644 Binary files a/dist/xlsx.js and b/dist/xlsx.js differ diff --git a/dist/xlsx.min.js b/dist/xlsx.min.js index 6adc4f54d110a953578118f3f55cccc71a7059f8..8f04f3663d01da6d9e09ad0ce466a215bef08143 100644 Binary files a/dist/xlsx.min.js and b/dist/xlsx.min.js differ diff --git a/dist/xlsx.min.map b/dist/xlsx.min.map index d5df7c0947545130dd8e15a9a9539a504409d990..9989505c977d824733c936125474509e6822da75 100644 Binary files a/dist/xlsx.min.map and b/dist/xlsx.min.map differ diff --git a/docbits/15_phil.md b/docbits/15_phil.md index 9d4c8a7c0000f93841528e928312ecf797ad1d6e..746cff97950b08f53d5db019e6c2f6ac13d42adc 100644 --- a/docbits/15_phil.md +++ b/docbits/15_phil.md @@ -10,7 +10,7 @@ Excel 2007, nothing outside of SheetJS or Excel supported the format. To promote a format-agnostic view, js-xlsx starts from a pure-JS representation that we call the ["Common Spreadsheet Format"](#common-spreadsheet-format). -Emphasizing a uniform object representation enables radical features like format +Emphasizing a uniform object representation enables new features like format conversion (e.g. reading an XLSX template and saving as XLS) and circumvents the "class trap". By abstracting the complexities of the various formats, tools need not worry about the specific file type! diff --git a/docbits/21_readstream.md b/docbits/21_readstream.md index 0f1ed11ca3415ab0db643d2da40b3d94cfe7ae53..027dab8bceecb744be3023d072564f706bc6432a 100644 --- a/docbits/21_readstream.md +++ b/docbits/21_readstream.md @@ -6,7 +6,7 @@ The most common and interesting formats (XLS, XLSX/M, XLSB, ODS) are ultimately ZIP or CFB containers of files. Neither format puts the directory structure at the beginning of the file: ZIP files place the Central Directory records at the -end of the logical file, while CFB files can place the FAT structure anywhere in +end of the logical file, while CFB files can place the storage info anywhere in the file! As a result, to properly handle these formats, a streaming function would have to buffer the entire file before commencing. That belies the expectations of streaming, so we do not provide any streaming read API. diff --git a/docbits/81_writeopts.md b/docbits/81_writeopts.md index cda875b3b729982d5aaca4c9e60c27b0d684cedb..7284010b163fb1c9736adfae2df7807e057510a9 100644 --- a/docbits/81_writeopts.md +++ b/docbits/81_writeopts.md @@ -19,7 +19,7 @@ The exported `write` and `writeFile` functions accept an options argument: in this README may not be serialized. - `cellDates` only applies to XLSX output and is not guaranteed to work with third-party readers. Excel itself does not usually write cells with type `d` - so non-Excel tools may ignore the data or blow up in the presence of dates. + so non-Excel tools may ignore the data or error in the presence of dates. - `Props` is an object mirroring the workbook `Props` field. See the table from the [Workbook File Properties](#workbook-file-properties) section. - if specified, the string from `themeXLSX` will be saved as the primary theme diff --git a/docbits/85_filetype.md b/docbits/85_filetype.md index 7c73fa6870ab915485c95a7c82ba8be9977178c4..cbffdedd0c4d9dd5b8dd308a5098044870735074 100644 --- a/docbits/85_filetype.md +++ b/docbits/85_filetype.md @@ -168,7 +168,7 @@ standard, instead focusing on parts necessary to extract and store raw data. UOS is a very similar format, and it comes in 2 varieties corresponding to ODS and FODS respectively. For the most part, the difference between the formats -lies in the names of tags and attributes. +is in the names of tags and attributes. diff --git a/docbits/90_test.md b/docbits/90_test.md index 4bc0cbb36cfed20ca6fb150f24f8f31bba69f844..848a4588add144dcfcf7109c8c55bd81e014dbc1 100644 --- a/docbits/90_test.md +++ b/docbits/90_test.md @@ -49,7 +49,7 @@ Start a local server and navigate to that directory to run the tests. To run the full in-browser tests, clone the repo for [oss.sheetjs.com](https://github.com/SheetJS/SheetJS.github.io) and replace -the xlsx.js file (then fire up the browser and go to `stress.html`): +the xlsx.js file (then open a browser window and go to `stress.html`): ```bash $ cp xlsx.js ../SheetJS.github.io diff --git a/misc/docs/README.md b/misc/docs/README.md index 75da4b4294686aa80014b6a557caefd7b2a6f307..2355c933be6e695f75bd659acb58c46a82040c38 100644 --- a/misc/docs/README.md +++ b/misc/docs/README.md @@ -224,7 +224,7 @@ Excel 2007, nothing outside of SheetJS or Excel supported the format. To promote a format-agnostic view, js-xlsx starts from a pure-JS representation that we call the ["Common Spreadsheet Format"](#common-spreadsheet-format). -Emphasizing a uniform object representation enables radical features like format +Emphasizing a uniform object representation enables new features like format conversion (e.g. reading an XLSX template and saving as XLS) and circumvents the "class trap". By abstracting the complexities of the various formats, tools need not worry about the specific file type! @@ -408,7 +408,7 @@ On Windows XP and up you can get the base64 encoding using `certutil`: The most common and interesting formats (XLS, XLSX/M, XLSB, ODS) are ultimately ZIP or CFB containers of files. Neither format puts the directory structure at the beginning of the file: ZIP files place the Central Directory records at the -end of the logical file, while CFB files can place the FAT structure anywhere in +end of the logical file, while CFB files can place the storage info anywhere in the file! As a result, to properly handle these formats, a streaming function would have to buffer the entire file before commencing. That belies the expectations of streaming, so we do not provide any streaming read API. @@ -1400,7 +1400,7 @@ The exported `write` and `writeFile` functions accept an options argument: in this README may not be serialized. - `cellDates` only applies to XLSX output and is not guaranteed to work with third-party readers. Excel itself does not usually write cells with type `d` - so non-Excel tools may ignore the data or blow up in the presence of dates. + so non-Excel tools may ignore the data or error in the presence of dates. - `Props` is an object mirroring the workbook `Props` field. See the table from the [Workbook File Properties](#workbook-file-properties) section. - if specified, the string from `themeXLSX` will be saved as the primary theme @@ -1828,7 +1828,7 @@ standard, instead focusing on parts necessary to extract and store raw data. UOS is a very similar format, and it comes in 2 varieties corresponding to ODS and FODS respectively. For the most part, the difference between the formats -lies in the names of tags and attributes. +is in the names of tags and attributes. ### Other Single-Worksheet Formats @@ -1933,7 +1933,7 @@ Start a local server and navigate to that directory to run the tests. To run the full in-browser tests, clone the repo for [oss.sheetjs.com](https://github.com/SheetJS/SheetJS.github.io) and replace -the xlsx.js file (then fire up the browser and go to `stress.html`): +the xlsx.js file (then open a browser window and go to `stress.html`): ```bash $ cp xlsx.js ../SheetJS.github.io diff --git a/package.json b/package.json index 556ae654da3046591f5aa5f53400628efce5ab6b..888d75836551af332b41812b4cebb1b4f214ca57 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xlsx", - "version": "0.10.9", + "version": "0.11.0", "author": "sheetjs", "description": "Excel (XLSB/XLSX/XLS/XML) ODS and other spreadsheet format (CSV/DIF/DBF/SYLK) parser and writer", "keywords": [ "excel", "xls", "xlsx", "xlsb", "xlsm", "ods", "csv", "dbf", "dif", "sylk", "office", "spreadsheet" ], @@ -18,7 +18,7 @@ }, "dependencies": { "exit-on-epipe":"~1.0.1", - "ssf":"~0.10.0", + "ssf":"~0.10.1", "codepage":"~1.10.1", "cfb":"~0.12.0", "crc-32":"~1.1.0", diff --git a/tests/core.js b/tests/core.js index 36fdef829f038153047c5a0ee862d508651f81f6..681936c7cb3327f7758f13e079e432fd8213da65 100644 Binary files a/tests/core.js and b/tests/core.js differ diff --git a/xlsx.flow.js b/xlsx.flow.js index 9dbfb98b8cdd8c51d9450e8f27c30c77f84e91d6..03da3ad04ca04219f9d114824a2d4a70bfa5844f 100644 --- a/xlsx.flow.js +++ b/xlsx.flow.js @@ -6,7 +6,7 @@ /*global global, exports, module, require:false, process:false, Buffer:false */ var XLSX = {}; (function make_xlsx(XLSX){ -XLSX.version = '0.10.9'; +XLSX.version = '0.11.0'; var current_codepage = 1200; /*:: declare var cptable:any; */ /*global cptable:true */ diff --git a/xlsx.js b/xlsx.js index 4b9217a38600c2e2f75a68a0fcd92625dfd4f02b..55cf361f570823ee9ee510b3e2204d35d84844e8 100644 Binary files a/xlsx.js and b/xlsx.js differ