terser 5.31.4 → 5.31.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 +4 -1
- package/dist/bundle.min.js +2 -5
- package/lib/ast.js +0 -3
- package/lib/compress/drop-side-effect-free.js +1 -1
- package/lib/compress/drop-unused.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/bundle.min.js
CHANGED
@@ -5905,9 +5905,6 @@ var AST_Class = DEFNODE("Class", "name extends properties", function AST_Class(p
|
|
5905
5905
|
}));
|
5906
5906
|
return found;
|
5907
5907
|
},
|
5908
|
-
body_has_side_effects(compressor) {
|
5909
|
-
return this.properties.some(prop => prop.has_side_effects(compressor));
|
5910
|
-
},
|
5911
5908
|
}, AST_Scope /* TODO a class might have a scope but it's not a scope */);
|
5912
5909
|
|
5913
5910
|
var AST_ClassProperty = DEFNODE("ClassProperty", "static quote", function AST_ClassProperty(props) {
|
@@ -14982,7 +14979,7 @@ def_drop_side_effect_free(AST_Arrow, return_null);
|
|
14982
14979
|
def_drop_side_effect_free(AST_Class, function (compressor) {
|
14983
14980
|
const with_effects = [];
|
14984
14981
|
|
14985
|
-
if (this.is_self_referential() && this.
|
14982
|
+
if (this.is_self_referential() && this.has_side_effects(compressor)) {
|
14986
14983
|
return this;
|
14987
14984
|
}
|
14988
14985
|
|
@@ -15290,7 +15287,7 @@ AST_Scope.DEFMETHOD("drop_unused", function(compressor) {
|
|
15290
15287
|
});
|
15291
15288
|
}
|
15292
15289
|
if (node === self) return;
|
15293
|
-
if (node instanceof AST_Class && node.
|
15290
|
+
if (node instanceof AST_Class && node.has_side_effects(compressor)) {
|
15294
15291
|
if (node.is_self_referential()) {
|
15295
15292
|
descend();
|
15296
15293
|
} else {
|
package/lib/ast.js
CHANGED
@@ -2289,9 +2289,6 @@ var AST_Class = DEFNODE("Class", "name extends properties", function AST_Class(p
|
|
2289
2289
|
}));
|
2290
2290
|
return found;
|
2291
2291
|
},
|
2292
|
-
body_has_side_effects(compressor) {
|
2293
|
-
return this.properties.some(prop => prop.has_side_effects(compressor));
|
2294
|
-
},
|
2295
2292
|
}, AST_Scope /* TODO a class might have a scope but it's not a scope */);
|
2296
2293
|
|
2297
2294
|
var AST_ClassProperty = DEFNODE("ClassProperty", "static quote", function AST_ClassProperty(props) {
|
@@ -156,7 +156,7 @@ def_drop_side_effect_free(AST_Arrow, return_null);
|
|
156
156
|
def_drop_side_effect_free(AST_Class, function (compressor) {
|
157
157
|
const with_effects = [];
|
158
158
|
|
159
|
-
if (this.is_self_referential() && this.
|
159
|
+
if (this.is_self_referential() && this.has_side_effects(compressor)) {
|
160
160
|
return this;
|
161
161
|
}
|
162
162
|
|
@@ -153,7 +153,7 @@ AST_Scope.DEFMETHOD("drop_unused", function(compressor) {
|
|
153
153
|
});
|
154
154
|
}
|
155
155
|
if (node === self) return;
|
156
|
-
if (node instanceof AST_Class && node.
|
156
|
+
if (node instanceof AST_Class && node.has_side_effects(compressor)) {
|
157
157
|
if (node.is_self_referential()) {
|
158
158
|
descend();
|
159
159
|
} else {
|