terser 4.6.6 → 4.6.7

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.6.7
4
+
5
+ - 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.
6
+ - An issue with setting `--comments` to `false` in the CLI has been fixed.
7
+ - Fixed some issues with inlining
8
+ - `unsafe_symbols` compress option was added, which turns `Symbol("name")` into just `Symbol()`
9
+ - Brought back compress performance improvement through the `AST_Node.equivalent_to(other)` method (which was reverted in v4.6.6).
10
+
3
11
  ## v4.6.6
4
12
 
5
13
  (hotfix release)
package/README.md CHANGED
@@ -865,6 +865,9 @@ If you happen to need the source map as a raw object, set `sourceMap.asObject` t
865
865
  - `unsafe_math` (default: `false`) -- optimize numerical expressions like
866
866
  `2 * x * 3` into `6 * x`, which may give imprecise floating point results.
867
867
 
868
+ - `unsafe_symbols` (default: `false`) -- removes keys from native Symbol
869
+ declarations, e.g `Symbol("kDog")` becomes `Symbol()`.
870
+
868
871
  - `unsafe_methods` (default: false) -- Converts `{ m: function(){} }` to
869
872
  `{ m(){} }`. `ecma` must be set to `6` or greater to enable this transform.
870
873
  If `unsafe_methods` is a RegExp then key/value pairs with keys matching the
package/bin/terser CHANGED
@@ -99,7 +99,7 @@ if (program.beautify) {
99
99
  }
100
100
  if (program.comments) {
101
101
  if (typeof options.output != "object") options.output = {};
102
- options.output.comments = typeof program.comments == "string" ? program.comments : "some";
102
+ options.output.comments = typeof program.comments == "string" ? (program.comments == "false" ? false : program.comments) : "some";
103
103
  }
104
104
  if (program.define) {
105
105
  if (typeof options.compress != "object") options.compress = {};