terser 4.6.11 → 4.6.12
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 +5 -0
- package/README.md +5 -9
- package/dist/bundle.min.js +1 -1
- package/dist/bundle.min.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## v4.6.12
|
4
|
+
|
5
|
+
- Fixed subtree comparison code, making it see that `[1,[2, 3]]` is different from `[1, 2, [3]]`
|
6
|
+
- Printing of unicode identifiers has been improved
|
7
|
+
|
3
8
|
## v4.6.11
|
4
9
|
|
5
10
|
- Read unused classes' properties and method keys, to figure out if they use other variables.
|
package/README.md
CHANGED
@@ -90,10 +90,9 @@ a double dash to prevent input files being used as option arguments:
|
|
90
90
|
`reserved` List of names that should not be mangled.
|
91
91
|
--mangle-props [options] Mangle properties/specify mangler options:
|
92
92
|
`builtins` Mangle property names that overlaps
|
93
|
-
with standard JavaScript globals
|
93
|
+
with standard JavaScript globals and DOM
|
94
|
+
API props.
|
94
95
|
`debug` Add debug prefix and suffix.
|
95
|
-
`domprops` Mangle property names that overlaps
|
96
|
-
with DOM properties.
|
97
96
|
`keep_quoted` Only mangle unquoted properties, quoted
|
98
97
|
properties are automatically reserved.
|
99
98
|
`strict` disables quoted properties
|
@@ -321,12 +320,8 @@ $ terser example.js -c passes=2 -m --mangle-props regex=/_$/,reserved=[bar_]
|
|
321
320
|
var x={o:3,t:1,calc:function(){return this.t+this.o},bar_:2};console.log(x.calc());
|
322
321
|
```
|
323
322
|
|
324
|
-
In order for this to be of any use, we avoid mangling standard JS names
|
325
|
-
default (`--mangle-props builtins` to override).
|
326
|
-
|
327
|
-
A default exclusion file is provided in `tools/domprops.js` which should
|
328
|
-
cover most standard JS and DOM properties defined in various browsers. Pass
|
329
|
-
`--mangle-props domprops` to disable this feature.
|
323
|
+
In order for this to be of any use, we avoid mangling standard JS names and DOM
|
324
|
+
API properties by default (`--mangle-props builtins` to override).
|
330
325
|
|
331
326
|
A regular expression can be used to define which property names should be
|
332
327
|
mangled. For example, `--mangle-props regex=/^_/` will only mangle property
|
@@ -1321,6 +1316,7 @@ To allow for better optimizations, the compiler makes various assumptions:
|
|
1321
1316
|
- Object properties can be added, removed and modified (not prevented with
|
1322
1317
|
`Object.defineProperty()`, `Object.defineProperties()`, `Object.freeze()`,
|
1323
1318
|
`Object.preventExtensions()` or `Object.seal()`).
|
1319
|
+
- `document.all` is not `== null`
|
1324
1320
|
|
1325
1321
|
### Build Tools and Adaptors using Terser
|
1326
1322
|
|