terser 5.3.4 → 5.3.5
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 +5 -0
- package/dist/bundle.min.js +7 -1
- package/dist/bundle.min.js.map +1 -1
- package/lib/compress/index.js +3 -1
- package/lib/transform.js +5 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## v5.3.5
|
4
|
+
|
5
|
+
- Avoid moving named functions into default exports.
|
6
|
+
- Enabled transform() for chain expressions. This allows AST transformers to reach inside chain expressions.
|
7
|
+
|
3
8
|
## v5.3.4
|
4
9
|
|
5
10
|
- Fixed a crash when hoisting (with `hoist_vars`) a destructuring variable declaration
|
package/dist/bundle.min.js
CHANGED
@@ -5363,6 +5363,10 @@ def_transform(AST_Sub, function(self, tw) {
|
|
5363
5363
|
self.property = self.property.transform(tw);
|
5364
5364
|
});
|
5365
5365
|
|
5366
|
+
def_transform(AST_Chain, function(self, tw) {
|
5367
|
+
self.expression = self.expression.transform(tw);
|
5368
|
+
});
|
5369
|
+
|
5366
5370
|
def_transform(AST_Yield, function(self, tw) {
|
5367
5371
|
if (self.expression) self.expression = self.expression.transform(tw);
|
5368
5372
|
});
|
@@ -16469,7 +16473,9 @@ def_optimize(AST_SymbolRef, function(self, compressor) {
|
|
16469
16473
|
&& !(parent instanceof AST_Call
|
16470
16474
|
&& (parent.is_expr_pure(compressor))
|
16471
16475
|
|| has_annotation(parent, _NOINLINE))
|
16472
|
-
&& !(
|
16476
|
+
&& !(parent instanceof AST_Export
|
16477
|
+
&& fixed instanceof AST_Lambda
|
16478
|
+
&& fixed.name);
|
16473
16479
|
|
16474
16480
|
if (single_use && (fixed instanceof AST_Lambda || fixed instanceof AST_Class)) {
|
16475
16481
|
if (retain_top_func(fixed, compressor)) {
|