terser 5.27.0 → 5.27.1
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 +3 -0
- package/dist/bundle.min.js +10 -1
- package/lib/compress/tighten-body.js +10 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/bundle.min.js
CHANGED
@@ -16725,6 +16725,14 @@ function tighten_body(statements, compressor) {
|
|
16725
16725
|
return found;
|
16726
16726
|
}
|
16727
16727
|
|
16728
|
+
function arg_is_injectable(arg) {
|
16729
|
+
if (arg instanceof AST_Expansion) return false;
|
16730
|
+
const contains_await = walk(arg, (node) => {
|
16731
|
+
if (node instanceof AST_Await) return walk_abort;
|
16732
|
+
});
|
16733
|
+
if (contains_await) return false;
|
16734
|
+
return true;
|
16735
|
+
}
|
16728
16736
|
function extract_args() {
|
16729
16737
|
var iife, fn = compressor.self();
|
16730
16738
|
if (is_func_expr(fn)
|
@@ -16733,7 +16741,8 @@ function tighten_body(statements, compressor) {
|
|
16733
16741
|
&& !fn.pinned()
|
16734
16742
|
&& (iife = compressor.parent()) instanceof AST_Call
|
16735
16743
|
&& iife.expression === fn
|
16736
|
-
&& iife.args.every(
|
16744
|
+
&& iife.args.every(arg_is_injectable)
|
16745
|
+
) {
|
16737
16746
|
var fn_strict = compressor.has_directive("use strict");
|
16738
16747
|
if (fn_strict && !member(fn_strict, fn.body))
|
16739
16748
|
fn_strict = false;
|
@@ -574,6 +574,14 @@ export function tighten_body(statements, compressor) {
|
|
574
574
|
return found;
|
575
575
|
}
|
576
576
|
|
577
|
+
function arg_is_injectable(arg) {
|
578
|
+
if (arg instanceof AST_Expansion) return false;
|
579
|
+
const contains_await = walk(arg, (node) => {
|
580
|
+
if (node instanceof AST_Await) return walk_abort;
|
581
|
+
});
|
582
|
+
if (contains_await) return false;
|
583
|
+
return true;
|
584
|
+
}
|
577
585
|
function extract_args() {
|
578
586
|
var iife, fn = compressor.self();
|
579
587
|
if (is_func_expr(fn)
|
@@ -582,7 +590,8 @@ export function tighten_body(statements, compressor) {
|
|
582
590
|
&& !fn.pinned()
|
583
591
|
&& (iife = compressor.parent()) instanceof AST_Call
|
584
592
|
&& iife.expression === fn
|
585
|
-
&& iife.args.every(
|
593
|
+
&& iife.args.every(arg_is_injectable)
|
594
|
+
) {
|
586
595
|
var fn_strict = compressor.has_directive("use strict");
|
587
596
|
if (fn_strict && !member(fn_strict, fn.body))
|
588
597
|
fn_strict = false;
|