From 41996be86f326f667e755cfa953d32befbfa3076 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Wed, 10 May 2017 02:43:12 +0800 Subject: [PATCH 1/6] extend test timeout Travis has gone a lot slower recently, and most test failures are due to time-out on this particular test. --- test/mocha/spidermonkey.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/mocha/spidermonkey.js b/test/mocha/spidermonkey.js index 4071a136..a8a112d0 100644 --- a/test/mocha/spidermonkey.js +++ b/test/mocha/spidermonkey.js @@ -4,7 +4,7 @@ var uglify = require("../node"); describe("spidermonkey export/import sanity test", function() { it("should produce a functional build when using --self with spidermonkey", function(done) { - this.timeout(20000); + this.timeout(30000); var uglifyjs = '"' + process.argv[0] + '" bin/uglifyjs'; var command = uglifyjs + " --self -cm --wrap SpiderUglify -o spidermonkey | " + From a0f5f862dfe5667471fc99265f6163ca676c3f58 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Wed, 10 May 2017 04:20:59 +0800 Subject: [PATCH 2/6] gracefully handle non-`Error` being thrown (#1893) --- bin/uglifyjs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/uglifyjs b/bin/uglifyjs index d75b0ee1..65b761c6 100755 --- a/bin/uglifyjs +++ b/bin/uglifyjs @@ -193,7 +193,7 @@ function run() { } } } catch (ex) { - fatal(ex.stack); + fatal(ex); } var result = UglifyJS.minify(files, options); if (result.error) { @@ -220,7 +220,7 @@ function run() { console.error("Supported options:"); console.error(ex.defs); } - fatal(ex.stack); + fatal(ex); } else if (program.output == "ast") { console.log(JSON.stringify(result.ast, function(key, value) { if (skip_key(key)) return; @@ -263,7 +263,8 @@ function run() { } function fatal(message) { - console.error(message.replace(/^\S*?Error:/, "ERROR:")); + if (message instanceof Error) message = message.stack.replace(/^\S*?Error:/, "ERROR:") + console.error(message); process.exit(1); } @@ -303,7 +304,7 @@ function read_file(path, default_value) { return fs.readFileSync(path, "utf8"); } catch (ex) { if (ex.code == "ENOENT" && default_value != null) return default_value; - fatal(ex.stack); + fatal(ex); } } From bad9d5cf882bdc78ba18765f85a473eb388e6790 Mon Sep 17 00:00:00 2001 From: kzc Date: Tue, 9 May 2017 17:07:45 -0400 Subject: [PATCH 3/6] Change `harmony` to `uglify-es` in master README (#1895) --- README.md | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 52c44ccd..c62d1d27 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@ UglifyJS is a JavaScript parser, minifier, compressor or beautifier toolkit. #### Note: - **`uglify-js@3.x` has a new API and CLI and is not backwards compatible with [`uglify-js@2.x`](https://github.com/mishoo/UglifyJS2/tree/v2.x)**. - **Documentation for UglifyJS `2.x` releases can be found [here](https://github.com/mishoo/UglifyJS2/tree/v2.x)**. -- Release versions of `uglify-js` only support ECMAScript 5 (ES5). If you wish to minify -ES2015+ (ES6+) code then please use the [harmony](#harmony) development branch. -- Node 7 has a known performance regression and runs `uglify-js` twice as slow. +- Release versions of `uglify-js` only support ECMAScript 5 (ES5). +- Those wishing to minify +ES2015+ (ES6+) should use the `npm` package [**uglify-es**](https://github.com/mishoo/UglifyJS2/tree/harmony). Install ------- @@ -717,20 +717,3 @@ Other options: [acorn]: https://github.com/ternjs/acorn [sm-spec]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k - -#### Harmony - -If you wish to use the experimental [harmony](https://github.com/mishoo/UglifyJS2/commits/harmony) -branch to minify ES2015+ (ES6+) code please use the following in your `package.json` file: - -``` -"uglify-js": "git+https://github.com/mishoo/UglifyJS2.git#harmony" -``` - -or to directly install the experimental harmony version of uglify: - -``` -npm install --save-dev uglify-js@github:mishoo/UglifyJS2#harmony -``` - -See [#448](https://github.com/mishoo/UglifyJS2/issues/448) for additional details. From 04f2344efc090f134989e4cabf5d93d127f34e45 Mon Sep 17 00:00:00 2001 From: kzc Date: Tue, 9 May 2017 23:06:50 -0400 Subject: [PATCH 4/6] Remove unnecessary `git clone` instructions in README (#1897) --- README.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/README.md b/README.md index c62d1d27..3edaa62b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ UglifyJS 3 ========== [![Build Status](https://travis-ci.org/mishoo/UglifyJS2.svg)](https://travis-ci.org/mishoo/UglifyJS2) -UglifyJS is a JavaScript parser, minifier, compressor or beautifier toolkit. +UglifyJS is a JavaScript parser, minifier, compressor and beautifier toolkit. #### Note: - **`uglify-js@3.x` has a new API and CLI and is not backwards compatible with [`uglify-js@2.x`](https://github.com/mishoo/UglifyJS2/tree/v2.x)**. @@ -25,12 +25,6 @@ From NPM for programmatic use: npm install uglify-js -From Git: - - git clone git://github.com/mishoo/UglifyJS2.git - cd UglifyJS2 - npm link . - Usage ----- From 0459af2eccc5a6eb28868cfec4c90d384c2d3588 Mon Sep 17 00:00:00 2001 From: kzc Date: Tue, 9 May 2017 23:07:54 -0400 Subject: [PATCH 5/6] Update issue template: change harmony to uglify-es (#1900) --- .github/ISSUE_TEMPLATE.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 577bb665..6d710c6a 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -6,15 +6,15 @@ -**`uglify-js` version (`uglifyjs -V`)** +**Uglify version (`uglifyjs -V`)** -**JavaScript input - ideally as small as possible.** +**JavaScript input** **The `uglifyjs` CLI command executed or `minify()` options used.** -**JavaScript output produced and/or the error or warning.** +**JavaScript output or error produced.** From aae7d49d0c9332de676f32b2fe20f4834fe41df4 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Wed, 10 May 2017 11:45:03 +0800 Subject: [PATCH 6/6] v3.0.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e037535e..932e7cb0 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "homepage": "http://lisperator.net/uglifyjs", "author": "Mihai Bazon (http://lisperator.net/)", "license": "BSD-2-Clause", - "version": "3.0.2", + "version": "3.0.3", "engines": { "node": ">=0.8.0" },