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.** 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); } } diff --git a/package.json b/package.json index 8016ea54..4c217c8d 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" }, 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 | " +