Comparing version 5.31.1 to 5.31.2
# Changelog | ||
## v5.31.2 | ||
- drop_unused: scan variables in self-referential class declarations that contain side effects. | ||
- Don't add parens to arrow function when it's the default for an argument (#1540) | ||
- Update domprops (#1538) | ||
## v5.31.1 | ||
@@ -4,0 +9,0 @@ - Allow drop-unused to drop the whole assignment (not just the assigned name) in more situations, in order to avoid duplication of long strings. |
@@ -142,3 +142,2 @@ /*********************************************************************** | ||
var initializations = new Map(); | ||
var self_referential_classes = new Set(); | ||
@@ -158,4 +157,7 @@ // pass 1: find out which symbols are directly used in | ||
if (node instanceof AST_Class && node.has_side_effects(compressor)) { | ||
if (node.is_self_referential()) self_referential_classes.add(node); | ||
node.visit_nondeferred_class_parts(tw); | ||
if (node.is_self_referential()) { | ||
descend(); | ||
} else { | ||
node.visit_nondeferred_class_parts(tw); | ||
} | ||
} | ||
@@ -224,5 +226,2 @@ if (node instanceof AST_Defun || node instanceof AST_DefClass) { | ||
}); | ||
self_referential_classes.forEach(function (cls) { | ||
cls.walk(tw); | ||
}); | ||
// pass 3: we should drop declarations not in_use | ||
@@ -229,0 +228,0 @@ var tt = new TreeTransformer( |
@@ -7,3 +7,3 @@ { | ||
"license": "BSD-2-Clause", | ||
"version": "5.31.1", | ||
"version": "5.31.2", | ||
"engines": { | ||
@@ -10,0 +10,0 @@ "node": ">=10" |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2193093
62672