terser 5.34.1 → 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 CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## v5.35.0
4
+
5
+ - Ensure parent directory exists when using --output on CLI (#1530)
6
+
3
7
  ## v5.34.1
4
8
 
5
9
  - bump the rollup devDependency to disable CVE warnings (Terser was not affected)
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
- - `nth_identifer` (default: an internal mangler that weights based on character
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
@@ -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.34.1",
7
+ "version": "5.35.0",
8
8
  "engines": {
9
9
  "node": ">=10"
10
10
  },