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.
@@ -6367,7 +6367,9 @@ def_optimize(AST_SymbolRef, function(self, compressor) {
6367
6367
  && !(parent instanceof AST_Call
6368
6368
  && (parent.is_expr_pure(compressor))
6369
6369
  || has_annotation(parent, _NOINLINE))
6370
- && !(fixed instanceof AST_Defun && parent instanceof AST_Export);
6370
+ && !(parent instanceof AST_Export
6371
+ && fixed instanceof AST_Lambda
6372
+ && fixed.name);
6371
6373
 
6372
6374
  if (single_use && (fixed instanceof AST_Lambda || fixed instanceof AST_Class)) {
6373
6375
  if (retain_top_func(fixed, compressor)) {
package/lib/transform.js CHANGED
@@ -51,6 +51,7 @@ import {
51
51
  AST_Call,
52
52
  AST_Case,
53
53
  AST_Catch,
54
+ AST_Chain,
54
55
  AST_Class,
55
56
  AST_Conditional,
56
57
  AST_Definitions,
@@ -236,6 +237,10 @@ def_transform(AST_Sub, function(self, tw) {
236
237
  self.property = self.property.transform(tw);
237
238
  });
238
239
 
240
+ def_transform(AST_Chain, function(self, tw) {
241
+ self.expression = self.expression.transform(tw);
242
+ });
243
+
239
244
  def_transform(AST_Yield, function(self, tw) {
240
245
  if (self.expression) self.expression = self.expression.transform(tw);
241
246
  });
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "homepage": "https://terser.org",
5
5
  "author": "Mihai Bazon <mihai.bazon@gmail.com> (http://lisperator.net/)",
6
6
  "license": "BSD-2-Clause",
7
- "version": "5.3.4",
7
+ "version": "5.3.5",
8
8
  "engines": {
9
9
  "node": ">=6.0.0"
10
10
  },