terser 5.0.0-beta.2 → 5.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.
package/CHANGELOG.md CHANGED
@@ -1,13 +1,49 @@
1
1
  # Changelog
2
2
 
3
+ ## v5.2.1
4
+
5
+ - The parse step now doesn't accept an `ecma` option, so that all ES code is accepted.
6
+ - Optional dotted chains now accept keywords, just like dotted expressions (`foo?.default`)
7
+
8
+ ## v5.2.0
9
+
10
+ - Optional chaining syntax is now supported.
11
+ - Consecutive await expressions don't have unnecessary parens
12
+ - Taking the variable name's length (after mangling) into consideration when deciding to inline
13
+
14
+ ## v5.1.0
15
+
16
+ - `import.meta` is now supported
17
+ - Typescript typings have been improved
18
+
19
+ ## v5.0.0
20
+
21
+ - `in` operator now taken into account during property mangle.
22
+ - Fixed infinite loop in face of a reference loop in some situations.
23
+ - Kept exports and imports around even if there's something which will throw before them.
24
+ - The main exported bundle for commonjs, dist/bundle.min.js is no longer minified.
25
+
3
26
  ## v5.0.0-beta.0
4
27
 
5
- - `minify()` is now async and rejects a promise instead of returning an error.
6
- - Internal AST is no longer exposed, so that it can be improved without releasing breaking changes.
7
- - Lowest supported node version is 10
28
+ - BREAKING: `minify()` is now async and rejects a promise instead of returning an error.
29
+ - BREAKING: Internal AST is no longer exposed, so that it can be improved without releasing breaking changes.
30
+ - BREAKING: Lowest supported node version is 10
31
+ - BREAKING: There are no more warnings being emitted
8
32
  - Module is now distributed as a dual package - You can `import` and `require()` too.
9
33
  - Inline improvements were made
10
34
 
35
+ ## v4.8.0
36
+
37
+ - Support for numeric separators (`million = 1_000_000`) was added.
38
+ - Assigning properties to a class is now assumed to be pure.
39
+ - Fixed bug where `yield` wasn't considered a valid property key in generators.
40
+
41
+ ## v4.7.0
42
+
43
+ - A bug was fixed where an arrow function would have the wrong size
44
+ - `arguments` object is now considered safe to retrieve properties from (useful for `length`, or `0`) even when `pure_getters` is not set.
45
+ - Fixed erroneous `const` declarations without value (which is invalid) in some corner cases when using `collapse_vars`.
46
+
11
47
  ## v4.6.13
12
48
 
13
49
  - Fixed issue where ES5 object properties were being turned into ES6 object properties due to more lax unicode rules.
package/README.md CHANGED
@@ -522,7 +522,7 @@ try {
522
522
 
523
523
  ## Minify options
524
524
 
525
- - `ecma` (default `undefined`) - pass `5`, `2015`, `2016`, etc to override `parse`,
525
+ - `ecma` (default `undefined`) - pass `5`, `2015`, `2016`, etc to override
526
526
  `compress` and `format`'s `ecma` options.
527
527
 
528
528
  - `parse` (default `{}`) — pass an object if you wish to specify some
@@ -660,10 +660,6 @@ If you happen to need the source map as a raw object, set `sourceMap.asObject` t
660
660
 
661
661
  - `bare_returns` (default `false`) -- support top level `return` statements
662
662
 
663
- - `ecma` (default: `2017`) -- specify one of `5`, `2015`, `2016` or `2017`. Note: this setting
664
- is not presently enforced except for ES8 optional trailing commas in function
665
- parameter lists and calls with `ecma` `2017`.
666
-
667
663
  - `html5_comments` (default `true`)
668
664
 
669
665
  - `shebang` (default `true`) -- support `#!command` as the first line
@@ -1251,6 +1247,7 @@ To allow for better optimizations, the compiler makes various assumptions:
1251
1247
  `Object.defineProperty()`, `Object.defineProperties()`, `Object.freeze()`,
1252
1248
  `Object.preventExtensions()` or `Object.seal()`).
1253
1249
  - `document.all` is not `== null`
1250
+ - Assigning properties to a class doesn't have side effects and does not throw.
1254
1251
 
1255
1252
  ### Build Tools and Adaptors using Terser
1256
1253