diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 53c44d3f..0e49efca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: test: strategy: matrix: - node: [ '0.10', '0.12', '4', '6', '8', '10', '12', '14', '16', latest ] + node: [ '0.10', '0.12', '4', '6', '8', '10', '12', '14', '16', '18' ] os: [ ubuntu-latest, windows-latest ] script: [ compress, mocha, release/benchmark, release/jetstream ] name: ${{ matrix.node }} ${{ matrix.os }} ${{ matrix.script }} diff --git a/.gitignore b/.gitignore index 26c04224..3552a719 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ -/node_modules/ -/npm-debug.log -tmp/ - -# files generated at build time index.js.map +node_modules/ +npm-debug.log +tmp/ diff --git a/bin/uglifyjs b/bin/uglifyjs index e176a893..f916afa6 100755 --- a/bin/uglifyjs +++ b/bin/uglifyjs @@ -175,6 +175,9 @@ function process_option(name, no_value) { case "wrap": options[name] = read_value(true); break; + case "no-wrap": + options.wrap = false; + break; case "verbose": options.warnings = "verbose"; break; @@ -271,7 +274,7 @@ if (typeof options.sourceMap == "object" && "base" in options.sourceMap) { } if (specified["self"]) { if (paths.length) UglifyJS.AST_Node.warn("Ignoring input files since --self was passed"); - if (!options.wrap) options.wrap = "UglifyJS"; + if (!("wrap" in options)) options.wrap = "UglifyJS"; paths = UglifyJS.FILES; } else if (paths.length) { paths = simple_glob(paths); diff --git a/index.js b/index.js index 3b68b154..62afa94a 100644 --- a/index.js +++ b/index.js @@ -1 +1 @@ -module.exports = require("./tools/node.js"); +module.exports = require("./tools/node"); diff --git a/package.json b/package.json index 5c114ce7..dbf7014e 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ }, "scripts": { "test": "node test/compress.js && node test/mocha.js", - "prepack": "bin/uglifyjs --self --beautify --source-map --output index.js" + "prepack": "node bin/uglifyjs --self --no-wrap --beautify --source-map --output index.js" }, "keywords": [ "cli",