terser 5.18.1 → 5.18.2
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 -2
- package/dist/bundle.min.js +17 -15
- package/lib/compress/reduce-vars.js +18 -16
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
##
|
3
|
+
## v5.18.2
|
4
|
+
- Stop using recursion in hoisted defuns fix.
|
5
|
+
|
6
|
+
## v5.18.1
|
4
7
|
- Fix major performance issue caused by hoisted defuns' scopes bugfix.
|
5
8
|
|
6
|
-
##
|
9
|
+
## v5.18.0
|
7
10
|
- Add new `/*@__MANGLE_PROP__*/` annotation, to mark properties that should be mangled.
|
8
11
|
|
9
12
|
## v5.17.7
|
package/dist/bundle.min.js
CHANGED
@@ -16013,23 +16013,25 @@ function handle_defined_after_hoist(parent) {
|
|
16013
16013
|
|
16014
16014
|
// find the index in `found_symbols`, with some special rules:
|
16015
16015
|
const find = (sym_id, starting_at = 0, must_be_write = false) => {
|
16016
|
-
|
16016
|
+
let index = starting_at;
|
16017
16017
|
|
16018
|
-
|
16019
|
-
|
16020
|
-
|
16021
|
-
|
16022
|
-
|
16023
|
-
|
16024
|
-
|
16025
|
-
|
16026
|
-
&& index
|
16027
|
-
|
16028
|
-
|
16029
|
-
|
16030
|
-
|
16031
|
-
|
16018
|
+
for (;;) {
|
16019
|
+
index = found_symbols.indexOf(sym_id, index);
|
16020
|
+
|
16021
|
+
if (index === -1) {
|
16022
|
+
break;
|
16023
|
+
} else if (index >= defun_range.start && index < defun_range.end) {
|
16024
|
+
index = defun_range.end;
|
16025
|
+
continue;
|
16026
|
+
} else if (must_be_write && !found_symbol_writes.has(index)) {
|
16027
|
+
index++;
|
16028
|
+
continue;
|
16029
|
+
} else {
|
16030
|
+
break;
|
16031
|
+
}
|
16032
16032
|
}
|
16033
|
+
|
16034
|
+
return index;
|
16033
16035
|
};
|
16034
16036
|
|
16035
16037
|
const read_defun_at = find(fname_def.id);
|
@@ -592,23 +592,25 @@ function handle_defined_after_hoist(parent) {
|
|
592
592
|
|
593
593
|
// find the index in `found_symbols`, with some special rules:
|
594
594
|
const find = (sym_id, starting_at = 0, must_be_write = false) => {
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
&& index
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
595
|
+
let index = starting_at;
|
596
|
+
|
597
|
+
for (;;) {
|
598
|
+
index = found_symbols.indexOf(sym_id, index);
|
599
|
+
|
600
|
+
if (index === -1) {
|
601
|
+
break;
|
602
|
+
} else if (index >= defun_range.start && index < defun_range.end) {
|
603
|
+
index = defun_range.end;
|
604
|
+
continue;
|
605
|
+
} else if (must_be_write && !found_symbol_writes.has(index)) {
|
606
|
+
index++;
|
607
|
+
continue;
|
608
|
+
} else {
|
609
|
+
break;
|
610
|
+
}
|
611
611
|
}
|
612
|
+
|
613
|
+
return index;
|
612
614
|
};
|
613
615
|
|
614
616
|
const read_defun_at = find(fname_def.id);
|