terser 4.6.7 → 4.6.11

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,26 @@
1
1
  # Changelog
2
2
 
3
+ ## v4.6.11
4
+
5
+ - Read unused classes' properties and method keys, to figure out if they use other variables.
6
+ - Prevent inlining into block scopes when there are name collisions
7
+ - Functions are no longer inlined into parameter defaults, because they live in their own special scope.
8
+ - When inlining identity functions, take into account the fact they may be used to drop `this` in function calls.
9
+ - Nullish coalescing operator (`x ?? y`), plus basic optimization for it.
10
+ - Template literals in binary expressions such as `+` have been further optimized
11
+
12
+ ## v4.6.10
13
+
14
+ - Do not use reduce_vars when classes are present
15
+
16
+ ## v4.6.9
17
+
18
+ - Check if block scopes actually exist in blocks
19
+
20
+ ## v4.6.8
21
+
22
+ - Take into account "executed bits" of classes like static properties or computed keys, when checking if a class evaluation might throw or have side effects.
23
+
3
24
  ## v4.6.7
4
25
 
5
26
  - Some new performance gains through a `AST_Node.size()` method which measures a node's source code length without printing it to a string first.
package/README.md CHANGED
@@ -133,7 +133,7 @@ a double dash to prevent input files being used as option arguments:
133
133
  sequences.
134
134
  --config-file <file> Read `minify()` options from JSON file.
135
135
  -d, --define <expr>[=value] Global definitions.
136
- --ecma <version> Specify ECMAScript release: 5, 6, 7 or 8.
136
+ --ecma <version> Specify ECMAScript release: 5, 2015, 2016, etc.
137
137
  -e, --enclose [arg[:value]] Embed output in a big function with configurable
138
138
  arguments and values.
139
139
  --ie8 Support non-standard Internet Explorer 8.
@@ -534,7 +534,7 @@ if (result.error) throw result.error;
534
534
 
535
535
  ## Minify options
536
536
 
537
- - `ecma` (default `undefined`) - pass `5`, `2015`, `2016` or `2017` to override `parse`,
537
+ - `ecma` (default `undefined`) - pass `5`, `2015`, `2016`, etc to override `parse`,
538
538
  `compress` and `output`'s `ecma` options.
539
539
 
540
540
  - `warnings` (default `false`) — pass `true` to return compressor warnings
@@ -611,7 +611,7 @@ if (result.error) throw result.error;
611
611
  sourceMap: {
612
612
  // source map options
613
613
  },
614
- ecma: 5, // specify one of: 5, 2015, 2016, 2017 or 2018
614
+ ecma: 5, // specify one of: 5, 2015, 2016, etc.
615
615
  keep_classnames: false,
616
616
  keep_fnames: false,
617
617
  ie8: false,
@@ -686,6 +686,10 @@ If you happen to need the source map as a raw object, set `sourceMap.asObject` t
686
686
 
687
687
  ## Compress options
688
688
 
689
+ - `defaults` (default: `true`) -- Pass `false` to disable most default
690
+ enabled `compress` transforms. Useful when you only want to enable a few
691
+ `compress` options while disabling the rest.
692
+
689
693
  - `arrows` (default: `true`) -- Class and object literal methods are converted
690
694
  will also be converted to arrow expressions if the resultant code is shorter:
691
695
  `m(){return x}` becomes `m:()=>x`. To do this to regular ES5 functions which
@@ -715,10 +719,6 @@ If you happen to need the source map as a raw object, set `sourceMap.asObject` t
715
719
 
716
720
  - `dead_code` (default: `true`) -- remove unreachable code
717
721
 
718
- - `defaults` (default: `true`) -- Pass `false` to disable most default
719
- enabled `compress` transforms. Useful when you only want to enable a few
720
- `compress` options while disabling the rest.
721
-
722
722
  - `directives` (default: `true`) -- remove redundant or non-standard directives
723
723
 
724
724
  - `drop_console` (default: `false`) -- Pass `true` to discard calls to