feat(preset-env): Upgrade browserslist-rs (#9023)

**Description:**

Compilation time of browserslist-rs has beed reduced by 32%. See:
https://github.com/browserslist/browserslist-rs/pull/23

But, it's still slower that oxc-browserslist:


![image](https://github.com/swc-project/swc/assets/17216317/44602603-e33f-442e-9ee0-242061089397)

while browserslist-rs costs about 3.9s.




**Related issue:**

Close #9014

---------

Co-authored-by: 강동윤 (Donny) <kdy1997.dev@gmail.com>
This commit is contained in:
Pig Fang 2024-07-01 13:20:49 +08:00 committed by GitHub
parent 6ce0e7109e
commit 18d6277e4c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
21 changed files with 2066 additions and 320 deletions

131
Cargo.lock generated
View File

@ -374,23 +374,19 @@ dependencies = [
[[package]] [[package]]
name = "browserslist-rs" name = "browserslist-rs"
version = "0.15.0" version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "405bbd46590a441abe5db3e5c8af005aa42e640803fecb51912703e93e4ce8d3" checksum = "fdf0ca73de70c3da94e4194e4a01fe732378f55d47cf4c0588caab22a0dbfa14"
dependencies = [ dependencies = [
"ahash 0.8.8", "ahash 0.8.8",
"anyhow",
"chrono", "chrono",
"either", "either",
"indexmap 2.1.0", "indexmap 2.2.6",
"itertools 0.12.0", "itertools 0.13.0",
"nom", "nom",
"once_cell", "once_cell",
"quote",
"serde", "serde",
"serde_json", "serde_json",
"string_cache",
"string_cache_codegen",
"thiserror", "thiserror",
] ]
@ -517,16 +513,16 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]] [[package]]
name = "chrono" name = "chrono"
version = "0.4.31" version = "0.4.38"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
dependencies = [ dependencies = [
"android-tzdata", "android-tzdata",
"iana-time-zone", "iana-time-zone",
"js-sys", "js-sys",
"num-traits", "num-traits",
"wasm-bindgen", "wasm-bindgen",
"windows-targets 0.48.5", "windows-targets 0.52.0",
] ]
[[package]] [[package]]
@ -1210,9 +1206,9 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
[[package]] [[package]]
name = "either" name = "either"
version = "1.10.0" version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b"
[[package]] [[package]]
name = "encode_unicode" name = "encode_unicode"
@ -1557,7 +1553,7 @@ dependencies = [
"futures-sink", "futures-sink",
"futures-util", "futures-util",
"http", "http",
"indexmap 2.1.0", "indexmap 2.2.6",
"slab", "slab",
"tokio", "tokio",
"tokio-util", "tokio-util",
@ -1817,9 +1813,9 @@ dependencies = [
[[package]] [[package]]
name = "indexmap" name = "indexmap"
version = "2.1.0" version = "2.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26"
dependencies = [ dependencies = [
"equivalent", "equivalent",
"hashbrown 0.14.3", "hashbrown 0.14.3",
@ -1884,9 +1880,9 @@ dependencies = [
[[package]] [[package]]
name = "itertools" name = "itertools"
version = "0.12.0" version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
dependencies = [ dependencies = [
"either", "either",
] ]
@ -2615,7 +2611,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9"
dependencies = [ dependencies = [
"fixedbitset", "fixedbitset",
"indexmap 2.1.0", "indexmap 2.2.6",
] ]
[[package]] [[package]]
@ -2625,17 +2621,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc"
dependencies = [ dependencies = [
"phf_macros", "phf_macros",
"phf_shared 0.11.2", "phf_shared",
]
[[package]]
name = "phf_generator"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6"
dependencies = [
"phf_shared 0.10.0",
"rand",
] ]
[[package]] [[package]]
@ -2644,7 +2630,7 @@ version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0"
dependencies = [ dependencies = [
"phf_shared 0.11.2", "phf_shared",
"rand", "rand",
] ]
@ -2654,22 +2640,13 @@ version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b"
dependencies = [ dependencies = [
"phf_generator 0.11.2", "phf_generator",
"phf_shared 0.11.2", "phf_shared",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.55", "syn 2.0.55",
] ]
[[package]]
name = "phf_shared"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096"
dependencies = [
"siphasher",
]
[[package]] [[package]]
name = "phf_shared" name = "phf_shared"
version = "0.11.2" version = "0.11.2"
@ -2757,12 +2734,6 @@ version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]]
name = "precomputed-hash"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
[[package]] [[package]]
name = "predicates" name = "predicates"
version = "3.1.0" version = "3.1.0"
@ -3415,7 +3386,7 @@ version = "0.9.30"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1bf28c79a99f70ee1f1d83d10c875d2e70618417fda01ad1785e027579d9d38" checksum = "b1bf28c79a99f70ee1f1d83d10c875d2e70618417fda01ad1785e027579d9d38"
dependencies = [ dependencies = [
"indexmap 2.1.0", "indexmap 2.2.6",
"itoa", "itoa",
"ryu", "ryu",
"serde", "serde",
@ -3622,32 +3593,6 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
name = "string_cache"
version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b"
dependencies = [
"new_debug_unreachable",
"once_cell",
"parking_lot",
"phf_shared 0.10.0",
"precomputed-hash",
"serde",
]
[[package]]
name = "string_cache_codegen"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988"
dependencies = [
"phf_generator 0.10.0",
"phf_shared 0.10.0",
"proc-macro2",
"quote",
]
[[package]] [[package]]
name = "string_enum" name = "string_enum"
version = "0.4.4" version = "0.4.4"
@ -3703,7 +3648,7 @@ dependencies = [
"criterion", "criterion",
"dashmap", "dashmap",
"either", "either",
"indexmap 2.1.0", "indexmap 2.2.6",
"jsonc-parser", "jsonc-parser",
"lru", "lru",
"napi", "napi",
@ -3773,7 +3718,7 @@ dependencies = [
"crc", "crc",
"dashmap", "dashmap",
"hex", "hex",
"indexmap 2.1.0", "indexmap 2.2.6",
"is-macro", "is-macro",
"ntest", "ntest",
"once_cell", "once_cell",
@ -3909,7 +3854,7 @@ name = "swc_config"
version = "0.1.14" version = "0.1.14"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"indexmap 2.1.0", "indexmap 2.2.6",
"serde", "serde",
"serde_json", "serde_json",
"sourcemap", "sourcemap",
@ -4094,7 +4039,7 @@ dependencies = [
name = "swc_css_modules" name = "swc_css_modules"
version = "0.30.0" version = "0.30.0"
dependencies = [ dependencies = [
"indexmap 2.1.0", "indexmap 2.2.6",
"rustc-hash", "rustc-hash",
"serde", "serde",
"serde_json", "serde_json",
@ -4253,7 +4198,7 @@ name = "swc_ecma_compat_es2015"
version = "0.7.1" version = "0.7.1"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"indexmap 2.1.0", "indexmap 2.2.6",
"is-macro", "is-macro",
"serde", "serde",
"serde_derive", "serde_derive",
@ -4472,7 +4417,7 @@ dependencies = [
"arrayvec", "arrayvec",
"backtrace", "backtrace",
"criterion", "criterion",
"indexmap 2.1.0", "indexmap 2.2.6",
"num-bigint", "num-bigint",
"num_cpus", "num_cpus",
"once_cell", "once_cell",
@ -4539,7 +4484,7 @@ dependencies = [
"anyhow", "anyhow",
"criterion", "criterion",
"dashmap", "dashmap",
"indexmap 2.1.0", "indexmap 2.2.6",
"once_cell", "once_cell",
"preset_env_base", "preset_env_base",
"pretty_assertions", "pretty_assertions",
@ -4629,7 +4574,7 @@ dependencies = [
"better_scoped_tls", "better_scoped_tls",
"bitflags 2.5.0", "bitflags 2.5.0",
"criterion", "criterion",
"indexmap 2.1.0", "indexmap 2.2.6",
"once_cell", "once_cell",
"phf", "phf",
"rayon", "rayon",
@ -4666,7 +4611,7 @@ name = "swc_ecma_transforms_compat"
version = "0.166.1" version = "0.166.1"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"indexmap 2.1.0", "indexmap 2.2.6",
"is-macro", "is-macro",
"num-bigint", "num-bigint",
"rayon", "rayon",
@ -4717,7 +4662,7 @@ dependencies = [
"Inflector", "Inflector",
"anyhow", "anyhow",
"bitflags 2.5.0", "bitflags 2.5.0",
"indexmap 2.1.0", "indexmap 2.2.6",
"is-macro", "is-macro",
"path-clean 0.1.0", "path-clean 0.1.0",
"pathdiff", "pathdiff",
@ -4744,7 +4689,7 @@ name = "swc_ecma_transforms_optimization"
version = "0.201.1" version = "0.201.1"
dependencies = [ dependencies = [
"dashmap", "dashmap",
"indexmap 2.1.0", "indexmap 2.2.6",
"once_cell", "once_cell",
"petgraph", "petgraph",
"rayon", "rayon",
@ -4800,7 +4745,7 @@ version = "0.186.2"
dependencies = [ dependencies = [
"base64", "base64",
"dashmap", "dashmap",
"indexmap 2.1.0", "indexmap 2.2.6",
"once_cell", "once_cell",
"rayon", "rayon",
"serde", "serde",
@ -4872,7 +4817,7 @@ dependencies = [
name = "swc_ecma_usage_analyzer" name = "swc_ecma_usage_analyzer"
version = "0.26.0" version = "0.26.0"
dependencies = [ dependencies = [
"indexmap 2.1.0", "indexmap 2.2.6",
"rustc-hash", "rustc-hash",
"swc_atoms", "swc_atoms",
"swc_common", "swc_common",
@ -4887,7 +4832,7 @@ dependencies = [
name = "swc_ecma_utils" name = "swc_ecma_utils"
version = "0.130.1" version = "0.130.1"
dependencies = [ dependencies = [
"indexmap 2.1.0", "indexmap 2.2.6",
"num_cpus", "num_cpus",
"once_cell", "once_cell",
"rayon", "rayon",
@ -4993,7 +4938,7 @@ dependencies = [
name = "swc_fast_graph" name = "swc_fast_graph"
version = "0.22.0" version = "0.22.0"
dependencies = [ dependencies = [
"indexmap 2.1.0", "indexmap 2.2.6",
"petgraph", "petgraph",
"rustc-hash", "rustc-hash",
"swc_common", "swc_common",
@ -5793,7 +5738,7 @@ version = "0.19.15"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
dependencies = [ dependencies = [
"indexmap 2.1.0", "indexmap 2.2.6",
"serde", "serde",
"serde_spanned", "serde_spanned",
"toml_datetime", "toml_datetime",
@ -5806,7 +5751,7 @@ version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03"
dependencies = [ dependencies = [
"indexmap 2.1.0", "indexmap 2.2.6",
"serde", "serde",
"serde_spanned", "serde_spanned",
"toml_datetime", "toml_datetime",
@ -6453,7 +6398,7 @@ checksum = "d21472954ee9443235ca32522b17fc8f0fe58e2174556266a0d9766db055cc52"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"derive_builder", "derive_builder",
"indexmap 2.1.0", "indexmap 2.2.6",
"semver 1.0.21", "semver 1.0.21",
"serde", "serde",
"serde_cbor", "serde_cbor",

View File

@ -49,9 +49,9 @@ resolver = "2"
backtrace = "0.3.61" backtrace = "0.3.61"
base64 = "0.21.0" base64 = "0.21.0"
bitflags = "2.5.0" bitflags = "2.5.0"
browserslist-rs = "0.15.0" browserslist-rs = "0.16.0"
cfg-if = "1.0.0" cfg-if = "1.0.0"
chrono = "0.4.31" chrono = "0.4.38"
console_error_panic_hook = "0.1.7" console_error_panic_hook = "0.1.7"
copyless = "0.1.5" copyless = "0.1.5"
crc = "2.1.0" crc = "2.1.0"

80
bindings/Cargo.lock generated
View File

@ -428,14 +428,14 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]] [[package]]
name = "chrono" name = "chrono"
version = "0.4.31" version = "0.4.38"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
dependencies = [ dependencies = [
"android-tzdata", "android-tzdata",
"iana-time-zone", "iana-time-zone",
"num-traits", "num-traits",
"windows-targets", "windows-targets 0.52.5",
] ]
[[package]] [[package]]
@ -1987,7 +1987,7 @@ dependencies = [
"libc", "libc",
"redox_syscall 0.4.1", "redox_syscall 0.4.1",
"smallvec", "smallvec",
"windows-targets", "windows-targets 0.48.0",
] ]
[[package]] [[package]]
@ -5259,7 +5259,7 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
dependencies = [ dependencies = [
"windows-targets", "windows-targets 0.48.0",
] ]
[[package]] [[package]]
@ -5281,7 +5281,7 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
dependencies = [ dependencies = [
"windows-targets", "windows-targets 0.48.0",
] ]
[[package]] [[package]]
@ -5290,21 +5290,43 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5"
dependencies = [ dependencies = [
"windows_aarch64_gnullvm", "windows_aarch64_gnullvm 0.48.0",
"windows_aarch64_msvc 0.48.0", "windows_aarch64_msvc 0.48.0",
"windows_i686_gnu 0.48.0", "windows_i686_gnu 0.48.0",
"windows_i686_msvc 0.48.0", "windows_i686_msvc 0.48.0",
"windows_x86_64_gnu 0.48.0", "windows_x86_64_gnu 0.48.0",
"windows_x86_64_gnullvm", "windows_x86_64_gnullvm 0.48.0",
"windows_x86_64_msvc 0.48.0", "windows_x86_64_msvc 0.48.0",
] ]
[[package]]
name = "windows-targets"
version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb"
dependencies = [
"windows_aarch64_gnullvm 0.52.5",
"windows_aarch64_msvc 0.52.5",
"windows_i686_gnu 0.52.5",
"windows_i686_gnullvm",
"windows_i686_msvc 0.52.5",
"windows_x86_64_gnu 0.52.5",
"windows_x86_64_gnullvm 0.52.5",
"windows_x86_64_msvc 0.52.5",
]
[[package]] [[package]]
name = "windows_aarch64_gnullvm" name = "windows_aarch64_gnullvm"
version = "0.48.0" version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263"
[[package]] [[package]]
name = "windows_aarch64_msvc" name = "windows_aarch64_msvc"
version = "0.33.0" version = "0.33.0"
@ -5317,6 +5339,12 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6"
[[package]] [[package]]
name = "windows_i686_gnu" name = "windows_i686_gnu"
version = "0.33.0" version = "0.33.0"
@ -5329,6 +5357,18 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
[[package]]
name = "windows_i686_gnu"
version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9"
[[package]] [[package]]
name = "windows_i686_msvc" name = "windows_i686_msvc"
version = "0.33.0" version = "0.33.0"
@ -5341,6 +5381,12 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
[[package]]
name = "windows_i686_msvc"
version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf"
[[package]] [[package]]
name = "windows_x86_64_gnu" name = "windows_x86_64_gnu"
version = "0.33.0" version = "0.33.0"
@ -5353,12 +5399,24 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9"
[[package]] [[package]]
name = "windows_x86_64_gnullvm" name = "windows_x86_64_gnullvm"
version = "0.48.0" version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596"
[[package]] [[package]]
name = "windows_x86_64_msvc" name = "windows_x86_64_msvc"
version = "0.33.0" version = "0.33.0"
@ -5371,6 +5429,12 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0"
[[package]] [[package]]
name = "winnow" name = "winnow"
version = "0.5.40" version = "0.5.40"

View File

@ -54,9 +54,11 @@ impl Query {
{ {
let distribs = browserslist::resolve( let distribs = browserslist::resolve(
s, s,
browserslist::Opts::new() &browserslist::Opts {
.mobile_to_desktop(true) mobile_to_desktop: true,
.ignore_unknown_versions(true), ignore_unknown_versions: true,
..Default::default()
},
) )
.with_context(|| { .with_context(|| {
format!( format!(

View File

@ -5,11 +5,15 @@ import * as React from "react";
import * as S from "./BetButton.styled"; import * as S from "./BetButton.styled";
let _BetButtonWrapper; let _BetButtonWrapper;
class BetButtonWrapper extends (_React_Component = React.Component) { class BetButtonWrapper extends (_React_Component = React.Component) {
static #_ = { c: [_BetButtonWrapper, _initClass] } = _apply_decs_2203_r(this, [], [ static{
observer ({ c: [_BetButtonWrapper, _initClass] } = _apply_decs_2203_r(this, [], [
], _React_Component); observer
], _React_Component));
}
render() { render() {
return /*#__PURE__*/ React.createElement(S.BetButtonWrapper, null); return /*#__PURE__*/ React.createElement(S.BetButtonWrapper, null);
} }
static #_2 = _initClass(); static{
_initClass();
}
} }

View File

@ -16,7 +16,7 @@ swc_v1 = []
[dependencies] [dependencies]
anyhow = "1.0.66" anyhow = "1.0.66"
browserslist-rs = { version = "0.13.0", features = ["wasm_bindgen"] } browserslist-rs = { version = "0.16.0", features = ["wasm_bindgen"] }
serde = { version = "1", features = ["derive"] } serde = { version = "1", features = ["derive"] }
serde-wasm-bindgen = "0.4.5" serde-wasm-bindgen = "0.4.5"
swc_core = { path = "../../../../swc_core", features = [ swc_core = { path = "../../../../swc_core", features = [

View File

@ -1,12 +1,6 @@
input[type=file]::-webkit-file-upload-button {
border: 2px solid #6c5ce7;
}
input[type=file]::file-selector-button { input[type=file]::file-selector-button {
border: 2px solid #6c5ce7; border: 2px solid #6c5ce7;
} }
input[type=file]::-webkit-file-upload-button:hover {
border: 2px solid #00cec9;
}
input[type=file]::file-selector-button:hover { input[type=file]::file-selector-button:hover {
border: 2px solid #00cec9; border: 2px solid #00cec9;
} }

View File

@ -5,13 +5,6 @@
.b, .b,
.c::selection, .c::selection,
.d:read-only, .d:read-only,
.e::-webkit-input-placeholder {
color: yellow;
}
.a,
.b,
.c::selection,
.d:read-only,
.e::placeholder { .e::placeholder {
color: yellow; color: yellow;
} }

View File

@ -20,17 +20,11 @@
} }
} }
.test { .test {
&.class::-webkit-input-placeholder {
color: red;
}
&.class::placeholder { &.class::placeholder {
color: red; color: red;
} }
} }
.test { .test {
&.class::-webkit-input-placeholder {
appearance: auto;
}
&.class::placeholder { &.class::placeholder {
appearance: auto; appearance: auto;
} }
@ -59,9 +53,6 @@
} }
.test { .test {
appearance: auto; appearance: auto;
&.class::-webkit-input-placeholder {
appearance: auto;
}
&.class::placeholder { &.class::placeholder {
appearance: auto; appearance: auto;
} }
@ -71,9 +62,6 @@
} }
@media (orientation: landscape) { @media (orientation: landscape) {
.test { .test {
&.class::-webkit-input-placeholder {
appearance: auto;
}
&.class::placeholder { &.class::placeholder {
appearance: auto; appearance: auto;
} }

View File

@ -1,10 +1,7 @@
input::-webkit-input-placeholder {
color: red;
}
input::placeholder { input::placeholder {
color: red; color: red;
} }
input::-webkit-input-placeholder, input::placeholder,
#fs-toggle:-webkit-full-screen { #fs-toggle:-webkit-full-screen {
color: red; color: red;
} }
@ -12,17 +9,10 @@ input::placeholder,
#fs-toggle:fullscreen { #fs-toggle:fullscreen {
color: red; color: red;
} }
input::-webkit-input-placeholder {
-webkit-backdrop-filter: blur(2px);
backdrop-filter: blur(2px);
}
input::placeholder { input::placeholder {
-webkit-backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
backdrop-filter: blur(2px); backdrop-filter: blur(2px);
} }
input.appearance::-webkit-input-placeholder {
appearance: none;
}
input.appearance::placeholder { input.appearance::placeholder {
appearance: none; appearance: none;
} }

View File

@ -42,9 +42,6 @@
color: red; color: red;
} }
} }
::-webkit-input-placeholder {
color: gray;
}
::placeholder { ::placeholder {
color: gray; color: gray;
} }

View File

@ -107,6 +107,18 @@
"opera_mobile": "64", "opera_mobile": "64",
"electron": "13.0" "electron": "13.0"
}, },
"bugfix/transform-firefox-class-in-computed-class-key": {
"chrome": "74",
"opera": "62",
"edge": "79",
"safari": "14.1",
"node": "12",
"deno": "1",
"ios": "14.5",
"samsung": "11",
"opera_mobile": "53",
"electron": "6.0"
},
"transform-optional-chaining": { "transform-optional-chaining": {
"chrome": "80", "chrome": "80",
"opera": "67", "opera": "67",

View File

@ -4,12 +4,38 @@
"opera": "98", "opera": "98",
"edge": "112", "edge": "112",
"firefox": "116", "firefox": "116",
"safari": "tp", "safari": "17",
"node": "20", "node": "20",
"deno": "1.32", "deno": "1.32",
"ios": "17",
"opera_mobile": "75", "opera_mobile": "75",
"electron": "24.0" "electron": "24.0"
}, },
"bugfix/transform-v8-static-class-fields-redefine-readonly": {
"chrome": "98",
"opera": "84",
"edge": "98",
"firefox": "95",
"safari": "15",
"node": "12",
"deno": "1.18",
"ios": "15",
"samsung": "11",
"opera_mobile": "52",
"electron": "17.0"
},
"bugfix/transform-firefox-class-in-computed-class-key": {
"chrome": "74",
"opera": "62",
"edge": "79",
"safari": "14.1",
"node": "12",
"deno": "1",
"ios": "14.5",
"samsung": "11",
"opera_mobile": "53",
"electron": "6.0"
},
"transform-class-static-block": { "transform-class-static-block": {
"chrome": "94", "chrome": "94",
"opera": "80", "opera": "80",
@ -349,6 +375,7 @@
"deno": "1", "deno": "1",
"ios": "11.3", "ios": "11.3",
"samsung": "8", "samsung": "8",
"rhino": "1.7.15",
"opera_mobile": "46", "opera_mobile": "46",
"electron": "3.0" "electron": "3.0"
}, },
@ -441,6 +468,7 @@
"deno": "1", "deno": "1",
"ios": "9", "ios": "9",
"samsung": "4", "samsung": "4",
"rhino": "1.7.15",
"opera_mobile": "32", "opera_mobile": "32",
"electron": "0.30" "electron": "0.30"
}, },
@ -574,6 +602,7 @@
"deno": "1", "deno": "1",
"ios": "10", "ios": "10",
"samsung": "5", "samsung": "5",
"rhino": "1.7.15",
"opera_mobile": "36", "opera_mobile": "36",
"electron": "0.37" "electron": "0.37"
}, },
@ -587,6 +616,7 @@
"deno": "1", "deno": "1",
"ios": "9", "ios": "9",
"samsung": "4", "samsung": "4",
"rhino": "1.7.15",
"opera_mobile": "32", "opera_mobile": "32",
"electron": "0.30" "electron": "0.30"
}, },

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -514,5 +514,31 @@
], ],
"3.33": [ "3.33": [
"esnext.regexp.escape" "esnext.regexp.escape"
],
"3.34": [
"es.map.group-by",
"es.object.group-by",
"es.promise.with-resolvers",
"esnext.uint8-array.from-base64",
"esnext.uint8-array.from-hex",
"esnext.uint8-array.to-base64",
"esnext.uint8-array.to-hex"
],
"3.36": [
"es.array-buffer.detached",
"es.array-buffer.transfer",
"es.array-buffer.transfer-to-fixed-length"
],
"3.37": [
"es.set.difference.v2",
"es.set.intersection.v2",
"es.set.is-disjoint-from.v2",
"es.set.is-subset-of.v2",
"es.set.is-superset-of.v2",
"es.set.symmetric-difference.v2",
"es.set.union.v2",
"esnext.math.sum-precise",
"esnext.symbol.custom-matcher",
"web.url.parse"
] ]
} }

View File

@ -189,6 +189,12 @@ pub enum Feature {
/// `bugfix/transform-v8-spread-parameters-in-optional-chaining` /// `bugfix/transform-v8-spread-parameters-in-optional-chaining`
BugfixTransformV8SpreadParametersInOptionalChaining, // TODO BugfixTransformV8SpreadParametersInOptionalChaining, // TODO
/// `bugfix/transform-v8-static-class-fields-redefine-readonly`
BugfixTransformV8StaticClassFieldsRedefineReadonly, // TODO
/// `bugfix/transform-firefox-class-in-computed-class-key`
BugfixTransformFirefoxClassInComputedClassKey, // TODO
} }
pub(crate) static FEATURES: Lazy<AHashMap<Feature, BrowserData<Option<Version>>>> = pub(crate) static FEATURES: Lazy<AHashMap<Feature, BrowserData<Option<Version>>>> =

View File

@ -974,7 +974,7 @@ impl Fixer<'_> {
let span = e.span(); let span = e.span();
let span = if let Some(span) = self.span_map.remove(&span) { let span = if let Some(span) = self.span_map.shift_remove(&span) {
span span
} else { } else {
span span

View File

@ -304,7 +304,7 @@ where
} else { } else {
exist1 exist1
}; };
let weight = self.edges.remove(&Self::edge_key(a, b)); let weight = self.edges.shift_remove(&Self::edge_key(a, b));
debug_assert!(exist1 == exist2 && exist1 == weight.is_some()); debug_assert!(exist1 == exist2 && exist1 == weight.is_some());
weight weight
} }

View File

@ -20,7 +20,7 @@
"test": "cd ./packages/core && yarn test" "test": "cd ./packages/core && yarn test"
}, },
"devDependencies": { "devDependencies": {
"@babel/compat-data": "^7.23.2", "@babel/compat-data": "^7.24.7",
"@babel/core": "^7.13.16", "@babel/core": "^7.13.16",
"@babel/generator": "^7.18.13", "@babel/generator": "^7.18.13",
"@babel/plugin-proposal-class-properties": "^7.13.0", "@babel/plugin-proposal-class-properties": "^7.13.0",
@ -44,7 +44,7 @@
"bootstrap": "^5.2.1", "bootstrap": "^5.2.1",
"class-validator": "^0.13.1", "class-validator": "^0.13.1",
"core-js": "^2.6.11", "core-js": "^2.6.11",
"core-js-compat": "^3.33.1", "core-js-compat": "^3.37.1",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"cspell": "^5.12.3", "cspell": "^5.12.3",
"expect": "^27.4.2", "expect": "^27.4.2",

View File

@ -138,7 +138,7 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@babel/compat-data@npm:^7.17.7, @babel/compat-data@npm:^7.20.5, @babel/compat-data@npm:^7.22.0, @babel/compat-data@npm:^7.22.3, @babel/compat-data@npm:^7.23.2": "@babel/compat-data@npm:^7.17.7, @babel/compat-data@npm:^7.20.5, @babel/compat-data@npm:^7.22.0, @babel/compat-data@npm:^7.22.3":
version: 7.23.2 version: 7.23.2
resolution: "@babel/compat-data@npm:7.23.2" resolution: "@babel/compat-data@npm:7.23.2"
checksum: c18eccd13975c1434a65d04f721075e30d03ba1608f4872d84e8538c16552b878aaac804ff31243d8c2c0e91524f3bc98de6305e117ba1a55c9956871973b4dc checksum: c18eccd13975c1434a65d04f721075e30d03ba1608f4872d84e8538c16552b878aaac804ff31243d8c2c0e91524f3bc98de6305e117ba1a55c9956871973b4dc
@ -152,6 +152,13 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@babel/compat-data@npm:^7.24.7":
version: 7.24.7
resolution: "@babel/compat-data@npm:7.24.7"
checksum: 6edc09152ca51a22c33741c441f33f9475598fa59edc53369edb74b49f4ea4bef1281f5b0ed2b9b67fb66faef2da2069e21c4eef83405d8326e524b301f4e7e2
languageName: node
linkType: hard
"@babel/core@npm:^7.1.0, @babel/core@npm:^7.7.5": "@babel/core@npm:^7.1.0, @babel/core@npm:^7.7.5":
version: 7.24.6 version: 7.24.6
resolution: "@babel/core@npm:7.24.6" resolution: "@babel/core@npm:7.24.6"
@ -4725,7 +4732,7 @@ __metadata:
version: 0.0.0-use.local version: 0.0.0-use.local
resolution: "@swc/workspace@workspace:." resolution: "@swc/workspace@workspace:."
dependencies: dependencies:
"@babel/compat-data": "npm:^7.23.2" "@babel/compat-data": "npm:^7.24.7"
"@babel/core": "npm:^7.13.16" "@babel/core": "npm:^7.13.16"
"@babel/generator": "npm:^7.18.13" "@babel/generator": "npm:^7.18.13"
"@babel/plugin-proposal-class-properties": "npm:^7.13.0" "@babel/plugin-proposal-class-properties": "npm:^7.13.0"
@ -4749,7 +4756,7 @@ __metadata:
bootstrap: "npm:^5.2.1" bootstrap: "npm:^5.2.1"
class-validator: "npm:^0.13.1" class-validator: "npm:^0.13.1"
core-js: "npm:^2.6.11" core-js: "npm:^2.6.11"
core-js-compat: "npm:^3.33.1" core-js-compat: "npm:^3.37.1"
cross-env: "npm:^7.0.3" cross-env: "npm:^7.0.3"
cspell: "npm:^5.12.3" cspell: "npm:^5.12.3"
expect: "npm:^27.4.2" expect: "npm:^27.4.2"
@ -6594,6 +6601,20 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"browserslist@npm:^4.23.0":
version: 4.23.1
resolution: "browserslist@npm:4.23.1"
dependencies:
caniuse-lite: "npm:^1.0.30001629"
electron-to-chromium: "npm:^1.4.796"
node-releases: "npm:^2.0.14"
update-browserslist-db: "npm:^1.0.16"
bin:
browserslist: cli.js
checksum: 91da59f70a8e01ece97133670f9857d6d7e96be78e1b7ffa54b869f97d01d01c237612471b595cee41c1ab212e26e536ce0b6716ad1d6c4368a40c222698cac1
languageName: node
linkType: hard
"bser@npm:2.1.1": "bser@npm:2.1.1":
version: 2.1.1 version: 2.1.1
resolution: "bser@npm:2.1.1" resolution: "bser@npm:2.1.1"
@ -6824,6 +6845,13 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"caniuse-lite@npm:^1.0.30001629":
version: 1.0.30001639
resolution: "caniuse-lite@npm:1.0.30001639"
checksum: c163080e08982de60b37d51130f088e9f8a745533621675694f0b079f53529308168adb0966051139ff71c75af439b2ce150b7142cff15aac421cbfd126bd481
languageName: node
linkType: hard
"capture-exit@npm:^2.0.0": "capture-exit@npm:^2.0.0":
version: 2.0.0 version: 2.0.0
resolution: "capture-exit@npm:2.0.0" resolution: "capture-exit@npm:2.0.0"
@ -7465,7 +7493,7 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"core-js-compat@npm:^3.30.1, core-js-compat@npm:^3.30.2, core-js-compat@npm:^3.33.1": "core-js-compat@npm:^3.30.1, core-js-compat@npm:^3.30.2":
version: 3.33.1 version: 3.33.1
resolution: "core-js-compat@npm:3.33.1" resolution: "core-js-compat@npm:3.33.1"
dependencies: dependencies:
@ -7474,6 +7502,15 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"core-js-compat@npm:^3.37.1":
version: 3.37.1
resolution: "core-js-compat@npm:3.37.1"
dependencies:
browserslist: "npm:^4.23.0"
checksum: 30c6fdbd9ff179cc53951814689b8aabec106e5de6cddfa7a7feacc96b66d415b8eebcf5ec8f7c68ef35c552fe7d39edb8b15b1ce0f27379a272295b6e937061
languageName: node
linkType: hard
"core-js@npm:^2.6.11": "core-js@npm:^2.6.11":
version: 2.6.12 version: 2.6.12
resolution: "core-js@npm:2.6.12" resolution: "core-js@npm:2.6.12"
@ -8268,6 +8305,13 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"electron-to-chromium@npm:^1.4.796":
version: 1.4.815
resolution: "electron-to-chromium@npm:1.4.815"
checksum: 84f59b76b1ac16fe1f359720bdaeadcbce34825a7e79e3551ceec6b52d4021e7bd8a56a2cfa4197ba353331df18d0bc2ab449e08c5599eb1b2a7aacaba56f711
languageName: node
linkType: hard
"elliptic@npm:^6.5.3, elliptic@npm:^6.5.5": "elliptic@npm:^6.5.3, elliptic@npm:^6.5.5":
version: 6.5.5 version: 6.5.5
resolution: "elliptic@npm:6.5.5" resolution: "elliptic@npm:6.5.5"
@ -8578,6 +8622,13 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"escalade@npm:^3.1.2":
version: 3.1.2
resolution: "escalade@npm:3.1.2"
checksum: a1e07fea2f15663c30e40b9193d658397846ffe28ce0a3e4da0d8e485fedfeca228ab846aee101a05015829adf39f9934ff45b2a3fca47bed37a29646bd05cd3
languageName: node
linkType: hard
"escape-html@npm:~1.0.3": "escape-html@npm:~1.0.3":
version: 1.0.3 version: 1.0.3
resolution: "escape-html@npm:1.0.3" resolution: "escape-html@npm:1.0.3"
@ -14242,6 +14293,13 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"picocolors@npm:^1.0.1":
version: 1.0.1
resolution: "picocolors@npm:1.0.1"
checksum: fa68166d1f56009fc02a34cdfd112b0dd3cf1ef57667ac57281f714065558c01828cdf4f18600ad6851cbe0093952ed0660b1e0156bddf2184b6aaf5817553a5
languageName: node
linkType: hard
"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": "picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1":
version: 2.3.1 version: 2.3.1
resolution: "picomatch@npm:2.3.1" resolution: "picomatch@npm:2.3.1"
@ -17117,6 +17175,20 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"update-browserslist-db@npm:^1.0.16":
version: 1.0.16
resolution: "update-browserslist-db@npm:1.0.16"
dependencies:
escalade: "npm:^3.1.2"
picocolors: "npm:^1.0.1"
peerDependencies:
browserslist: ">= 4.21.0"
bin:
update-browserslist-db: cli.js
checksum: 071bf0b2fb8568db6cd42ee2598ac9b87c794a7229fcbf1b035ae7f883e770c07143f16a5371525d5bcb94b99f9a1b279036142b0195ffd4cf5a0008fc4a500e
languageName: node
linkType: hard
"uri-js@npm:^4.2.2": "uri-js@npm:^4.2.2":
version: 4.4.1 version: 4.4.1
resolution: "uri-js@npm:4.4.1" resolution: "uri-js@npm:4.4.1"