terser 4.2.0 → 4.2.1

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.

Potentially problematic release.


This version of terser might be problematic. Click here for more details.

package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## v4.2.1
4
+
5
+ - Minor refactors
6
+ - Fixed a bug similar to #369 in collapse_vars
7
+ - Functions can no longer be inlined into a place where they're going to be compared with themselves.
8
+ - reduce_funcs option is now legacy, as using reduce_vars without reduce_funcs caused some weird corner cases. As a result, it is now implied in reduce_vars and can't be turned off without turning off reduce_vars.
9
+ - Bug which would cause a random stack overflow has now been fixed.
10
+
3
11
  ## v4.2.0
4
12
 
5
13
  - When the source map URL is `inline`, don't write it to a file.
package/README.md CHANGED
@@ -1,7 +1,4 @@
1
- terser
2
- ======
3
-
4
- ![Terser](https://raw.githubusercontent.com/terser-js/terser/master/logo.svg)
1
+ <h1><img src="https://raw.githubusercontent.com/terser-js/terser/master/logo.svg?sanitize=true" alt="Terser" width="450" height="190"></h1>
5
2
 
6
3
  [![NPM Version][npm-image]][npm-url]
7
4
  [![NPM Downloads][downloads-image]][downloads-url]
@@ -47,7 +44,7 @@ From NPM for use as a command line app:
47
44
  From NPM for programmatic use:
48
45
 
49
46
  npm install terser
50
-
47
+
51
48
  # Command line usage
52
49
 
53
50
  terser [input files] [options]
@@ -263,7 +260,7 @@ way to use this is to use the `regex` option like so:
263
260
  terser example.js -c -m --mangle-props regex=/_$/
264
261
  ```
265
262
 
266
- This will mangle all properties that start with an
263
+ This will mangle all properties that start with an
267
264
  underscore. So you can use it to mangle internal methods.
268
265
 
269
266
  By default, it will mangle all properties in the
@@ -533,7 +530,7 @@ if (result.error) throw result.error;
533
530
  ## Minify options
534
531
 
535
532
  - `ecma` (default `undefined`) - pass `5`, `6`, `7` or `8` to override `parse`,
536
- `compress` and `output` options.
533
+ `compress` and `output`'s `ecma` options.
537
534
 
538
535
  - `warnings` (default `false`) — pass `true` to return compressor warnings
539
536
  in `result.warnings`. Use the value `"verbose"` for more detailed warnings.
@@ -805,11 +802,7 @@ If you're using the `X-SourceMap` header instead, you can just omit `sourceMap.u
805
802
  Specify `"strict"` to treat `foo.bar` as side-effect-free only when
806
803
  `foo` is certain to not throw, i.e. not `null` or `undefined`.
807
804
 
808
- - `reduce_funcs` (default: `true`) -- Allows single-use functions to be
809
- inlined as function expressions when permissible allowing further
810
- optimization. Enabled by default. Option depends on `reduce_vars`
811
- being enabled. Some code runs faster in the Chrome V8 engine if this
812
- option is disabled. Does not negatively impact other major browsers.
805
+ - `reduce_funcs` (legacy option, safely ignored for backwards compatibility).
813
806
 
814
807
  - `reduce_vars` (default: `true`) -- Improve optimization on variables assigned with and
815
808
  used as constant values.