From 0947e67c83c8ee927c22a1943a776d3ab462fa98 Mon Sep 17 00:00:00 2001 From: Fy <1114550440@qq.com> Date: Fri, 15 Mar 2024 13:36:38 +0800 Subject: [PATCH] chore: bump swc_core (#200) --- .changeset/serious-shrimps-sneeze.md | 7 + Cargo.lock | 1090 +++++++++-------- Cargo.toml | 2 +- .../issue-106/expected-wrap.js | 2 +- crates/plugin_config_routes/src/lib.rs | 7 +- crates/plugin_import/src/lib.rs | 6 +- crates/plugin_lodash/src/lib.rs | 24 +- .../src/immutable.rs | 49 +- crates/plugin_react_utils/src/import_react.rs | 5 +- .../src/remove_prop_types.rs | 23 +- .../plugin_remove_es_module_mark/src/lib.rs | 17 +- crates/plugin_ssr_loader_id/src/lib.rs | 95 +- crates/swc_plugins_collection/Cargo.toml | 8 +- crates/swc_plugins_collection/src/pass.rs | 2 + crates/swc_plugins_core/src/transform.rs | 2 +- crates/swc_plugins_utils/src/lib.rs | 146 ++- packages/Cargo.lock | 127 +- packages/Cargo.toml | 2 +- packages/rust-toolchain | 2 +- rust-toolchain | 2 +- 20 files changed, 868 insertions(+), 750 deletions(-) create mode 100644 .changeset/serious-shrimps-sneeze.md diff --git a/.changeset/serious-shrimps-sneeze.md b/.changeset/serious-shrimps-sneeze.md new file mode 100644 index 0000000..de96395 --- /dev/null +++ b/.changeset/serious-shrimps-sneeze.md @@ -0,0 +1,7 @@ +--- +"@modern-js/swc-plugins": patch +"@modern-js/swc-plugin-import": patch +"@modern-js/swc-react-const-elements-plugin": patch +--- + +chore: bump swc_core diff --git a/Cargo.lock b/Cargo.lock index 130f22c..1eb1371 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -40,9 +40,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.6" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "getrandom", @@ -111,11 +111,10 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "ast_node" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c09c69dffe06d222d072c878c3afe86eee2179806f20503faec97250268b4c24" +checksum = "c3e3e06ec6ac7d893a0db7127d91063ad7d9da8988f8a1a256f03729e6eec026" dependencies = [ - "pmutil", "proc-macro2", "quote", "swc_macros_common", @@ -186,12 +185,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base-x" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" - [[package]] name = "base64" version = "0.13.1" @@ -239,9 +232,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "bitvec" @@ -280,15 +273,16 @@ dependencies = [ [[package]] name = "browserslist-rs" -version = "0.13.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33066f72a558361eeb1077b0aff0f1dce1ac75bdc20b38a642f155f767b2824" +checksum = "405bbd46590a441abe5db3e5c8af005aa42e640803fecb51912703e93e4ce8d3" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.11", "anyhow", "chrono", "either", - "itertools", + "indexmap 2.2.5", + "itertools 0.12.0", "nom", "once_cell", "quote", @@ -391,15 +385,14 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", - "time 0.1.45", - "winapi", + "windows-targets 0.48.1", ] [[package]] @@ -445,12 +438,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "const_fn" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" - [[package]] name = "constant_time_eq" version = "0.3.0" @@ -634,19 +621,25 @@ dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset 0.9.0", + "memoffset", "scopeguard", ] [[package]] -name = "crossbeam-utils" -version = "0.8.16" +name = "crossbeam-queue" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ - "cfg-if", + "crossbeam-utils", ] +[[package]] +name = "crossbeam-utils" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" + [[package]] name = "crypto-common" version = "0.1.6" @@ -705,14 +698,38 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63b7ef7a4be509357f4804d0a22e830daddb48f19fd604e4ad32ddce04a94c36" +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + [[package]] name = "darling" version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.20.3", + "darling_macro 0.20.3", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 1.0.109", ] [[package]] @@ -728,13 +745,24 @@ dependencies = [ "syn 2.0.32", ] +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core 0.14.4", + "quote", + "syn 1.0.109", +] + [[package]] name = "darling_macro" version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ - "darling_core", + "darling_core 0.20.3", "quote", "syn 2.0.32", ] @@ -746,7 +774,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6943ae99c34386c84a470c499d3414f66502a41340aa895406e0d2e4a207b91d" dependencies = [ "cfg-if", - "hashbrown 0.14.0", + "hashbrown 0.14.3", "lock_api", "once_cell", "parking_lot_core", @@ -777,6 +805,15 @@ dependencies = [ "uuid", ] +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + [[package]] name = "derivative" version = "2.2.0" @@ -788,6 +825,37 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_builder" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" +dependencies = [ + "darling 0.14.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_builder_macro" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" +dependencies = [ + "derive_builder_core", + "syn 1.0.109", +] + [[package]] name = "diff" version = "0.1.13" @@ -811,32 +879,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "dirs" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] -name = "discard" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" - [[package]] name = "dtoa" version = "1.0.9" @@ -858,12 +900,6 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" -[[package]] -name = "easy-error" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cc9717c61d2908f50d16ebb5677c7e82ea2bdf7cb52f66b30fe079f3212e16" - [[package]] name = "either" version = "1.9.0" @@ -911,7 +947,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08b6c6ab82d70f08844964ba10c7babb716de2ecaeab9be5717918a5177d3af" dependencies = [ - "darling", + "darling 0.20.3", "proc-macro2", "quote", "syn 2.0.32", @@ -964,7 +1000,7 @@ checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", + "redox_syscall", "windows-sys 0.48.0", ] @@ -1001,11 +1037,10 @@ dependencies = [ [[package]] name = "from_variant" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03ec5dc38ee19078d84a692b1c41181ff9f94331c76cee66ff0208c770b5e54f" +checksum = "3a0b11eeb173ce52f84ebd943d42e58813a2ebb78a6a3ff0a243b71c5199cd7b" dependencies = [ - "pmutil", "proc-macro2", "swc_macros_common", "syn 2.0.32", @@ -1140,7 +1175,7 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "wasm-bindgen", ] @@ -1211,14 +1246,14 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.11", ] [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "heapless" @@ -1357,12 +1392,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.3", "rayon", "serde", ] @@ -1422,6 +1457,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.9" @@ -1542,9 +1586,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.147" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libloading" @@ -1563,13 +1607,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2999490cc10a59ad8a87d731791a5d438d2d025e3f137aa7d4c23e1827985b0" dependencies = [ "ahash 0.7.6", - "bitflags 2.3.3", + "bitflags 2.4.2", "const-str", "cssparser", "cssparser-color", "dashmap", "data-encoding", - "itertools", + "itertools 0.10.5", "lazy_static", "lightningcss-derive", "parcel_selectors", @@ -1639,6 +1683,15 @@ dependencies = [ "hashbrown 0.13.2", ] +[[package]] +name = "lz4_flex" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "912b45c753ff5f7f5208307e8ace7d2a2e30d024e26d3509f3dce546c044ce15" +dependencies = [ + "twox-hash", +] + [[package]] name = "mach" version = "0.3.2" @@ -1693,15 +1746,6 @@ dependencies = [ "libc", ] -[[package]] -name = "memoffset" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" -dependencies = [ - "autocfg", -] - [[package]] name = "memoffset" version = "0.9.0" @@ -1757,6 +1801,18 @@ dependencies = [ "adler", ] +[[package]] +name = "mio" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +dependencies = [ + "libc", + "log", + "wasi", + "windows-sys 0.48.0", +] + [[package]] name = "modern_swc_binding" version = "0.1.0" @@ -1775,15 +1831,16 @@ dependencies = [ [[package]] name = "modularize_imports" -version = "0.62.0" +version = "0.68.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4559444eabc75096e7655a1a0bbd4a5b7f00e22e58fa860d2273e1ea48999f08" +checksum = "ca835b60f32cd43b7bcd21ba77563bee0c08f336700463e03eb086d15e46608a" dependencies = [ "convert_case 0.5.0", "handlebars", "once_cell", "regex", "serde", + "swc_atoms", "swc_cached", "swc_common", "swc_ecma_ast", @@ -1802,7 +1859,7 @@ version = "2.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78e1f965758ed9f6b31b07c38e18ec9b6b9fcae56dd88a0812650bb6c8f35590" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.2", "ctor", "napi-derive", "napi-sys", @@ -1920,6 +1977,12 @@ dependencies = [ "serde", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-integer" version = "0.1.45" @@ -1981,9 +2044,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "outref" @@ -2009,7 +2072,7 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05d74befe2d076330d9a58bf9ca2da424568724ab278adf15fb5718253133887" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.2", "cssparser", "fxhash", "log", @@ -2052,7 +2115,7 @@ checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", + "redox_syscall", "smallvec", "windows-targets 0.48.1", ] @@ -2261,9 +2324,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.10" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -2327,6 +2390,12 @@ dependencies = [ "syn 2.0.32", ] +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2341,11 +2410,11 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "preset_env_base" -version = "0.4.8" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "008ae5e91d877e168b73c17bed2e4dc7553cd7cc237a776d9479eab6642352c5" +checksum = "1d99dc6ba4753f07bfbc4dbf3137618d31af2611fcaced7237647075ca687eaa" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.11", "anyhow", "browserslist-rs", "dashmap", @@ -2374,7 +2443,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit", + "toml_edit 0.19.14", ] [[package]] @@ -2401,12 +2470,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - [[package]] name = "proc-macro2" version = "1.0.66" @@ -2529,15 +2592,6 @@ dependencies = [ "num_cpus", ] -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.3.5" @@ -2547,17 +2601,6 @@ dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "redox_users" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" -dependencies = [ - "getrandom", - "redox_syscall 0.2.16", - "thiserror", -] - [[package]] name = "regalloc2" version = "0.5.1" @@ -2712,7 +2755,7 @@ version = "0.38.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "172891ebdceb05aa0005f533a6cbfca599ddd7d966f6f5d4d9b2e70478e70399" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.2", "errno", "libc", "linux-raw-sys", @@ -2725,6 +2768,19 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +[[package]] +name = "rusty_pool" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ed36cdb20de66d89a17ea04b8883fc7a386f2cf877aaedca5005583ce4876ff" +dependencies = [ + "crossbeam-channel", + "futures", + "futures-channel", + "futures-executor", + "num_cpus", +] + [[package]] name = "ryu" version = "1.0.15" @@ -2764,6 +2820,12 @@ version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" +[[package]] +name = "self_cell" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58bf37232d3bb9a2c4e641ca2a11d83b5062066f88df7fed36c28772046d65ba" + [[package]] name = "semver" version = "0.9.0" @@ -2835,7 +2897,7 @@ version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.2.5", "itoa", "ryu", "serde", @@ -2850,25 +2912,13 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_yaml" -version = "0.8.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" -dependencies = [ - "indexmap 1.9.3", - "ryu", - "serde", - "yaml-rust", -] - [[package]] name = "serde_yaml" version = "0.9.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.2.5", "itoa", "ryu", "serde", @@ -2886,26 +2936,11 @@ dependencies = [ "digest", ] -[[package]] -name = "sha1" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" -dependencies = [ - "sha1_smol", -] - -[[package]] -name = "sha1_smol" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" - [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -2923,23 +2958,14 @@ dependencies = [ [[package]] name = "shared-buffer" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cf61602ee61e2f83dd016b3e6387245291cf728ea071c378b35088125b4d995" +checksum = "f6c99835bad52957e7aa241d3975ed17c1e5f8c92026377d117a606f36b84b16" dependencies = [ "bytes", "memmap2 0.6.2", ] -[[package]] -name = "shellexpand" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ccc8076840c4da029af4f87e4e8daeb0fca6b87bbb02e10cb60b791450e11e4" -dependencies = [ - "dirs", -] - [[package]] name = "simd-abstraction" version = "0.7.1" @@ -3005,6 +3031,16 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f67ad224767faa3c7d8b6d91985b78e70a1324408abcb1cfcc2be4c06bc06043" +[[package]] +name = "socket2" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "sourcemap" version = "6.4.0" @@ -3059,15 +3095,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "standback" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" -dependencies = [ - "version_check", -] - [[package]] name = "static-map-macro" version = "0.3.0" @@ -3107,55 +3134,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "stdweb" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" -dependencies = [ - "discard", - "rustc_version 0.2.3", - "stdweb-derive", - "stdweb-internal-macros", - "stdweb-internal-runtime", - "wasm-bindgen", -] - -[[package]] -name = "stdweb-derive" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "serde_derive", - "syn 1.0.109", -] - -[[package]] -name = "stdweb-internal-macros" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" -dependencies = [ - "base-x", - "proc-macro2", - "quote", - "serde", - "serde_derive", - "serde_json", - "sha1", - "syn 1.0.109", -] - -[[package]] -name = "stdweb-internal-runtime" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" - [[package]] name = "string_cache" version = "0.8.7" @@ -3184,22 +3162,27 @@ dependencies = [ [[package]] name = "string_enum" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fa4d4f81d7c05b9161f8de839975d3326328b8ba2831164b465524cc2f55252" +checksum = "1b650ea2087d32854a0f20b837fc56ec987a1cb4f758c9757e1171ee9812da63" dependencies = [ - "pmutil", "proc-macro2", "quote", "swc_macros_common", "syn 2.0.32", ] +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + [[package]] name = "styled_components" -version = "0.90.0" +version = "0.96.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddb45c257489ad9439cd5c9ecc4b17b1b43dde147ec0c857393b10226948364b" +checksum = "b88be314a64500e2931dafab22e915dea4365fef357d04e26d6be4105b0a809c" dependencies = [ "Inflector", "once_cell", @@ -3215,11 +3198,11 @@ dependencies = [ [[package]] name = "styled_jsx" -version = "0.67.0" +version = "0.73.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e068120264b52af6da6766b840029394955f8eaf2b2ae7c535a35e4b5934aa" +checksum = "243182797daf80d4ebed2f8ea46c787ac0df5609d10bff5d634dace5375c49b0" dependencies = [ - "easy-error", + "anyhow", "lightningcss", "parcel_selectors", "preset_env_base", @@ -3276,15 +3259,15 @@ dependencies = [ [[package]] name = "swc" -version = "0.269.82" +version = "0.273.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a79022aa5c95bfe0d1479d6913d4d1032103888cf8bcbf3109a4e052101c87" +checksum = "271c22c41d6232166f69dd16264f44ab7217a5b3ee6c6c428991dae86e577c11" dependencies = [ "anyhow", "base64 0.21.2", "dashmap", "either", - "indexmap 2.0.0", + "indexmap 2.2.5", "jsonc-parser", "lru", "once_cell", @@ -3320,6 +3303,7 @@ dependencies = [ "swc_plugin_runner", "swc_timer", "swc_visit", + "tokio", "tracing", "url", ] @@ -3340,11 +3324,11 @@ dependencies = [ [[package]] name = "swc_cached" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b357b80879f6c4f4f34879d02eeae63aafc7730293e6eda3686f990d160486" +checksum = "630c761c74ac8021490b78578cc2223aa4a568241e26505c27bf0e4fd4ad8ec2" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.11", "anyhow", "dashmap", "once_cell", @@ -3354,11 +3338,11 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.33.10" +version = "0.33.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e9319d6d5df09497d920dbc51c937032ac6909a0df617998fe840c7bb8e74e0" +checksum = "cc30ce6695b841f0a9ae01a9ca10ac3922cff559a6253c756a203c4332c62945" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.11", "anyhow", "ast_node", "atty", @@ -3387,12 +3371,13 @@ dependencies = [ [[package]] name = "swc_compiler_base" -version = "0.3.84" +version = "0.7.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8903efca39d02023b75cd5f7cea4c5206faa97c6ad2673e2d5147cb86bfd6d98" +checksum = "da889eaa8f6d019f3b391eebfb395990a0b58b4f4e86f76689f2a14fd8de2239" dependencies = [ "anyhow", "base64 0.21.2", + "once_cell", "pathdiff", "serde", "sourcemap", @@ -3409,23 +3394,25 @@ dependencies = [ [[package]] name = "swc_config" -version = "0.1.8" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c820294225e8e7fe381cc34235d7f485b87a90d3bf6c0ebfd7b16ed100a6d4ee" +checksum = "ce837c5eae1cb200a310940de989fd9b3d12ed62d7752bc69b39ef8aa775ec04" dependencies = [ - "indexmap 2.0.0", + "anyhow", + "indexmap 2.2.5", "serde", "serde_json", + "sourcemap", + "swc_cached", "swc_config_macro", ] [[package]] name = "swc_config_macro" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5b5aaca9a0082be4515f0fbbecc191bf5829cd25b5b9c0a2810f6a2bb0d6829" +checksum = "8b2574f75082322a27d990116cd2a24de52945fc94172b24ca0b3e9e2a6ceb6b" dependencies = [ - "pmutil", "proc-macro2", "quote", "swc_macros_common", @@ -3434,9 +3421,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.86.94" +version = "0.90.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16275a7389398460fb73a33f50dd0ed74b8ce76143adf29a3c83dc24526310c1" +checksum = "8cd79fcc3d20ab7b74794d4155ac12639760e8ec96fed7413624db61f3185e62" dependencies = [ "swc", "swc_atoms", @@ -3462,9 +3449,9 @@ dependencies = [ [[package]] name = "swc_css_ast" -version = "0.140.11" +version = "0.140.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3f10a1d645e93d369aa6812e959ee7af0daa7d37db43aa5f51e2885f7234eb5" +checksum = "2f84c34fffb1b9dde1024ad6fa473ff4e1616cf8efc69600bbb83df0bcac2708" dependencies = [ "is-macro", "string_enum", @@ -3474,12 +3461,12 @@ dependencies = [ [[package]] name = "swc_css_codegen" -version = "0.151.19" +version = "0.151.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9173d0f8c4ca7cc00675e0934456962c15c90b5490aaa42befd48349bd99d37" +checksum = "44f59063897824aac5509c94f26f991b64f91c4cda3679aa6cb3acb421ca634c" dependencies = [ "auto_impl", - "bitflags 2.3.3", + "bitflags 2.4.2", "rustc-hash", "serde", "swc_atoms", @@ -3491,11 +3478,10 @@ dependencies = [ [[package]] name = "swc_css_codegen_macros" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da287376d8e9ab2e2c5a17fffd0c4701140433a8640ea52fa0c368e69dec565" +checksum = "0db1d634bcd2df2b694e2bf9320b8f808db3451e35d70e36252966b551a11ef4" dependencies = [ - "pmutil", "proc-macro2", "quote", "swc_macros_common", @@ -3504,9 +3490,9 @@ dependencies = [ [[package]] name = "swc_css_minifier" -version = "0.116.20" +version = "0.116.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d901a7160fa9eede08eff7e3b46b9d8caf834b4f4e8287ce9a333dc34c3e35ed" +checksum = "969b3211fc9fd19f291398bb7d742575f36468446d78b75dbb259cc87d81c434" dependencies = [ "serde", "swc_atoms", @@ -3518,9 +3504,9 @@ dependencies = [ [[package]] name = "swc_css_parser" -version = "0.150.18" +version = "0.150.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a344a1dcf93aa02ae3a23f0714db2412aa8261ba2b463a4db2d18a485e0a4711" +checksum = "bab1cb5c7711f052322b47a26a04d064a7dc2fba56839a9249f895618120970d" dependencies = [ "lexical", "serde", @@ -3531,9 +3517,9 @@ dependencies = [ [[package]] name = "swc_css_prefixer" -version = "0.153.21" +version = "0.153.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa088158bce78d122e92627169f4f05fa754a783d33a016c1ea817973886d450" +checksum = "fbc040a489255446c6cfbb506677f0ceee0b8241a6c2a6f0eaf6b460c8d19b8d" dependencies = [ "once_cell", "preset_env_base", @@ -3548,9 +3534,9 @@ dependencies = [ [[package]] name = "swc_css_utils" -version = "0.137.11" +version = "0.137.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "123b9556fad42a6cd19fe5979128a662bd4d3729008fb76e682f1ad9156336d2" +checksum = "516874bfd2cc1ddc9025d4049d1214127e5b2dcff7d02dcc80f54e359e34b675" dependencies = [ "once_cell", "serde", @@ -3563,9 +3549,9 @@ dependencies = [ [[package]] name = "swc_css_visit" -version = "0.139.11" +version = "0.139.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567abece2251b295a7479c8561d69e9a1bbce6613243f0622afe862204f655a4" +checksum = "d5930573480f409ee39ded5d109781ee68f084c92d1d3c90dc19e04f8988bdb9" dependencies = [ "serde", "swc_atoms", @@ -3576,11 +3562,11 @@ dependencies = [ [[package]] name = "swc_ecma_ast" -version = "0.110.12" +version = "0.112.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "203463d666ff3a310ead733b31772e052307bdf967c110ee795f6b12ea2f1c78" +checksum = "032f528398358da8ff2fe795755602b4a81ffc93430b9830c0e1d5f198d8f48d" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.2", "bytecheck", "is-macro", "num-bigint", @@ -3596,9 +3582,9 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.146.39" +version = "0.148.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5c22286f9b72c7243a5db35e8a88da41478686a367edb7b81336f0e5006607" +checksum = "03d469ef5ec86a90fb2fa3bff474847fc4d16fd98e34254b834aaf2484bfe472" dependencies = [ "memchr", "num-bigint", @@ -3615,11 +3601,10 @@ dependencies = [ [[package]] name = "swc_ecma_codegen_macros" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcdff076dccca6cc6a0e0b2a2c8acfb066014382bc6df98ec99e755484814384" +checksum = "394b8239424b339a12012ceb18726ed0244fce6bf6345053cb9320b2791dcaa5" dependencies = [ - "pmutil", "proc-macro2", "quote", "swc_macros_common", @@ -3628,9 +3613,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_bugfixes" -version = "0.1.54" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826618f333717d35ffa7133dff73fb33f27b59b47cd2a2a317a6deb80fb1a1c6" +checksum = "a1a491b350c33afc7b043f065f060dcfbfe112e40765b3253e03c33d86149fcc" dependencies = [ "swc_atoms", "swc_common", @@ -3645,9 +3630,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_common" -version = "0.1.33" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66982cf4756ea0b9f2d6ce8835103893976bb902857b1cd7266de0b260caf5ba" +checksum = "f30fd7f4e35d1a8e9edc495fdd843993103cf7b230bbd2ee960d402c5ca8e3c7" dependencies = [ "swc_common", "swc_ecma_ast", @@ -3658,12 +3643,12 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2015" -version = "0.1.54" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e045c102d7faea24d658540b641d3088aaba0009aa329e64253acb973abf751" +checksum = "34bd915d417c1dd95811ae7a16588969ccb598e65721f235781396aac158fb33" dependencies = [ "arrayvec", - "indexmap 2.0.0", + "indexmap 2.2.5", "is-macro", "serde", "serde_derive", @@ -3684,9 +3669,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2016" -version = "0.1.50" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb9711cab5412c7160bd76c456c11d06d066ad97d33d62d7128b4a55d53ea31b" +checksum = "63ca0be7e941e2c6cfcc66e1821d05511c7fa5bed01da2037ab65c0aa3a508bf" dependencies = [ "swc_atoms", "swc_common", @@ -3701,9 +3686,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2017" -version = "0.1.51" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "262c60ac265d83939e8c3ab6a4caf95ef0e0292b32efa1e95898815228af04a0" +checksum = "5a85af431e6b334fbd5d83bebb3fdaaf9f94882c8a3fdb91bb4e5100319109a3" dependencies = [ "serde", "swc_atoms", @@ -3719,9 +3704,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2018" -version = "0.1.51" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50a1dbe98d5e82dac39f8eb71f3e29aa75d2f9e0ac40c77ca9be48524086120a" +checksum = "829e6bf821dbe4381d41b51b062b31f0a97c8d80c98b41060e4c80245d260cb5" dependencies = [ "serde", "swc_atoms", @@ -3738,9 +3723,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2019" -version = "0.1.51" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25bf35c43936aa03592868ee6054ec136979bdcf273b536204d63afd073e560e" +checksum = "aa7a7fd53ffa313ed1d03fa913ddb3db42e2e36609a4d062a2c4cfbfae68d9ac" dependencies = [ "swc_atoms", "swc_common", @@ -3754,9 +3739,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2020" -version = "0.1.49" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d64ea60659571df7afd5ea554a1cde83321ab0263a467584c90cf35711e8f1" +checksum = "8b56f42e0fbeabe54dd963a5f2ae861c5375e50084e0b9bd18520e9ee9308b13" dependencies = [ "serde", "swc_atoms", @@ -3772,9 +3757,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2021" -version = "0.1.49" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6d1f25f85cd5d2d9d360e202ab512c9c412d711f93157ea43e39e640b61cbc" +checksum = "44df74b9fe6604faa8ae7b95fadfa1a783ee0e782caa35992f841a87b3943ee1" dependencies = [ "swc_atoms", "swc_common", @@ -3788,9 +3773,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2022" -version = "0.1.50" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5169ceab4e70ddfa335616c93d9c5a843072cc9c378d1d8f33882087a77eba" +checksum = "12e9090383b12124af70f1f4853e6b1108bfc70b7199282e8577d85a058bd23c" dependencies = [ "swc_atoms", "swc_common", @@ -3807,9 +3792,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es3" -version = "0.1.50" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520c0a498e4f08437e497788c8242d2c37eda77a59d3bd8fb32313edd591c1f7" +checksum = "34f8eb567e43cd7d5f0816281eac57c505b5da2afe9e73b7e460fe074b924c32" dependencies = [ "swc_common", "swc_ecma_ast", @@ -3822,9 +3807,9 @@ dependencies = [ [[package]] name = "swc_ecma_ext_transforms" -version = "0.110.37" +version = "0.113.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aee7de248c285dd81747a567f30da5179c1cd4ded72a138afd41b79259db196b" +checksum = "e78c06ae715d8b8137b9c9b2abc6728d699a7b252ed290bfa8a9a14b5af009f1" dependencies = [ "phf 0.11.2", "swc_atoms", @@ -3836,9 +3821,9 @@ dependencies = [ [[package]] name = "swc_ecma_lints" -version = "0.89.52" +version = "0.92.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a605495347b57867f796876c4b3505632e17f3e98f5285ddbd6ffa37ecb42d9" +checksum = "a41f1bda71bedf2b63f44d0ac3d9830d717491a4d826e70493778efd0fba0af1" dependencies = [ "auto_impl", "dashmap", @@ -3856,9 +3841,9 @@ dependencies = [ [[package]] name = "swc_ecma_loader" -version = "0.45.11" +version = "0.45.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0f3b83df9d13f181e9419c8962923a9fae28f5907e605c8c315f9aed7387536" +checksum = "d5a8e2dfe2062f4c33413639ea1f5c2bd331ce30142b1405cbe025037008b95a" dependencies = [ "anyhow", "dashmap", @@ -3870,6 +3855,7 @@ dependencies = [ "pathdiff", "serde", "serde_json", + "swc_atoms", "swc_cached", "swc_common", "tracing", @@ -3877,12 +3863,12 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.189.78" +version = "0.192.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddce22b2b3c41f4f66d3c4f4fa4018306866451c69a72326c27e6483d7441123" +checksum = "e390390abcdb1800f6106f7da5b462f5b84db6b4dbf8e46ea3c79cc74947709f" dependencies = [ "arrayvec", - "indexmap 2.0.0", + "indexmap 2.2.5", "num-bigint", "num_cpus", "once_cell", @@ -3895,7 +3881,6 @@ dependencies = [ "serde", "serde_json", "swc_atoms", - "swc_cached", "swc_common", "swc_config", "swc_ecma_ast", @@ -3912,9 +3897,9 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.141.30" +version = "0.143.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a0bd56a321b7e79ce7ef011b96323873f99b23e3ab1e5b78992abb6295d9b6e" +checksum = "5166745785657b26ff7722fc32fafd77a79b655602f8628da9c79cede921da74" dependencies = [ "either", "new_debug_unreachable", @@ -3934,13 +3919,13 @@ dependencies = [ [[package]] name = "swc_ecma_preset_env" -version = "0.203.66" +version = "0.206.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c55656cc776fbccc411e65bfe04fb11ee5d19104360de7b8f12efcecc323a31" +checksum = "cb7f79092196efdf7c1a714976a39b684ef2d32d9c4e782d0ddc7a35f5785518" dependencies = [ "anyhow", "dashmap", - "indexmap 2.0.0", + "indexmap 2.2.5", "once_cell", "preset_env_base", "rustc-hash", @@ -3959,12 +3944,11 @@ dependencies = [ [[package]] name = "swc_ecma_quote_macros" -version = "0.52.30" +version = "0.54.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5f9c21ea8af287f6ae3c63f9edead5243c21b9e6721d8fc3ad10e042942f8f" +checksum = "6279141a1514e802863022d5b421a6bebe23f37ee01b426fff4958793028bd03" dependencies = [ "anyhow", - "pmutil", "proc-macro2", "quote", "swc_atoms", @@ -3977,22 +3961,22 @@ dependencies = [ [[package]] name = "swc_ecma_testing" -version = "0.22.12" +version = "0.22.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e49b208173c8ca2e756bd77ff57676bdb8c56930af39eb820ec31d2b49aa16" +checksum = "5053453e9d7571e80eed154a0567392bc4e8a9021a5336890c301bb17fc6706c" dependencies = [ "anyhow", "hex", - "sha-1", + "sha2", "testing", "tracing", ] [[package]] name = "swc_ecma_transforms" -version = "0.226.66" +version = "0.229.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1974297bf442edafed10200aedb19600e8b7efe351b513d24a3afbf64ce0a975" +checksum = "adf8082fa0c3fea4dd28caf11aff67ac778a299a596ecdd5950f24902594e7bc" dependencies = [ "swc_atoms", "swc_common", @@ -4010,13 +3994,13 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" -version = "0.134.51" +version = "0.137.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caa4e1b1b11f4250a7ad73a3d428c0dde43896f285e21f8c74940424efd748ad" +checksum = "4867f24a241877838b03304ce42006f8347aec8ed5a0a3e794aa9350fc1a5362" dependencies = [ "better_scoped_tls", - "bitflags 2.3.3", - "indexmap 2.0.0", + "bitflags 2.4.2", + "indexmap 2.2.5", "once_cell", "phf 0.11.2", "rayon", @@ -4034,9 +4018,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_classes" -version = "0.123.52" +version = "0.126.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d72c93737de15fed47eec46c2018485a085d85923dc13f2a4abacf6f68618ec4" +checksum = "e1a07bf4a67a816277896fa5841812ff9f74c26f5640d93e70e471a41d168194" dependencies = [ "swc_atoms", "swc_common", @@ -4048,12 +4032,12 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_compat" -version = "0.160.59" +version = "0.163.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0f2049050d17826c2a5829741edcd291d3d223d6060defc3dc807403adc969f" +checksum = "b1bc9b8f21a57c5ff07a98c02f152d5888efbac616126bc7d977dfd23cad2d30" dependencies = [ "arrayvec", - "indexmap 2.0.0", + "indexmap 2.2.5", "is-macro", "num-bigint", "serde", @@ -4084,11 +4068,10 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_macros" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8188eab297da773836ef5cf2af03ee5cca7a563e1be4b146f8141452c28cc690" +checksum = "17e309b88f337da54ef7fe4c5b99c2c522927071f797ee6c9fb8b6bf2d100481" dependencies = [ - "pmutil", "proc-macro2", "quote", "swc_macros_common", @@ -4097,14 +4080,14 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_module" -version = "0.177.62" +version = "0.180.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6118dd097f1bf1f804869eebe7e4d4465e0b24c5e2be56add77909df84c6dd0f" +checksum = "6437d14baad04975867acf2f6aabc3e628c4c3122403287e2ca2659f0d4e92e8" dependencies = [ "Inflector", "anyhow", - "bitflags 2.3.3", - "indexmap 2.0.0", + "bitflags 2.4.2", + "indexmap 2.2.5", "is-macro", "path-clean 0.1.0", "pathdiff", @@ -4124,12 +4107,12 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_optimization" -version = "0.195.66" +version = "0.198.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25e3104c66c38b16121475f113046965d3155c120503c68153b00d26c03f9b0f" +checksum = "7a8eb51e53c81afd3563b763fae5ed9e5aaf7fbfaf113ba4fe8bf0b152a71b8a" dependencies = [ "dashmap", - "indexmap 2.0.0", + "indexmap 2.2.5", "once_cell", "petgraph", "rayon", @@ -4149,9 +4132,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_proposal" -version = "0.168.63" +version = "0.171.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "813742ec5dcbb97436ba0236ab5bee4a43963deb9c3049ac40ff276cce299366" +checksum = "ebd56ca4bd886a0b53a77697220780e9f83468885de6b86175558165c3233717" dependencies = [ "either", "rustc-hash", @@ -4169,13 +4152,13 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_react" -version = "0.180.64" +version = "0.183.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6989a53efca78d660d2a0c926d14efdcbfb1811f2af90883ab97bd2a208429b0" +checksum = "8f9649010c5a8d2648c82d8ec1aef90869eb40429d3c107df09b10452be762b3" dependencies = [ "base64 0.21.2", "dashmap", - "indexmap 2.0.0", + "indexmap 2.2.5", "once_cell", "serde", "sha-1", @@ -4193,9 +4176,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_testing" -version = "0.137.53" +version = "0.140.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf18d7cf048b2a6195d84d836a5bf1accbd19d1fb9317da37c44c627658e43b6" +checksum = "c2618344ef828120aa9e42f4441849f5c4c66cb171c79ed15daa400469a9f744" dependencies = [ "ansi_term", "anyhow", @@ -4203,7 +4186,7 @@ dependencies = [ "hex", "serde", "serde_json", - "sha-1", + "sha2", "sourcemap", "swc_common", "swc_ecma_ast", @@ -4219,9 +4202,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.185.64" +version = "0.188.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9b9e31893a6613bea7136e19f924e64ee26e5d891faf875e60c91c8ea900a89" +checksum = "e64b474891d125eca576e741735acbf54751292c6384efe1e0f32e1e996d9541" dependencies = [ "ryu-js", "serde", @@ -4236,11 +4219,11 @@ dependencies = [ [[package]] name = "swc_ecma_usage_analyzer" -version = "0.20.37" +version = "0.23.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc8ff30c1b4d743ee29d2d2004173d84170eef396347b73f74031bd29c24c8ba" +checksum = "f913be2dca4c6f3536dc7645359507692cd66158f25b46b475a3ea76e6e4a9ae" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.2.5", "rustc-hash", "swc_atoms", "swc_common", @@ -4253,11 +4236,11 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.124.36" +version = "0.127.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b175acef1f52f2ae1bf2eb06ef707a232fced722149712db92da3abf77234b" +checksum = "20e64596696563ec040297fa5bed9e7b041138664f8c61ad48cfd88d2fd79c3b" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.2.5", "num_cpus", "once_cell", "rayon", @@ -4272,9 +4255,9 @@ dependencies = [ [[package]] name = "swc_ecma_visit" -version = "0.96.12" +version = "0.98.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176181c0b0a26c762462addae0c75065efb0ccbdbc5076f32f316e4f042732ce" +checksum = "889fc0ec3a9b55377e53e3d4ce06678247b635d7136c1e5d3a2c26578e16cd22" dependencies = [ "num-bigint", "swc_atoms", @@ -4286,9 +4269,9 @@ dependencies = [ [[package]] name = "swc_emotion" -version = "0.66.0" +version = "0.72.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d6da43f8db4ca99b277d7d830d79001bc83e559ee6d295c938a5c03b57fae4" +checksum = "976cfc9fbfcd2fdeb85b2b7ca10abc789ef17f352d25f9547668cad440319047" dependencies = [ "base64 0.13.1", "byteorder", @@ -4310,11 +4293,10 @@ dependencies = [ [[package]] name = "swc_eq_ignore_macros" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05a95d367e228d52484c53336991fdcf47b6b553ef835d9159db4ba40efb0ee8" +checksum = "695a1d8b461033d32429b5befbf0ad4d7a2c4d6ba9cd5ba4e0645c615839e8e4" dependencies = [ - "pmutil", "proc-macro2", "quote", "syn 2.0.32", @@ -4322,9 +4304,9 @@ dependencies = [ [[package]] name = "swc_error_reporters" -version = "0.17.10" +version = "0.17.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf6f875540aa4bb5d0013adf3e89719187c6965dcbacd313fcdb447b01bcd86" +checksum = "df568fdbcfab1bfc9f9df62113da46cf82626ad2e67e1812bf3b76ca3d800f92" dependencies = [ "anyhow", "miette", @@ -4335,11 +4317,11 @@ dependencies = [ [[package]] name = "swc_fast_graph" -version = "0.21.11" +version = "0.21.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f71c0e0d91de33de992029d126afe4d3c19cae2014d34ecd9e06f84dc442dbf0" +checksum = "740f846d9450f3dd20b5fbea1db70e4c774493dd10d8bde54c2d2d5fc8ac824d" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.2.5", "petgraph", "rustc-hash", "swc_common", @@ -4347,11 +4329,10 @@ dependencies = [ [[package]] name = "swc_macros_common" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a273205ccb09b51fabe88c49f3b34c5a4631c4c00a16ae20e03111d6a42e832" +checksum = "50176cfc1cbc8bb22f41c6fe9d1ec53fbe057001219b5954961b8ad0f336fce9" dependencies = [ - "pmutil", "proc-macro2", "quote", "syn 2.0.32", @@ -4359,9 +4340,9 @@ dependencies = [ [[package]] name = "swc_node_comments" -version = "0.20.10" +version = "0.20.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf1422c4035f7278bd6848feb371742843899ef66724bd6f85db5eaaa1b6500" +checksum = "c2dcee90f0a9702a4a0c4b11aa811d8e8fa09fbaeb5d5431d5736d20b3f7688b" dependencies = [ "dashmap", "swc_atoms", @@ -4407,9 +4388,9 @@ dependencies = [ [[package]] name = "swc_plugin_macro" -version = "0.9.15" +version = "0.9.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "785309d342a69df4c929ee59e14e36889ca832f1d2a3c1d03c47c93126c72dbc" +checksum = "3232db481484070637b20a155c064096c0ea1ba04fa2247b89b618661b3574f4" dependencies = [ "proc-macro2", "quote", @@ -4418,9 +4399,9 @@ dependencies = [ [[package]] name = "swc_plugin_proxy" -version = "0.39.12" +version = "0.41.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32ac939558e08e9d354a95b1910f6f24a384ad86c9806f58c28d2e18fbd7d366" +checksum = "c5488302a4e79ae658b6bacd691385e88836276c81dc7abde31d67f0f2ae7425" dependencies = [ "better_scoped_tls", "rkyv", @@ -4442,9 +4423,9 @@ dependencies = [ [[package]] name = "swc_plugin_runner" -version = "0.104.33" +version = "0.106.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ccd5e08b78cf6e5dca205b0678eb61a502919ae8514f14fe2ea94fe4758bf8" +checksum = "9fc260043f8a6aca969b390f612c047f09e670603a0e23a0ca21757e95aa9d73" dependencies = [ "anyhow", "enumset", @@ -4511,9 +4492,9 @@ dependencies = [ [[package]] name = "swc_timer" -version = "0.21.12" +version = "0.21.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13f71e40664ab7bc9aad7739a5415329c8179af715fe11af3651e70d20d0fbb4" +checksum = "b589033a4387ea540b2e9c3e84e45b1e831e7b16dc301f27d4c9cd492099cdee" dependencies = [ "tracing", ] @@ -4531,9 +4512,9 @@ dependencies = [ [[package]] name = "swc_visit" -version = "0.5.7" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e87c337fbb2d191bf371173dea6a957f01899adb8f189c6c31b122a6cfc98fc3" +checksum = "3f5b3e8d1269a7cb95358fed3412645d9c15aa0eb1f4ca003a25a38ef2f30f1b" dependencies = [ "either", "swc_visit_macros", @@ -4541,12 +4522,11 @@ dependencies = [ [[package]] name = "swc_visit_macros" -version = "0.5.8" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f322730fb82f3930a450ac24de8c98523af7d34ab8cb2f46bcb405839891a99" +checksum = "33fc817055fe127b4285dc85058596768bfde7537ae37da82c67815557f03e33" dependencies = [ "Inflector", - "pmutil", "proc-macro2", "quote", "swc_macros_common", @@ -4606,7 +4586,7 @@ checksum = "dc02fddf48964c42031a0b3fe0428320ecf3a73c401040fc0096f97794310651" dependencies = [ "cfg-if", "fastrand", - "redox_syscall 0.3.5", + "redox_syscall", "rustix", "windows-sys 0.48.0", ] @@ -4651,9 +4631,9 @@ dependencies = [ [[package]] name = "testing" -version = "0.35.12" +version = "0.35.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62252c09b891f3f30966a32a564b976aa3cb867fb25367d2ce61f971ae67c87a" +checksum = "fff8bc163dd91547a6cb0ad5e32c8b19e0f1bc607031c81726d57c56d21609e0" dependencies = [ "ansi_term", "cargo_metadata", @@ -4672,14 +4652,13 @@ dependencies = [ [[package]] name = "testing_macros" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1c15b796025051a07f1ac695ee0cac0883f05a0d510c9d171ef8d31a992e6a5" +checksum = "f9d3864d4184569c1428645a51a304b3b6e8d3094cd61fb3cce8dfdd9f6d0f72" dependencies = [ "anyhow", "glob", "once_cell", - "pmutil", "proc-macro2", "quote", "regex", @@ -4730,51 +4709,33 @@ dependencies = [ [[package]] name = "time" -version = "0.1.45" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - -[[package]] -name = "time" -version = "0.2.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" -dependencies = [ - "const_fn", - "libc", - "standback", - "stdweb", + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", "time-macros", - "version_check", - "winapi", ] [[package]] -name = "time-macros" -version = "0.1.1" +name = "time-core" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" -dependencies = [ - "proc-macro-hack", - "time-macros-impl", -] +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] -name = "time-macros-impl" -version = "0.1.2" +name = "time-macros" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "standback", - "syn 1.0.109", + "num-conv", + "time-core", ] [[package]] @@ -4794,11 +4755,10 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.29.1" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" +checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" dependencies = [ - "autocfg", "backtrace", "bytes", "num_cpus", @@ -4808,9 +4768,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", @@ -4819,23 +4779,26 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.11" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" dependencies = [ "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.19.14", ] [[package]] name = "toml" -version = "0.7.6" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_edit 0.20.2", ] [[package]] @@ -4853,7 +4816,20 @@ version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.2.5", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.2.5", "serde", "serde_spanned", "toml_datetime", @@ -4923,6 +4899,16 @@ dependencies = [ "tracing-log", ] +[[package]] +name = "twox-hash" +version = "1.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" +dependencies = [ + "cfg-if", + "static_assertions", +] + [[package]] name = "typed-arena" version = "2.0.2" @@ -5055,9 +5041,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "virtual-fs" -version = "0.6.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcd74701f37aea30b90a83c90b92bc3850dedb9448836dbcc0960f993bda423b" +checksum = "6ce7b7674a3d0ddb5915b8f4feccdd6e8680c5980c296688e0f0e7378b8c69e1" dependencies = [ "anyhow", "async-trait", @@ -5072,6 +5058,7 @@ dependencies = [ "libc", "pin-project-lite", "replace_with", + "shared-buffer", "slab", "thiserror", "tokio", @@ -5080,15 +5067,42 @@ dependencies = [ ] [[package]] -name = "virtual-net" +name = "virtual-mio" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfac1d64ecfe2d8b295530da2a14af9eb9acccd91d76f3347dee96d745c83661" +checksum = "b9f38a379f14296f9fb93eda42ece4d57b568af417569102c3dcfeb88ab4800f" +dependencies = [ + "async-trait", + "bytes", + "derivative", + "futures", + "mio", + "serde", + "socket2", + "thiserror", + "tracing", +] + +[[package]] +name = "virtual-net" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836e29c8c756db5ac62f188dc05be0273d9daf633ac03b8b23902cf85ce9b6ce" dependencies = [ + "anyhow", "async-trait", + "base64 0.21.2", + "bincode", + "bytecheck", "bytes", + "derivative", + "futures-util", + "pin-project-lite", + "rkyv", + "serde", "thiserror", "tracing", + "virtual-mio", ] [[package]] @@ -5163,9 +5177,9 @@ dependencies = [ [[package]] name = "wai-bindgen-wasmer" -version = "0.9.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffd9a8124a3e4e664cb79864fd1eaf24521e15bf8d67509af1bc45e8b510475" +checksum = "39a8ae4f43b477b58e5f69924983a82136ccbaceccf5fac8e069bbd64f55a964" dependencies = [ "anyhow", "bitflags 1.3.2", @@ -5217,12 +5231,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -5254,29 +5262,6 @@ dependencies = [ "wasm-bindgen-shared", ] -[[package]] -name = "wasm-bindgen-downcast" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dac026d43bcca6e7ce1c0956ba68f59edf6403e8e930a5d891be72c31a44340" -dependencies = [ - "js-sys", - "once_cell", - "wasm-bindgen", - "wasm-bindgen-downcast-macros", -] - -[[package]] -name = "wasm-bindgen-downcast-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5020cfa87c7cecefef118055d44e3c1fc122c7ec25701d528ee458a0b45f38f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "wasm-bindgen-macro" version = "0.2.84" @@ -5308,18 +5293,18 @@ checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" [[package]] name = "wasm-encoder" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06a3d1b4a575ffb873679402b2aedb3117555eb65c27b1b86c8a91e574bc2a2a" +checksum = "1ba64e81215916eaeb48fee292f29401d69235d62d8b8fd92a7b2844ec5ae5f7" dependencies = [ "leb128", ] [[package]] name = "wasmer" -version = "4.0.0" +version = "4.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea790bcdfb4e6e9d1e5ddf75b4699aac62b078fcc9f27f44e1748165ceea67bf" +checksum = "5c15724dc25d1ee57962334aea8e41ade2675e5ea2ac6b8d42da6051b0face66" dependencies = [ "bytes", "cfg-if", @@ -5330,10 +5315,11 @@ dependencies = [ "rustc-demangle", "serde", "serde-wasm-bindgen", + "shared-buffer", "target-lexicon", "thiserror", + "tracing", "wasm-bindgen", - "wasm-bindgen-downcast", "wasmer-compiler", "wasmer-compiler-cranelift", "wasmer-derive", @@ -5345,9 +5331,9 @@ dependencies = [ [[package]] name = "wasmer-cache" -version = "4.0.0" +version = "4.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c968d5f47c4eef4597a7315aa9c6b633c285b5c52070722bac58fab75b298f" +checksum = "e3242b5cf4d27d33daa44b60b153365f733e9fb833cf61594e577ae55456e85f" dependencies = [ "blake3", "hex", @@ -5357,11 +5343,12 @@ dependencies = [ [[package]] name = "wasmer-compiler" -version = "4.0.0" +version = "4.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f093937725e242e5529fed27e08ff836c011a9ecc22e6819fb818c2ac6ff5f88" +checksum = "55a7f3b3a96f8d844c25e2c032af9572306dd63fa93dc17bcca4c5458ac569bd" dependencies = [ "backtrace", + "bytes", "cfg-if", "enum-iterator", "enumset", @@ -5370,6 +5357,9 @@ dependencies = [ "memmap2 0.5.10", "more-asserts", "region", + "rkyv", + "self_cell", + "shared-buffer", "smallvec", "thiserror", "wasmer-types", @@ -5380,9 +5370,9 @@ dependencies = [ [[package]] name = "wasmer-compiler-cranelift" -version = "4.0.0" +version = "4.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b27b1670d27158789ebe14e4da3902c72132174884a1c6a3533ce4fd9dd83db" +checksum = "102e2c5bacac69495c4025767e2fa26797ffb27f242dccb7cf57d9cefd944386" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -5399,9 +5389,9 @@ dependencies = [ [[package]] name = "wasmer-derive" -version = "4.0.0" +version = "4.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13ae8286cba2acb10065a4dac129c7c7f7bcd24acd6538555d96616eea16bc27" +checksum = "0ea737fa08f95d6abc4459f42a70a9833e8974b814e74971d77ef473814f4d4c" dependencies = [ "proc-macro-error", "proc-macro2", @@ -5409,28 +5399,54 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "wasmer-journal" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f7db07627d56d4b714255d8f1f7f07378dd5a3bc67e612ece42afa7e4a0e477" +dependencies = [ + "anyhow", + "async-trait", + "base64 0.21.2", + "bincode", + "bytecheck", + "bytes", + "derivative", + "lz4_flex", + "num_enum", + "rkyv", + "serde", + "serde_json", + "thiserror", + "tracing", + "virtual-net", + "wasmer", + "wasmer-wasix-types", +] + [[package]] name = "wasmer-toml" -version = "0.6.0" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4232db0aff83ed6208d541ddcf1bf72730673528be8c4fe13c6369060f6e05a7" +checksum = "d21472954ee9443235ca32522b17fc8f0fe58e2174556266a0d9766db055cc52" dependencies = [ "anyhow", - "indexmap 1.9.3", + "derive_builder", + "indexmap 2.2.5", "semver 1.0.18", "serde", "serde_cbor", "serde_json", - "serde_yaml 0.9.25", + "serde_yaml", "thiserror", - "toml 0.5.11", + "toml 0.8.2", ] [[package]] name = "wasmer-types" -version = "4.0.0" +version = "4.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "918d2f0bb5eaa95a80c06be33f21dee92f40f12cd0982da34490d121a99d244b" +checksum = "b0689110e291b0f07fc665f2824e5ff81df120848e8a9acfbf1a9bf7990773f9" dependencies = [ "bytecheck", "enum-iterator", @@ -5445,14 +5461,15 @@ dependencies = [ [[package]] name = "wasmer-vm" -version = "4.0.0" +version = "4.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e000c2cbd4f9805427af5f3b3446574caf89ab3a1e66c2f3579fbde22b072b" +checksum = "4cd41f822a1ac4242d478754e8ceba2806a00ea5072803622e1fe91e8e28b2a1" dependencies = [ "backtrace", "cc", "cfg-if", "corosensei", + "crossbeam-queue", "dashmap", "derivative", "enum-iterator", @@ -5461,7 +5478,7 @@ dependencies = [ "lazy_static", "libc", "mach", - "memoffset 0.8.0", + "memoffset", "more-asserts", "region", "scopeguard", @@ -5472,13 +5489,15 @@ dependencies = [ [[package]] name = "wasmer-wasix" -version = "0.9.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dcd089dcd440141b2edf300ddd61c2d67d052baac8d29256c901f607d44d459" +checksum = "25cd997abba5a5b59bad212c53f953eff28c7cee38b67b989b114cf5b80e9625" dependencies = [ "anyhow", "async-trait", + "base64 0.21.2", "bincode", + "bytecheck", "bytes", "cfg-if", "cooked-waker", @@ -5492,18 +5511,22 @@ dependencies = [ "lazy_static", "libc", "linked_hash_set", + "lz4_flex", + "num_enum", "once_cell", "petgraph", "pin-project", "rand", + "rkyv", + "rusty_pool", "semver 1.0.18", "serde", "serde_cbor", "serde_derive", "serde_json", - "serde_yaml 0.8.26", + "serde_yaml", "sha2", - "shellexpand", + "shared-buffer", "tempfile", "term_size", "termios", @@ -5513,23 +5536,25 @@ dependencies = [ "url", "urlencoding", "virtual-fs", + "virtual-mio", "virtual-net", "wai-bindgen-wasmer", "waker-fn", - "wasm-bindgen", "wasmer", + "wasmer-journal", "wasmer-types", "wasmer-wasix-types", "webc", "weezl", "winapi", + "xxhash-rust", ] [[package]] name = "wasmer-wasix-types" -version = "0.9.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a4a519e8f0b878bb4cd2b1bc733235aa6c331b7b4857dd6e0ac3c9a36d942ae" +checksum = "a1be275d30cc4c69cd2d52d4fee2e83feb3f35b381497d3f7c71ad5a4cde24d8" dependencies = [ "anyhow", "bitflags 1.3.2", @@ -5537,7 +5562,8 @@ dependencies = [ "cfg-if", "num_enum", "serde", - "time 0.2.27", + "time", + "tracing", "wai-bindgen-gen-core", "wai-bindgen-gen-rust", "wai-bindgen-gen-rust-wasm", @@ -5550,19 +5576,20 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.95.0" +version = "0.121.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ea896273ea99b15132414be1da01ab0d8836415083298ecaffbe308eaac87a" +checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" dependencies = [ - "indexmap 1.9.3", - "url", + "bitflags 2.4.2", + "indexmap 2.2.5", + "semver 1.0.18", ] [[package]] name = "wast" -version = "62.0.0" +version = "64.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f7ee878019d69436895f019b65f62c33da63595d8e857cbdc87c13ecb29a32" +checksum = "a259b226fd6910225aa7baeba82f9d9933b6d00f2ce1b49b80fa4214328237cc" dependencies = [ "leb128", "memchr", @@ -5572,18 +5599,18 @@ dependencies = [ [[package]] name = "wat" -version = "1.0.68" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "295572bf24aa5b685a971a83ad3e8b6e684aaad8a9be24bc7bf59bed84cc1c08" +checksum = "53253d920ab413fca1c7dc2161d601c79b4fdf631d0ba51dd4343bf9b556c3f6" dependencies = [ "wast", ] [[package]] name = "webc" -version = "5.1.1" +version = "5.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d8b985cecc5a364f746c7fcd6e5396986360a58550072f2f9147a07532f525c" +checksum = "973ca5a91b4fb3e4bb37cfebe03ef9364d0aff2765256abefdb7e79dc9188483" dependencies = [ "anyhow", "base64 0.21.2", @@ -5596,6 +5623,7 @@ dependencies = [ "once_cell", "path-clean 1.0.1", "rand", + "semver 1.0.18", "serde", "serde_cbor", "serde_json", @@ -5858,6 +5886,12 @@ dependencies = [ "libc", ] +[[package]] +name = "xxhash-rust" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927da81e25be1e1a2901d59b81b37dd2efd1fc9c9345a55007f09bf5a2d3ee03" + [[package]] name = "yaml-rust" version = "0.4.5" @@ -5875,18 +5909,18 @@ checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" [[package]] name = "zerocopy" -version = "0.7.25" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd369a67c0edfef15010f980c3cbe45d7f651deac2cd67ce097cd801de16557" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.25" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f140bda219a26ccc0cdb03dba58af72590c53b22642577d88a927bc5c87d6b" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index c0ef0e0..de8e7c4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,4 +17,4 @@ anyhow = { version = "1.0.69" } dashmap = { version = "5.4.0" } serde = "1.0.163" serde_json = "1.0.91" -swc_core = { version = "0.86.94", default-features = false } +swc_core = { version = "0.90.22", default-features = false } diff --git a/crates/integration_tests/tests/plugin_react_utils/fixtures/remove_prop_types/issue-106/expected-wrap.js b/crates/integration_tests/tests/plugin_react_utils/fixtures/remove_prop_types/issue-106/expected-wrap.js index 110657e..0c3ad84 100644 --- a/crates/integration_tests/tests/plugin_react_utils/fixtures/remove_prop_types/issue-106/expected-wrap.js +++ b/crates/integration_tests/tests/plugin_react_utils/fixtures/remove_prop_types/issue-106/expected-wrap.js @@ -10,7 +10,7 @@ class RouteNode extends Component { } const storeName = 'storeName'; -RouteNode.wrappedComponent.propTypes /* remove-proptypes */ = process.env.NODE_ENV !== "production" ? { +RouteNode.wrappedComponent.propTypes = process.env.NODE_ENV !== "production" ? { [storeName]: PropTypes.object.isRequired } : {}; diff --git a/crates/plugin_config_routes/src/lib.rs b/crates/plugin_config_routes/src/lib.rs index 53ee6d1..72069e1 100644 --- a/crates/plugin_config_routes/src/lib.rs +++ b/crates/plugin_config_routes/src/lib.rs @@ -81,8 +81,11 @@ impl VisitMut for ConfigRoutes { } fn visit_mut_prop(&mut self, prop: &mut Prop) { - if !self.lazy && let Some(module) = get_target_prop(prop, "module") { - module.value = Box::new(quote!("require($value)" as Expr, value: Expr = module.value.as_ref().clone())); + if !self.lazy + && let Some(module) = get_target_prop(prop, "module") + { + module.value = + Box::new(quote!("require($value)" as Expr, value: Expr = module.value.as_ref().clone())); } if let Some(component) = get_target_prop(prop, "component") { diff --git a/crates/plugin_import/src/lib.rs b/crates/plugin_import/src/lib.rs index cb04ed3..dd930a3 100644 --- a/crates/plugin_import/src/lib.rs +++ b/crates/plugin_import/src/lib.rs @@ -9,8 +9,8 @@ use swc_core::{ common::{sync::Lazy, util::take::Take, BytePos, Span, SyntaxContext, DUMMY_SP}, ecma::{ ast::{ - Ident, ImportDecl, ImportDefaultSpecifier, ImportNamedSpecifier, ImportSpecifier, Module, - ModuleDecl, ModuleExportName, ModuleItem, Str, + Ident, ImportDecl, ImportDefaultSpecifier, ImportNamedSpecifier, ImportPhase, + ImportSpecifier, Module, ModuleDecl, ModuleExportName, ModuleItem, Str, }, atoms::JsWord, visit::{as_folder, Fold, VisitMut, VisitWith}, @@ -403,6 +403,7 @@ impl<'a> VisitMut for ImportPlugin<'a> { }), type_only: false, with: None, + phase: ImportPhase::Evaluation, })); imports.push(dec); } @@ -467,6 +468,7 @@ impl<'a> VisitMut for ImportPlugin<'a> { }), type_only: false, with: None, + phase: ImportPhase::Evaluation, })); imports.push(dec); } diff --git a/crates/plugin_lodash/src/lib.rs b/crates/plugin_lodash/src/lib.rs index 5a363a1..2387269 100644 --- a/crates/plugin_lodash/src/lib.rs +++ b/crates/plugin_lodash/src/lib.rs @@ -10,8 +10,8 @@ use swc_core::{ ecma::{ ast::{ CallExpr, ExportNamedSpecifier, ExportSpecifier, Expr, Id, Ident, ImportDecl, - ImportDefaultSpecifier, ImportSpecifier, MemberProp, Module, ModuleDecl, ModuleExportName, - ModuleItem, NamedExport, Str, + ImportDefaultSpecifier, ImportPhase, ImportSpecifier, MemberProp, Module, ModuleDecl, + ModuleExportName, ModuleItem, NamedExport, Str, }, atoms::JsWord, utils::undefined, @@ -47,20 +47,23 @@ pub fn plugin_lodash<'a>( } }); - let (mappings, pkg_map) = if let Some(cache_key) = &plugin_context.config_hash && CACHE.contains_key(cache_key) { + let (mappings, pkg_map) = if let Some(cache_key) = &plugin_context.config_hash + && CACHE.contains_key(cache_key) + { let cache_item = CACHE.get(cache_key).unwrap(); (cache_item.mappings.clone(), cache_item.pkg_map.clone()) } else { - let mappings = Arc::new( - build_mappings(ids.iter().map(|s| s.as_str()), &config.cwd).unwrap() - ); + let mappings = Arc::new(build_mappings(ids.iter().map(|s| s.as_str()), &config.cwd).unwrap()); let pkg_map = Arc::new(build_pkg_map(&config.cwd, &mappings)); if let Some(k) = &plugin_context.config_hash { - CACHE.insert(k.clone(), CacheItem { - mappings: mappings.clone(), - pkg_map: pkg_map.clone(), - }); + CACHE.insert( + k.clone(), + CacheItem { + mappings: mappings.clone(), + pkg_map: pkg_map.clone(), + }, + ); } (mappings, pkg_map) }; @@ -134,6 +137,7 @@ impl PluginLodash { }), type_only: false, with: None, + phase: ImportPhase::Evaluation, }); self.lodash_vars.insert(local.clone()); diff --git a/crates/plugin_react_const_elements/src/immutable.rs b/crates/plugin_react_const_elements/src/immutable.rs index def8272..1fb91da 100644 --- a/crates/plugin_react_const_elements/src/immutable.rs +++ b/crates/plugin_react_const_elements/src/immutable.rs @@ -2,8 +2,9 @@ use swc_core::{ common::DUMMY_SP, ecma::{ ast::{ - AssignExpr, AssignOp, BinExpr, BinaryOp, Expr, Ident, JSXAttr, JSXAttrName, JSXElement, - JSXElementChild, JSXElementName, JSXExpr, JSXExprContainer, PatOrExpr, SpreadElement, + AssignExpr, AssignOp, AssignTarget, BinExpr, BinaryOp, BindingIdent, Expr, Ident, JSXAttr, + JSXAttrName, JSXElement, JSXElementChild, JSXElementName, JSXExpr, JSXExprContainer, + SimpleAssignTarget, SpreadElement, }, visit::{noop_visit_mut_type, VisitMut, VisitMutWith}, }, @@ -68,17 +69,20 @@ pub fn are_children_immutable( let child_immutable = match c { // Literal text and fragments are immutable JSXElementChild::JSXText(_) => true, - JSXElementChild::JSXFragment(jsx_frag) => are_children_immutable(&mut jsx_frag.children, state, false), + JSXElementChild::JSXFragment(jsx_frag) => { + are_children_immutable(&mut jsx_frag.children, state, false) + } // we can allow raw ident access if is declared as const variable JSXElementChild::JSXExprContainer(expr_container) => { - if let JSXExpr::Expr(expr) = &expr_container.expr && - let Expr::Ident(ident) = expr.as_ref() { - state.vars.contains(&ident.to_id()) + if let JSXExpr::Expr(expr) = &expr_container.expr + && let Expr::Ident(ident) = expr.as_ref() + { + state.vars.contains(&ident.to_id()) } else { false } - }, + } JSXElementChild::JSXElement(ele) => modify_jsx_if_immutable(ele, state), JSXElementChild::JSXSpreadChild(_) => false, }; @@ -94,14 +98,26 @@ pub fn are_children_immutable( let id = state.create_id(Some(name)); state.candidates.push(id.clone()); - *c = JSXElementChild::JSXExprContainer(JSXExprContainer { span: DUMMY_SP, expr: JSXExpr::Expr(Box::new(hoist_result_ast(id, Expr::JSXElement(ele.clone())))) }); + *c = JSXElementChild::JSXExprContainer(JSXExprContainer { + span: DUMMY_SP, + expr: JSXExpr::Expr(Box::new(hoist_result_ast( + id, + Expr::JSXElement(ele.clone()), + ))), + }); } JSXElementChild::JSXFragment(frag) => { let id = state.create_id(None); state.candidates.push(id.clone()); - *c = JSXElementChild::JSXExprContainer(JSXExprContainer { span: DUMMY_SP, expr: JSXExpr::Expr(Box::new(hoist_result_ast(id, Expr::JSXFragment(frag.clone())))) }); - }, + *c = JSXElementChild::JSXExprContainer(JSXExprContainer { + span: DUMMY_SP, + expr: JSXExpr::Expr(Box::new(hoist_result_ast( + id, + Expr::JSXFragment(frag.clone()), + ))), + }); + } _ => {} }; } @@ -119,7 +135,10 @@ pub fn hoist_result_ast(id: Ident, ele: Expr) -> Expr { right: Box::new(Expr::Assign(AssignExpr { span: DUMMY_SP, op: AssignOp::Assign, - left: PatOrExpr::Expr(Box::new(Expr::Ident(id))), + left: AssignTarget::Simple(SimpleAssignTarget::Ident(BindingIdent { + id, + type_ann: None, + })), right: Box::new(ele), })), }) @@ -162,9 +181,11 @@ impl<'a> VisitMut for Immutable<'a> { noop_visit_mut_type!(); fn visit_mut_jsx_attr(&mut self, attr: &mut JSXAttr) { - if let JSXAttrName::Ident(Ident { sym, .. }) = &attr.name && sym == "ref" { - self.immutable = false - } + if let JSXAttrName::Ident(Ident { sym, .. }) = &attr.name + && sym == "ref" + { + self.immutable = false + } attr.visit_mut_children_with(self); } diff --git a/crates/plugin_react_utils/src/import_react.rs b/crates/plugin_react_utils/src/import_react.rs index ac53d1b..265b1b1 100644 --- a/crates/plugin_react_utils/src/import_react.rs +++ b/crates/plugin_react_utils/src/import_react.rs @@ -2,8 +2,8 @@ use swc_core::{ common::{Mark, Span, DUMMY_SP}, ecma::{ ast::{ - Ident, ImportDecl, ImportDefaultSpecifier, ImportSpecifier, Module, ModuleDecl, ModuleItem, - Str, + Ident, ImportDecl, ImportDefaultSpecifier, ImportPhase, ImportSpecifier, Module, ModuleDecl, + ModuleItem, Str, }, atoms::JsWord, visit::{as_folder, Fold, VisitMut, VisitMutWith}, @@ -60,6 +60,7 @@ impl VisitMut for ImportReact { }), type_only: false, with: None, + phase: ImportPhase::Evaluation, })); body.insert(0, dec); } diff --git a/crates/plugin_react_utils/src/remove_prop_types.rs b/crates/plugin_react_utils/src/remove_prop_types.rs index 26c5b0f..205e9c4 100644 --- a/crates/plugin_react_utils/src/remove_prop_types.rs +++ b/crates/plugin_react_utils/src/remove_prop_types.rs @@ -10,7 +10,8 @@ use swc_core::{ ast::{ AssignExpr, BlockStmt, Class, ClassDecl, ClassExpr, ClassMember, ClassProp, Decl, DefaultDecl, ExportDecl, ExportDefaultDecl, ExportDefaultExpr, Expr, ExprStmt, FnDecl, Id, - Ident, ImportDecl, ImportSpecifier, Module, ModuleDecl, ModuleItem, PropName, Stmt, VarDecl, + Ident, ImportDecl, ImportSpecifier, Module, ModuleDecl, ModuleItem, PropName, + SimpleAssignTarget, Stmt, VarDecl, }, atoms::JsWord, visit::{ @@ -136,7 +137,7 @@ where let left = &assign_expr.left; // App.propTypes = {...} - if let Some(Expr::Member(member_decl)) = left.as_expr() { + if let Some(SimpleAssignTarget::Member(member_decl)) = left.as_simple() { if let Expr::Ident(obj) = &*member_decl.obj { if self.is_react_class(&obj.to_id()) && (member_decl.prop.is_ident() @@ -438,8 +439,10 @@ where // a.b.c /* remove-proptypes */ = PropTypes.number fn visit_mut_expr(&mut self, expr: &mut Expr) { if let Expr::Assign(assign) = expr { - if let Some(comments) = self.comments.get_trailing(assign.left.span().hi) && - comments.iter().all(|comment| {comment.text.trim() == "remove-proptypes"}) + if let Some(comments) = self.comments.get_trailing(assign.left.span().hi) + && comments + .iter() + .all(|comment| comment.text.trim() == "remove-proptypes") { self.remove_expr(expr); } @@ -465,7 +468,13 @@ impl<'a> CollectReactComponent<'a> { fn check_custom_class(&mut self, ident: &Ident, class: &Class) { let key = ident.to_id(); if let Some(super_class) = class.super_class.as_deref() { - if let Expr::Ident(super_class) = super_class && self.config.class_name_matchers.iter().any(|it| it.is_match(&super_class.sym)) { + if let Expr::Ident(super_class) = super_class + && self + .config + .class_name_matchers + .iter() + .any(|it| it.is_match(&super_class.sym)) + { self.ids.insert(key); } } @@ -600,7 +609,9 @@ impl<'a> Visit for CollectReactComponent<'a> { fn visit_fn_decl(&mut self, fn_decl: &FnDecl) { let id = &fn_decl.ident; - if let Some(block_stmt) = &fn_decl.function.body && is_return_jsx(block_stmt.stmts.iter(), Some(self.bindings)) { + if let Some(block_stmt) = &fn_decl.function.body + && is_return_jsx(block_stmt.stmts.iter(), Some(self.bindings)) + { self.ids.insert(id.to_id()); } } diff --git a/crates/plugin_remove_es_module_mark/src/lib.rs b/crates/plugin_remove_es_module_mark/src/lib.rs index 0fa97a2..7114a7e 100644 --- a/crates/plugin_remove_es_module_mark/src/lib.rs +++ b/crates/plugin_remove_es_module_mark/src/lib.rs @@ -22,14 +22,15 @@ impl VisitMut for RemoveEsModuleMark { } fn is_es_module_mark(item: &ModuleItem) -> bool { - if let ModuleItem::Stmt(Stmt::Expr(ExprStmt { expr, .. })) = item && - let Expr::Call(CallExpr { callee, .. }) = &**expr && - let Some(callee) = callee.as_expr() && - let Expr::Member(member_expr) = &**callee && - let Expr::Ident(obj) = &*member_expr.obj && - let MemberProp::Ident(prop) = &member_expr.prop && - &obj.sym == "Object" && - &prop.sym == "defineProperty" { + if let ModuleItem::Stmt(Stmt::Expr(ExprStmt { expr, .. })) = item + && let Expr::Call(CallExpr { callee, .. }) = &**expr + && let Some(callee) = callee.as_expr() + && let Expr::Member(member_expr) = &**callee + && let Expr::Ident(obj) = &*member_expr.obj + && let MemberProp::Ident(prop) = &member_expr.prop + && &obj.sym == "Object" + && &prop.sym == "defineProperty" + { true } else { false diff --git a/crates/plugin_ssr_loader_id/src/lib.rs b/crates/plugin_ssr_loader_id/src/lib.rs index 7593040..c6b6cfc 100644 --- a/crates/plugin_ssr_loader_id/src/lib.rs +++ b/crates/plugin_ssr_loader_id/src/lib.rs @@ -77,8 +77,8 @@ impl<'a> PluginSSRLoaderId { let func_body = &loader.as_fn_expr()?.function.body; match func_body { Some(body) => { - let inner_loader_decl = body.stmts.get(0)?.as_decl()?.as_var()?; - let decl_ident = &inner_loader_decl.decls.get(0)?.name.as_ident()?.id; + let inner_loader_decl = body.stmts.first()?.as_decl()?.as_var()?; + let decl_ident = &inner_loader_decl.decls.first()?.name.as_ident()?.id; let inner_loader_return = body.stmts.get(2)?.as_return_stmt()?; let return_ident = inner_loader_return.arg.as_ref()?.as_ident()?; @@ -177,26 +177,28 @@ impl<'a> PluginSSRLoaderId { ident: None, function: method.function.clone(), }); - if let Some(name) = name && - LOADER_SLICE.contains(&name) && - self.check_is_duplicate_inner_loader(func_expr).is_none() - { - let key_value_prop = Prop::KeyValue(KeyValueProp { - key: method.key.clone(), - value: Box::new(self.create_loader_expression(func_expr)), - }); - *prop = key_value_prop; - } + if let Some(name) = name + && LOADER_SLICE.contains(&name) + && self.check_is_duplicate_inner_loader(func_expr).is_none() + { + let key_value_prop = Prop::KeyValue(KeyValueProp { + key: method.key.clone(), + value: Box::new(self.create_loader_expression(func_expr)), + }); + *prop = key_value_prop; + } } Prop::KeyValue(key_value) => { let name = get_name_from_prop_key(&key_value.key); - if let Some(name) = name && - LOADER_SLICE.contains(&name) && - self.check_is_duplicate_inner_loader(&key_value.value).is_none() - { - *key_value.value = self.create_loader_expression(&key_value.value); - } + if let Some(name) = name + && LOADER_SLICE.contains(&name) + && self + .check_is_duplicate_inner_loader(&key_value.value) + .is_none() + { + *key_value.value = self.create_loader_expression(&key_value.value); + } } _ => (), } @@ -238,30 +240,39 @@ impl VisitMut for PluginSSRLoaderId { } import_decl.specifiers.iter().for_each(|specifier| { - let ImportSpecifier::Named(imported_spec) = specifier else { - return; - }; - - let local_name = &imported_spec.local; - let import_name = imported_spec - .imported - .as_ref() - .and_then(|module_decl| match module_decl { - ModuleExportName::Ident(id) => Some(id), - ModuleExportName::Str(_) => None, - }) - .unwrap_or(local_name); - if let Some(function_use_loader_name) = &config.function_use_loader_name && - import_name.sym.eq(function_use_loader_name) && - state.use_loader.is_none() { state.use_loader = Some(local_name.to_id()); } - - if let Some(function_use_static_loader_name) = &config.function_use_static_loader_name && - import_name.sym.eq(function_use_static_loader_name) && - state.use_static_loader.is_none() { state.use_static_loader = Some(local_name.to_id()); } - - if let Some(function_create_container_name) = &config.function_create_container_name && - import_name.sym.eq(function_create_container_name) && - state.create_container.is_none() { state.create_container = Some(local_name.to_id()); } + let ImportSpecifier::Named(imported_spec) = specifier else { + return; + }; + + let local_name = &imported_spec.local; + let import_name = imported_spec + .imported + .as_ref() + .and_then(|module_decl| match module_decl { + ModuleExportName::Ident(id) => Some(id), + ModuleExportName::Str(_) => None, + }) + .unwrap_or(local_name); + if let Some(function_use_loader_name) = &config.function_use_loader_name + && import_name.sym.eq(function_use_loader_name) + && state.use_loader.is_none() + { + state.use_loader = Some(local_name.to_id()); + } + + if let Some(function_use_static_loader_name) = &config.function_use_static_loader_name + && import_name.sym.eq(function_use_static_loader_name) + && state.use_static_loader.is_none() + { + state.use_static_loader = Some(local_name.to_id()); + } + + if let Some(function_create_container_name) = &config.function_create_container_name + && import_name.sym.eq(function_create_container_name) + && state.create_container.is_none() + { + state.create_container = Some(local_name.to_id()); + } }) } diff --git a/crates/swc_plugins_collection/Cargo.toml b/crates/swc_plugins_collection/Cargo.toml index 01c5902..5497fe1 100644 --- a/crates/swc_plugins_collection/Cargo.toml +++ b/crates/swc_plugins_collection/Cargo.toml @@ -20,7 +20,7 @@ swc_plugins_utils = { path = "../swc_plugins_utils" } swc_plugins_core = { path = "../swc_plugins_core" } # plugins list -modularize_imports = "0.62.0" +modularize_imports = "0.68.7" plugin_react_const_elements = { path = "../plugin_react_const_elements" } swc_plugin_import = { path = "../plugin_import" } plugin_lock_corejs_version = { path = "../plugin_lock_corejs_version" } @@ -29,9 +29,9 @@ swc_plugin_react_utils = { path = "../plugin_react_utils" } plugin_remove_es_module_mark = { path = "../plugin_remove_es_module_mark" } plugin_ssr_loader_id = { path = "../plugin_ssr_loader_id" } plugin_config_routes = { path = "../plugin_config_routes" } -styled_components = "0.90.0" -styled_jsx = "0.67.0" -swc_emotion = "0.66.0" +styled_components = "0.96.6" +styled_jsx = "0.73.9" +swc_emotion = "0.72.6" swc_plugin_loadable_components = { path = "../plugin_loadable_components" } [dev-dependencies] diff --git a/crates/swc_plugins_collection/src/pass.rs b/crates/swc_plugins_collection/src/pass.rs index a437b61..e130c1f 100644 --- a/crates/swc_plugins_collection/src/pass.rs +++ b/crates/swc_plugins_collection/src/pass.rs @@ -4,6 +4,7 @@ use modularize_imports::{modularize_imports, Config as ModularizedConfig}; use plugin_config_routes::plugin_config_routes; use plugin_lock_corejs_version::lock_corejs_version; use plugin_ssr_loader_id::plugin_ssr_loader_id; +use styled_jsx::visitor::NativeConfig; use swc_core::{ base::config::Options, common::{chain, comments::Comments, pass::Either, FileName}, @@ -83,6 +84,7 @@ pub fn internal_transform_before_pass<'a>( use_lightningcss: true, browsers: Default::default(), }, + NativeConfig { process_css: None }, )) } else { Either::Right(noop()) diff --git a/crates/swc_plugins_core/src/transform.rs b/crates/swc_plugins_core/src/transform.rs index dfdff75..ebb05f3 100644 --- a/crates/swc_plugins_core/src/transform.rs +++ b/crates/swc_plugins_core/src/transform.rs @@ -78,7 +78,7 @@ where swc_config.filename = filename.clone(); adapt_syntax(&filename, &mut swc_config); - let top_level_mark = swc_config.top_level_mark.unwrap_or_else(Mark::new); + let top_level_mark = swc_config.top_level_mark.unwrap_or_default(); let unresolved_mark = Mark::new(); swc_config.top_level_mark = Some(top_level_mark); diff --git a/crates/swc_plugins_utils/src/lib.rs b/crates/swc_plugins_utils/src/lib.rs index a43b412..1ca4184 100644 --- a/crates/swc_plugins_utils/src/lib.rs +++ b/crates/swc_plugins_utils/src/lib.rs @@ -6,9 +6,10 @@ use swc_core::{ common::{SyntaxContext, DUMMY_SP}, ecma::{ ast::{ - AssignExpr, BlockStmt, BlockStmtOrExpr, Callee, Class, ClassDecl, Decl, DefaultDecl, Expr, - ExprStmt, FnDecl, Function, Id, Ident, Lit, MemberProp, Module, ModuleDecl, ModuleItem, Pat, - PatOrExpr, Program, ReturnStmt, Stmt, VarDecl, VarDeclKind, + AssignExpr, AssignTarget, AssignTargetPat, BindingIdent, BlockStmt, BlockStmtOrExpr, Callee, + Class, ClassDecl, Decl, DefaultDecl, Expr, ExprStmt, FnDecl, Function, Id, Ident, Lit, + MemberProp, Module, ModuleDecl, ModuleItem, Pat, Program, ReturnStmt, SimpleAssignTarget, + Stmt, VarDecl, VarDeclKind, }, atoms::JsWord, visit::{Fold, Visit, VisitMut, VisitMutWith, VisitWith}, @@ -149,7 +150,9 @@ impl RmInvalid { fn rm_stmts(&mut self, stmts: &mut Vec) { let mut rm = vec![]; for (idx, stmt) in stmts.iter_mut().enumerate().rev() { - if let Stmt::Expr(ExprStmt{ expr , ..}) = stmt && expr.is_invalid() { + if let Stmt::Expr(ExprStmt { expr, .. }) = stmt + && expr.is_invalid() + { rm.push(idx) } else { stmt.visit_mut_children_with(self); @@ -166,7 +169,9 @@ impl VisitMut for RmInvalid { fn visit_mut_module(&mut self, module: &mut Module) { let mut rm = vec![]; for (idx, stmt) in module.body.iter_mut().enumerate().rev() { - if let ModuleItem::Stmt(Stmt::Expr(ExprStmt{ expr , ..})) = stmt && expr.is_invalid() { + if let ModuleItem::Stmt(Stmt::Expr(ExprStmt { expr, .. })) = stmt + && expr.is_invalid() + { rm.push(idx) } else { stmt.visit_mut_children_with(self); @@ -205,25 +210,25 @@ pub fn is_react_component( ) -> ReactComponentType { match expr { Expr::Fn(function) => { - if let Some(body) = &function.function.body && is_return_jsx(body.stmts.iter(), bindings) { + if let Some(body) = &function.function.body + && is_return_jsx(body.stmts.iter(), bindings) + { ReactComponentType::FC } else { ReactComponentType::None } - }, + } Expr::Arrow(array) => { let is_return_jsx = match &*array.body { - BlockStmtOrExpr::BlockStmt(block) => { - is_return_jsx(block.stmts.iter(), bindings) - }, - BlockStmtOrExpr::Expr(expr) => { - is_return_jsx([ - Stmt::Return(ReturnStmt { - span: DUMMY_SP, - arg: Some(expr.clone()), - }) - ].iter(), bindings) - }, + BlockStmtOrExpr::BlockStmt(block) => is_return_jsx(block.stmts.iter(), bindings), + BlockStmtOrExpr::Expr(expr) => is_return_jsx( + [Stmt::Return(ReturnStmt { + span: DUMMY_SP, + arg: Some(expr.clone()), + })] + .iter(), + bindings, + ), }; if is_return_jsx { @@ -231,19 +236,17 @@ pub fn is_react_component( } else { ReactComponentType::None } - }, + } Expr::Class(class_expr) => { let class = &class_expr.class; if let Some(super_class) = class.super_class.as_deref() { let is = match super_class { Expr::Member(_) => { - match_member(super_class, "React.Component") || - match_member(super_class, "React.PureComponent") - }, - Expr::Ident(ident) => { - ident.sym == COMPONENT_NAME || ident.sym == PURE_COMPONENT_NAME - }, - _ => false + match_member(super_class, "React.Component") + || match_member(super_class, "React.PureComponent") + } + Expr::Ident(ident) => ident.sym == COMPONENT_NAME || ident.sym == PURE_COMPONENT_NAME, + _ => false, }; if is { @@ -252,8 +255,8 @@ pub fn is_react_component( } ReactComponentType::None - }, - _ => ReactComponentType::None + } + _ => ReactComponentType::None, } } @@ -272,13 +275,17 @@ pub fn is_react_component_class( return true; } - if let Some(bindings) = bindings && bindings.contains_key(&super_class.to_id()) { + if let Some(bindings) = bindings + && bindings.contains_key(&super_class.to_id()) + { let maybe_class = bindings.get(&super_class.to_id()).unwrap(); if !maybe_class.re_assigned && maybe_class.init.is_some() { let is_react_class = match maybe_class.init.as_ref().unwrap() { - BindingInitKind::Expr(expr) => is_react_component(expr, Some(bindings)) == ReactComponentType::Class, - BindingInitKind::Class(class) => is_react_component_class(class, Some(bindings)), - BindingInitKind::Fn(_) => { false }, + BindingInitKind::Expr(expr) => { + is_react_component(expr, Some(bindings)) == ReactComponentType::Class + } + BindingInitKind::Class(class) => is_react_component_class(class, Some(bindings)), + BindingInitKind::Fn(_) => false, }; if is_react_class { @@ -357,8 +364,13 @@ pub fn is_jsx(expr: &Expr, bindings: Option<&HashMap>) -> bool Expr::Call(call_expr) => match &call_expr.callee { Callee::Expr(callee) => { let callee = get_real_expr(callee); - if let Some(ident) = callee.as_ident() && bindings.is_some() && bindings.unwrap().contains_key(&ident.to_id()) { - if let Some(BindingInitKind::Fn(function)) = &bindings.unwrap().get(&ident.to_id()).unwrap().init { + if let Some(ident) = callee.as_ident() + && bindings.is_some() + && bindings.unwrap().contains_key(&ident.to_id()) + { + if let Some(BindingInitKind::Fn(function)) = + &bindings.unwrap().get(&ident.to_id()).unwrap().init + { if let Some(body) = &function.body { return is_return_jsx(body.stmts.iter(), bindings); } @@ -370,7 +382,9 @@ pub fn is_jsx(expr: &Expr, bindings: Option<&HashMap>) -> bool _ => false, }, Expr::Ident(ident) => { - if let Some(bindings) = bindings && bindings.contains_key(&ident.to_id()) { + if let Some(bindings) = bindings + && bindings.contains_key(&ident.to_id()) + { let binding_info = bindings.get(&ident.to_id()).unwrap(); if let Some(BindingInitKind::Expr(expr)) = &binding_info.init { @@ -382,12 +396,14 @@ pub fn is_jsx(expr: &Expr, bindings: Option<&HashMap>) -> bool } Expr::Assign(assign) => match &*assign.right { Expr::Ident(right) => { - if let Some(bindings) = bindings && bindings.contains_key(&right.to_id()) { - let val = bindings.get(&right.to_id()).unwrap(); - if let Some(BindingInitKind::Expr(expr)) = &val.init { - return is_jsx(expr, Some(bindings)) - } + if let Some(bindings) = bindings + && bindings.contains_key(&right.to_id()) + { + let val = bindings.get(&right.to_id()).unwrap(); + if let Some(BindingInitKind::Expr(expr)) = &val.init { + return is_jsx(expr, Some(bindings)); } + } false } @@ -594,29 +610,53 @@ impl<'a> DetectReAssigned<'a> { binding_info.re_assigned = true; } } + + fn handle_pat(&mut self, pat: &Pat) { + match pat { + Pat::Ident(ident) => { + self.reassign_ident(ident); + } + Pat::Expr(expr) => { + if let Expr::Ident(ident) = expr.borrow() { + self.reassign_ident(ident); + } + } + // TODO handle complex assign + _ => {} + } + } } impl<'a> Visit for DetectReAssigned<'a> { fn visit_assign_expr(&mut self, assign_expr: &AssignExpr) { match &assign_expr.left { - PatOrExpr::Expr(expr) => { - if let Expr::Ident(ident) = expr.borrow() { - self.reassign_ident(ident); + AssignTarget::Simple(simple) => { + if let SimpleAssignTarget::Ident(BindingIdent { id, .. }) = simple { + self.reassign_ident(id) } } - PatOrExpr::Pat(pat) => { - match pat.borrow() { - Pat::Ident(ident) => { - self.reassign_ident(ident); + AssignTarget::Pat(assign_target) => { + match assign_target { + AssignTargetPat::Array(array_pat) => { + for ele in &array_pat.elems { + if let Some(ele) = &ele { + self.handle_pat(ele); + } + } } - Pat::Expr(expr) => { - if let Expr::Ident(ident) = expr.borrow() { - self.reassign_ident(ident); + AssignTargetPat::Object(object_pat) => { + for prop in &object_pat.props { + if let swc_core::ecma::ast::ObjectPatProp::KeyValue(key_value_prop) = prop { + if let Some(computed) = key_value_prop.key.as_computed() + && let Some(ident) = computed.expr.as_ident() + { + self.reassign_ident(ident); + } + } } } - // TODO handle complex assign - _ => {} - } + AssignTargetPat::Invalid(_) => {} + }; } } } diff --git a/packages/Cargo.lock b/packages/Cargo.lock index a96472a..781b4ca 100644 --- a/packages/Cargo.lock +++ b/packages/Cargo.lock @@ -64,11 +64,10 @@ checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "ast_node" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c09c69dffe06d222d072c878c3afe86eee2179806f20503faec97250268b4c24" +checksum = "c3e3e06ec6ac7d893a0db7127d91063ad7d9da8988f8a1a256f03729e6eec026" dependencies = [ - "pmutil", "proc-macro2", "quote", "swc_macros_common", @@ -331,11 +330,10 @@ dependencies = [ [[package]] name = "from_variant" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03ec5dc38ee19078d84a692b1c41181ff9f94331c76cee66ff0208c770b5e54f" +checksum = "3a0b11eeb173ce52f84ebd943d42e58813a2ebb78a6a3ff0a243b71c5199cd7b" dependencies = [ - "pmutil", "proc-macro2", "swc_macros_common", "syn 2.0.29", @@ -1108,22 +1106,11 @@ dependencies = [ "serde", ] -[[package]] -name = "sha-1" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -1211,11 +1198,10 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "string_enum" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fa4d4f81d7c05b9161f8de839975d3326328b8ba2831164b465524cc2f55252" +checksum = "1b650ea2087d32854a0f20b837fc56ec987a1cb4f758c9757e1171ee9812da63" dependencies = [ - "pmutil", "proc-macro2", "quote", "swc_macros_common", @@ -1266,9 +1252,9 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.33.10" +version = "0.33.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e9319d6d5df09497d920dbc51c937032ac6909a0df617998fe840c7bb8e74e0" +checksum = "cc30ce6695b841f0a9ae01a9ca10ac3922cff559a6253c756a203c4332c62945" dependencies = [ "anyhow", "ast_node", @@ -1298,9 +1284,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.86.94" +version = "0.90.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16275a7389398460fb73a33f50dd0ed74b8ce76143adf29a3c83dc24526310c1" +checksum = "8651aaebeb5a5c2b29af32cef6eac55861d0e475cdb76a6939c81786de0fce30" dependencies = [ "once_cell", "swc_atoms", @@ -1319,9 +1305,9 @@ dependencies = [ [[package]] name = "swc_ecma_ast" -version = "0.110.12" +version = "0.112.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "203463d666ff3a310ead733b31772e052307bdf967c110ee795f6b12ea2f1c78" +checksum = "032f528398358da8ff2fe795755602b4a81ffc93430b9830c0e1d5f198d8f48d" dependencies = [ "bitflags 2.4.0", "bytecheck", @@ -1338,9 +1324,9 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.146.39" +version = "0.148.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5c22286f9b72c7243a5db35e8a88da41478686a367edb7b81336f0e5006607" +checksum = "5e559384fa9bff4a915c18cbfc7851783846fcf2588585312c3df96a2f711007" dependencies = [ "memchr", "num-bigint", @@ -1357,11 +1343,10 @@ dependencies = [ [[package]] name = "swc_ecma_codegen_macros" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcdff076dccca6cc6a0e0b2a2c8acfb066014382bc6df98ec99e755484814384" +checksum = "394b8239424b339a12012ceb18726ed0244fce6bf6345053cb9320b2791dcaa5" dependencies = [ - "pmutil", "proc-macro2", "quote", "swc_macros_common", @@ -1370,9 +1355,9 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.141.30" +version = "0.143.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a0bd56a321b7e79ce7ef011b96323873f99b23e3ab1e5b78992abb6295d9b6e" +checksum = "6199c5748590a77511ff22784c3586103e57c47a2d5a0c17525924f44132382b" dependencies = [ "either", "new_debug_unreachable", @@ -1392,22 +1377,22 @@ dependencies = [ [[package]] name = "swc_ecma_testing" -version = "0.22.12" +version = "0.22.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e49b208173c8ca2e756bd77ff57676bdb8c56930af39eb820ec31d2b49aa16" +checksum = "5053453e9d7571e80eed154a0567392bc4e8a9021a5336890c301bb17fc6706c" dependencies = [ "anyhow", "hex", - "sha-1", + "sha2", "testing", "tracing", ] [[package]] name = "swc_ecma_transforms_base" -version = "0.134.51" +version = "0.137.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caa4e1b1b11f4250a7ad73a3d428c0dde43896f285e21f8c74940424efd748ad" +checksum = "2c36ec1188950c6f5b74fa751db8bcfc7bdd97f231287a34ed43b5fe0752f02d" dependencies = [ "better_scoped_tls", "bitflags 2.4.0", @@ -1428,9 +1413,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_testing" -version = "0.137.53" +version = "0.140.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf18d7cf048b2a6195d84d836a5bf1accbd19d1fb9317da37c44c627658e43b6" +checksum = "faa66370e89c9a156d5c75c0e5ad33f5e895b8ed3d07d1ea459ad6e7eb58b0b1" dependencies = [ "ansi_term", "anyhow", @@ -1438,7 +1423,7 @@ dependencies = [ "hex", "serde", "serde_json", - "sha-1", + "sha2", "sourcemap", "swc_common", "swc_ecma_ast", @@ -1454,9 +1439,9 @@ dependencies = [ [[package]] name = "swc_ecma_usage_analyzer" -version = "0.20.37" +version = "0.23.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc8ff30c1b4d743ee29d2d2004173d84170eef396347b73f74031bd29c24c8ba" +checksum = "f6ff1c851a55df4803e8bd56e9a3161b743203b4ef651ac2b1b4dc9b24df11fb" dependencies = [ "indexmap", "rustc-hash", @@ -1471,9 +1456,9 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.124.36" +version = "0.127.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b175acef1f52f2ae1bf2eb06ef707a232fced722149712db92da3abf77234b" +checksum = "fbe5ea2a95bea51461395cb4d7cfcbcb361562981d19cb502b7f90dff35364ac" dependencies = [ "indexmap", "num_cpus", @@ -1489,9 +1474,9 @@ dependencies = [ [[package]] name = "swc_ecma_visit" -version = "0.96.12" +version = "0.98.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176181c0b0a26c762462addae0c75065efb0ccbdbc5076f32f316e4f042732ce" +checksum = "889fc0ec3a9b55377e53e3d4ce06678247b635d7136c1e5d3a2c26578e16cd22" dependencies = [ "num-bigint", "swc_atoms", @@ -1503,11 +1488,10 @@ dependencies = [ [[package]] name = "swc_eq_ignore_macros" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05a95d367e228d52484c53336991fdcf47b6b553ef835d9159db4ba40efb0ee8" +checksum = "695a1d8b461033d32429b5befbf0ad4d7a2c4d6ba9cd5ba4e0645c615839e8e4" dependencies = [ - "pmutil", "proc-macro2", "quote", "syn 2.0.29", @@ -1515,9 +1499,9 @@ dependencies = [ [[package]] name = "swc_error_reporters" -version = "0.17.10" +version = "0.17.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf6f875540aa4bb5d0013adf3e89719187c6965dcbacd313fcdb447b01bcd86" +checksum = "df568fdbcfab1bfc9f9df62113da46cf82626ad2e67e1812bf3b76ca3d800f92" dependencies = [ "anyhow", "miette", @@ -1528,11 +1512,10 @@ dependencies = [ [[package]] name = "swc_macros_common" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a273205ccb09b51fabe88c49f3b34c5a4631c4c00a16ae20e03111d6a42e832" +checksum = "50176cfc1cbc8bb22f41c6fe9d1ec53fbe057001219b5954961b8ad0f336fce9" dependencies = [ - "pmutil", "proc-macro2", "quote", "syn 2.0.29", @@ -1571,9 +1554,9 @@ dependencies = [ [[package]] name = "swc_plugin_macro" -version = "0.9.15" +version = "0.9.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "785309d342a69df4c929ee59e14e36889ca832f1d2a3c1d03c47c93126c72dbc" +checksum = "3232db481484070637b20a155c064096c0ea1ba04fa2247b89b618661b3574f4" dependencies = [ "proc-macro2", "quote", @@ -1582,9 +1565,9 @@ dependencies = [ [[package]] name = "swc_plugin_proxy" -version = "0.39.12" +version = "0.41.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32ac939558e08e9d354a95b1910f6f24a384ad86c9806f58c28d2e18fbd7d366" +checksum = "c5488302a4e79ae658b6bacd691385e88836276c81dc7abde31d67f0f2ae7425" dependencies = [ "better_scoped_tls", "rkyv", @@ -1605,9 +1588,9 @@ dependencies = [ [[package]] name = "swc_timer" -version = "0.21.12" +version = "0.21.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13f71e40664ab7bc9aad7739a5415329c8179af715fe11af3651e70d20d0fbb4" +checksum = "b589033a4387ea540b2e9c3e84e45b1e831e7b16dc301f27d4c9cd492099cdee" dependencies = [ "tracing", ] @@ -1625,9 +1608,9 @@ dependencies = [ [[package]] name = "swc_visit" -version = "0.5.7" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e87c337fbb2d191bf371173dea6a957f01899adb8f189c6c31b122a6cfc98fc3" +checksum = "3f5b3e8d1269a7cb95358fed3412645d9c15aa0eb1f4ca003a25a38ef2f30f1b" dependencies = [ "either", "swc_visit_macros", @@ -1635,12 +1618,11 @@ dependencies = [ [[package]] name = "swc_visit_macros" -version = "0.5.8" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f322730fb82f3930a450ac24de8c98523af7d34ab8cb2f46bcb405839891a99" +checksum = "33fc817055fe127b4285dc85058596768bfde7537ae37da82c67815557f03e33" dependencies = [ "Inflector", - "pmutil", "proc-macro2", "quote", "swc_macros_common", @@ -1709,9 +1691,9 @@ dependencies = [ [[package]] name = "testing" -version = "0.35.12" +version = "0.35.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62252c09b891f3f30966a32a564b976aa3cb867fb25367d2ce61f971ae67c87a" +checksum = "fff8bc163dd91547a6cb0ad5e32c8b19e0f1bc607031c81726d57c56d21609e0" dependencies = [ "ansi_term", "cargo_metadata", @@ -1730,14 +1712,13 @@ dependencies = [ [[package]] name = "testing_macros" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1c15b796025051a07f1ac695ee0cac0883f05a0d510c9d171ef8d31a992e6a5" +checksum = "f9d3864d4184569c1428645a51a304b3b6e8d3094cd61fb3cce8dfdd9f6d0f72" dependencies = [ "anyhow", "glob", "once_cell", - "pmutil", "proc-macro2", "quote", "regex", diff --git a/packages/Cargo.toml b/packages/Cargo.toml index dd37bab..0adb9b7 100644 --- a/packages/Cargo.toml +++ b/packages/Cargo.toml @@ -21,4 +21,4 @@ anyhow = { version = "1.0.69" } dashmap = { version = "5.4.0" } serde = "1.0.163" serde_json = "1.0.91" -swc_core = { version = "0.86.94", default-features = false } +swc_core = { version = "0.90.22", default-features = false } diff --git a/packages/rust-toolchain b/packages/rust-toolchain index cf53f1c..47efb4b 100644 --- a/packages/rust-toolchain +++ b/packages/rust-toolchain @@ -1 +1 @@ -nightly-2023-07-03 \ No newline at end of file +nightly-2023-12-28 \ No newline at end of file diff --git a/rust-toolchain b/rust-toolchain index cf53f1c..47efb4b 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2023-07-03 \ No newline at end of file +nightly-2023-12-28 \ No newline at end of file