terser 5.16.1 → 5.16.3
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 +14 -0
- package/README.md +4 -4
- package/dist/bundle.min.js +372 -194
- package/lib/ast.js +4 -0
- package/lib/compress/common.js +3 -2
- package/lib/compress/inline.js +119 -114
- package/lib/compress/native-objects.js +22 -0
- package/lib/compress/reduce-vars.js +30 -11
- package/lib/compress/tighten-body.js +9 -2
- package/lib/minify.js +9 -6
- package/lib/mozilla-ast.js +83 -34
- package/lib/output.js +44 -12
- package/lib/parse.js +46 -12
- package/lib/scope.js +3 -1
- package/package.json +1 -1
- package/tools/terser.d.ts +1 -0
- package/bin/terser.mjs +0 -21
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## v5.16.3
|
4
|
+
|
5
|
+
- Ensure function definitions, don't assume the values of variables defined after them.
|
6
|
+
|
7
|
+
## v5.16.2
|
8
|
+
|
9
|
+
- Fix sourcemaps with non-ascii characters (#1318)
|
10
|
+
- Support string module name and export * as (#1336)
|
11
|
+
- Do not move `let` out of `for` initializers, as it can change scoping
|
12
|
+
- Fix a corner case that would generate the invalid syntax `if (something) let x` ("let" in braceless if body)
|
13
|
+
- Knowledge of more native object properties (#1330)
|
14
|
+
- Got rid of Travis (#1323)
|
15
|
+
- Added semi-secret `asObject` sourcemap option to typescript defs (#1321)
|
16
|
+
|
3
17
|
## v5.16.1
|
4
18
|
|
5
19
|
- Properly handle references in destructurings (`const { [reference]: val } = ...`)
|
package/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[![NPM Version][npm-image]][npm-url]
|
4
4
|
[![NPM Downloads][downloads-image]][downloads-url]
|
5
|
-
[![
|
5
|
+
[![CI pipeline][ci-image]][ci-url]
|
6
6
|
[![Opencollective financial contributors][opencollective-contributors]][opencollective-url]
|
7
7
|
|
8
8
|
A JavaScript mangler/compressor toolkit for ES6+.
|
@@ -21,8 +21,8 @@ Find the changelog in [CHANGELOG.md](https://github.com/terser/terser/blob/maste
|
|
21
21
|
[npm-url]: https://npmjs.org/package/terser
|
22
22
|
[downloads-image]: https://img.shields.io/npm/dm/terser.svg
|
23
23
|
[downloads-url]: https://npmjs.org/package/terser
|
24
|
-
[
|
25
|
-
[
|
24
|
+
[ci-image]: https://github.com/terser/terser/actions/workflows/ci.yml/badge.svg
|
25
|
+
[ci-url]: https://github.com/terser/terser/actions/workflows/ci.yml
|
26
26
|
[opencollective-contributors]: https://opencollective.com/terser/tiers/badge.svg
|
27
27
|
[opencollective-url]: https://opencollective.com/terser
|
28
28
|
|
@@ -758,7 +758,7 @@ If you happen to need the source map as a raw object, set `sourceMap.asObject` t
|
|
758
758
|
- `3` -- inline functions with arguments and variables
|
759
759
|
- `true` -- same as `3`
|
760
760
|
|
761
|
-
- `join_vars` (default: `true`) -- join consecutive `var` statements
|
761
|
+
- `join_vars` (default: `true`) -- join consecutive `var`, `let` and `const` statements
|
762
762
|
|
763
763
|
- `keep_classnames` (default: `false`) -- Pass `true` to prevent the compressor from
|
764
764
|
discarding class names. Pass a regular expression to only keep class names matching
|