terser 5.34.0 → 5.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/dist/bundle.min.js +1 -0
- package/lib/cli.js +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## v5.35.0
|
4
|
+
|
5
|
+
- Ensure parent directory exists when using --output on CLI (#1530)
|
6
|
+
|
7
|
+
## v5.34.1
|
8
|
+
|
9
|
+
- bump the rollup devDependency to disable CVE warnings (Terser was not affected)
|
10
|
+
|
3
11
|
## v5.34.0
|
4
12
|
|
5
13
|
- internal: stop assigning properties to objects they don't belong in
|
package/README.md
CHANGED
@@ -972,7 +972,7 @@ await minify(code, { mangle: { toplevel: true } }).code;
|
|
972
972
|
- `false` -- `obj["prop"]` is mangled.
|
973
973
|
- `true` -- `obj.prop` is mangled unless there is `obj["prop"]` elsewhere in the code.
|
974
974
|
|
975
|
-
- `
|
975
|
+
- `nth_identifier` (default: an internal mangler that weights based on character
|
976
976
|
frequency analysis) -- Pass an object with a `get(n)` function that converts an
|
977
977
|
ordinal into the nth most favored (usually shortest) identifier.
|
978
978
|
Optionally also provide `reset()`, `sort()`, and `consider(chars, delta)` to
|
package/dist/bundle.min.js
CHANGED
@@ -32455,6 +32455,7 @@ async function run_cli({ program, packageJson, fs, path }) {
|
|
32455
32455
|
return;
|
32456
32456
|
}
|
32457
32457
|
} else if (program.output) {
|
32458
|
+
fs.mkdirSync(path.dirname(program.output), { recursive: true });
|
32458
32459
|
fs.writeFileSync(program.output, result.code);
|
32459
32460
|
if (options.sourceMap && options.sourceMap.url !== "inline" && result.map) {
|
32460
32461
|
fs.writeFileSync(program.output + ".map", result.map);
|
package/lib/cli.js
CHANGED
@@ -307,6 +307,7 @@ export async function run_cli({ program, packageJson, fs, path }) {
|
|
307
307
|
return;
|
308
308
|
}
|
309
309
|
} else if (program.output) {
|
310
|
+
fs.mkdirSync(path.dirname(program.output), { recursive: true });
|
310
311
|
fs.writeFileSync(program.output, result.code);
|
311
312
|
if (options.sourceMap && options.sourceMap.url !== "inline" && result.map) {
|
312
313
|
fs.writeFileSync(program.output + ".map", result.map);
|
package/package.json
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
"homepage": "https://terser.org",
|
5
5
|
"author": "Mihai Bazon <mihai.bazon@gmail.com> (http://lisperator.net/)",
|
6
6
|
"license": "BSD-2-Clause",
|
7
|
-
"version": "5.
|
7
|
+
"version": "5.35.0",
|
8
8
|
"engines": {
|
9
9
|
"node": ">=10"
|
10
10
|
},
|
@@ -57,7 +57,7 @@
|
|
57
57
|
"esm": "^3.2.25",
|
58
58
|
"mocha": "^9.2.0",
|
59
59
|
"pre-commit": "^1.2.2",
|
60
|
-
"rollup": "^2.
|
60
|
+
"rollup": "^2.79.2",
|
61
61
|
"semver": "^7.5.1",
|
62
62
|
"source-map": "~0.8.0-beta.0"
|
63
63
|
},
|