terser 5.19.4 → 5.20.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,11 @@
1
1
  # Changelog
2
2
 
3
+ ## v5.20.0
4
+ - Passing `minify()` zero files will now throw a clean exception (#1450)
5
+ - `drop_console` supports passing in an array of `console.*` method names (#1445)
6
+ - New DOM properties from the WebGPU API have been added for use in the property mangler (#1436)
7
+ - Internal code simplification (#1437)
8
+
3
9
  ## v5.19.4
4
10
  - Prevent creating very deeply nested ternaries from a long list of `if..return`
5
11
  - Prevent inlining classes into other functions, to avoid constructors being compared.
package/README.md CHANGED
@@ -417,7 +417,7 @@ Or,
417
417
  import { minify } from "terser";
418
418
  ```
419
419
 
420
- Browser loading is also supported:
420
+ Browser loading is also supported. It exposes a global variable `Terser` containing a `.minify` property:
421
421
  ```html
422
422
  <script src="https://cdn.jsdelivr.net/npm/source-map@0.7.3/dist/source-map.js"></script>
423
423
  <script src="https://cdn.jsdelivr.net/npm/terser/dist/bundle.min.js"></script>
@@ -729,9 +729,8 @@ If you happen to need the source map as a raw object, set `sourceMap.asObject` t
729
729
  - `directives` (default: `true`) -- remove redundant or non-standard directives
730
730
 
731
731
  - `drop_console` (default: `false`) -- Pass `true` to discard calls to
732
- `console.*` functions. If you wish to drop a specific function call
733
- such as `console.info` and/or retain side effects from function arguments
734
- after dropping the function call then use `pure_funcs` instead.
732
+ `console.*` functions. If you only want to discard a portion of console,
733
+ you can pass an array like this `['log', 'info']`, which will only discard `console.log`、 `console.info`.
735
734
 
736
735
  - `drop_debugger` (default: `true`) -- remove `debugger;` statements
737
736