Skip to content

Commit

Permalink
fix index.js packaging
Browse files Browse the repository at this point in the history
- drop testing on unusable `npm` versions
  • Loading branch information
alexlamsl committed Dec 20, 2022
1 parent 0988707 commit a6313e0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -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 }}
Expand Down
8 changes: 3 additions & 5 deletions .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/
5 changes: 4 additions & 1 deletion bin/uglifyjs
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion index.js
@@ -1 +1 @@
module.exports = require("./tools/node.js");
module.exports = require("./tools/node");
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -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",
Expand Down

0 comments on commit a6313e0

Please sign in to comment.