Skip to content

Commit

Permalink
Merge pull request #1901 from alexlamsl/harmony-v3.0.3
Browse files Browse the repository at this point in the history
Merging from master for 3.0.3
  • Loading branch information
alexlamsl authored May 10, 2017
2 parents 9d59c69 + fb50b7b commit e2888bd
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

<!-- Note: for ES6 see: https://github.com/mishoo/UglifyJS2/tree/harmony#harmony -->

**`uglify-js` version (`uglifyjs -V`)**
**Uglify version (`uglifyjs -V`)**

**JavaScript input - ideally as small as possible.**
**JavaScript input** <!-- ideally as small as possible -->

**The `uglifyjs` CLI command executed or `minify()` options used.**

**JavaScript output produced and/or the error or warning.**
**JavaScript output or error produced.**

<!--
Note: the release version of uglify-js only supports ES5. Those wishing
to minify ES6 should use the experimental harmony branch.
Note: `uglify-js` only supports ES5.
Those wishing to minify ES6 should use `uglify-es`.
-->
9 changes: 5 additions & 4 deletions bin/uglifyjs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ function run() {
}
}
} catch (ex) {
fatal(ex.stack);
fatal(ex);
}
var result = UglifyJS.minify(files, options);
if (result.error) {
Expand All @@ -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;
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"homepage": "http://lisperator.net/uglifyjs",
"author": "Mihai Bazon <mihai.bazon@gmail.com> (http://lisperator.net/)",
"license": "BSD-2-Clause",
"version": "3.0.2",
"version": "3.0.3",
"engines": {
"node": ">=0.8.0"
},
Expand Down
2 changes: 1 addition & 1 deletion test/mocha/spidermonkey.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 | " +
Expand Down

0 comments on commit e2888bd

Please sign in to comment.