Skip to content

Commit 9382bda

Browse files
authored
fix(es/minifier): Fix toFixed, toPrecision, toExponential and toString of Number (#6960)
1 parent 6f18f23 commit 9382bda

File tree

18 files changed

+1373
-44
lines changed

18 files changed

+1373
-44
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ crates/swc_css_parser/tests/
1919
crates/swc_css_prefixer/tests/
2020
crates/swc_ecma_codegen/tests/
2121
crates/swc_ecma_lints/tests/
22+
crates/swc_ecma_minifier/tests/
2223
crates/swc_ecma_parser/tests/
2324
crates/swc_estree_compat/tests/
2425
crates/swc_html_codegen/tests/

Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/swc/tests/tsc-references/arrowFunctionExpressions.2.minified.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
33
import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
44
import _to_array from "@swc/helpers/src/_to_array.mjs";
5-
0..toExponential();
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
//// [numberPropertyAccess.ts]
2-
1..toExponential(), 1..hasOwnProperty("toFixed"), 1..toExponential(), 1..hasOwnProperty("toFixed");
2+
1..hasOwnProperty("toFixed"), 1..hasOwnProperty("toFixed");

crates/swc_ecma_minifier/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ radix_fmt = "=1.0.0"
4242
rayon = {version = "1.5.1", optional = true}
4343
regex = "1.5.3"
4444
rustc-hash = "1.1.0"
45+
ryu-js = "0.2.2"
4546
serde = {version = "1.0.118", features = ["derive"]}
4647
serde_json = "1.0.61"
4748
swc_atoms = {version = "0.4.36", path = "../swc_atoms"}

0 commit comments

Comments
 (0)