From 96eee8aa114cd44f006d04825bc5a66e20dce6b6 Mon Sep 17 00:00:00 2001 From: chenyulun390 Date: Fri, 1 Nov 2024 10:21:26 +0800 Subject: [PATCH 1/2] feat(): update swc --- .cargo/{config => config.toml} | 2 +- Cargo.lock | 2026 ++++++++++++++++++-------------- Cargo.toml | 6 +- folder/Cargo.toml | 4 +- folder/src/lib.rs | 1 - folder/src/visitor.rs | 83 +- folder/src/visitor_helpers.rs | 71 +- package.json | 4 +- playground/Cargo.toml | 8 +- playground/src/lib.rs | 30 +- 10 files changed, 1280 insertions(+), 955 deletions(-) rename .cargo/{config => config.toml} (80%) diff --git a/.cargo/config b/.cargo/config.toml similarity index 80% rename from .cargo/config rename to .cargo/config.toml index eaa0fee..2b377d0 100644 --- a/.cargo/config +++ b/.cargo/config.toml @@ -1,5 +1,5 @@ # These command aliases are not final, may change [alias] # Alias to build actual plugin binary for the specified target. -build-wasi = "build --target wasm32-wasi" +build-wasi = "build --target wasm32-wasip1" build-wasm32 = "build --target wasm32-unknown-unknown" diff --git a/Cargo.lock b/Cargo.lock index c1e6983..609035c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,30 +13,28 @@ dependencies = [ ] [[package]] -name = "addr2line" -version = "0.17.0" +name = "ahash" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "gimli", + "getrandom", + "once_cell", + "version_check", ] -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "ahash" -version = "0.7.6" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ + "cfg-if 1.0.0", "getrandom", "once_cell", "serde", "version_check", + "zerocopy", ] [[package]] @@ -48,6 +46,27 @@ dependencies = [ "memchr", ] +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -68,51 +87,37 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.65" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602" +checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "ast_node" -version = "0.8.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf94863c5fdfee166d0907c44e5fee970123b2b7307046d35d1e671aa93afbba" +checksum = "f4d23a6d1d5f18bdbc06d9aa908880e5f49205156ba804751af731c51f5cf81a" dependencies = [ - "darling", - "pmutil", "proc-macro2", "quote", "swc_macros_common", - "syn", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", + "syn 2.0.85", ] [[package]] name = "auto_impl" -version = "0.5.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7862e21c893d65a1650125d157eaeec691439379a1cee17ee49031b79236ada4" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ - "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 2.0.85", ] [[package]] @@ -122,40 +127,46 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] -name = "backtrace" -version = "0.3.66" +name = "base64" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7" -dependencies = [ - "addr2line", - "cc", - "cfg-if 1.0.0", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] -name = "base64" -version = "0.13.0" +name = "base64-simd" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "781dd20c3aff0bd194fe7d2a977dd92f21c173891f3a03b677359e5fa457e5d5" +dependencies = [ + "simd-abstraction", +] [[package]] name = "better_scoped_tls" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b73e8ecdec39e98aa3b19e8cd0b8ed8f77ccb86a6b0b2dc7cd86d105438a2123" +checksum = "297b153aa5e573b5863108a6ddc9d5c968bd0b20e75cc614ee9821d2f45679c7" dependencies = [ "scoped-tls", ] [[package]] name = "bitflags" -version = "1.3.2" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + +[[package]] +name = "bitvec" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] [[package]] name = "block-buffer" @@ -168,26 +179,20 @@ dependencies = [ [[package]] name = "browserslist-rs" -version = "0.11.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c689fb4e42bd511c1927856b078d8a582690f5be196199d1c9005b9d4feae8c" +checksum = "fdf0ca73de70c3da94e4194e4a01fe732378f55d47cf4c0588caab22a0dbfa14" dependencies = [ - "ahash", - "anyhow", + "ahash 0.8.11", "chrono", "either", + "indexmap 2.6.0", "itertools", - "js-sys", "nom", "once_cell", - "quote", "serde", - "serde-wasm-bindgen", "serde_json", - "string_cache", - "string_cache_codegen", "thiserror", - "wasm-bindgen", ] [[package]] @@ -201,29 +206,71 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.11.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +dependencies = [ + "allocator-api2", +] [[package]] name = "bytecheck" -version = "0.6.9" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d11cac2c12b5adc6570dad2ee1b87eff4955dac476fe12d81e5fdd352e52406f" +checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" dependencies = [ "bytecheck_derive", "ptr_meta", + "simdutf8", ] [[package]] name = "bytecheck_derive" -version = "0.6.9" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e576ebe98e605500b3c8041bb888e966653577172df6dd97398714eb30b9bf" +checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.101", +] + +[[package]] +name = "bytes" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" + +[[package]] +name = "camino" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver 1.0.23", + "serde", + "serde_json", + "thiserror", ] [[package]] @@ -246,17 +293,14 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.22" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfd4d1b31faaa3a89d7934dbded3111da0d2ef28e3ebccdb4f0179f5929d1ef1" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ + "android-tzdata", "iana-time-zone", - "js-sys", - "num-integer", "num-traits", - "time 0.1.44", - "wasm-bindgen", - "winapi", + "windows-targets", ] [[package]] @@ -284,16 +328,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crossbeam-channel" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils", -] - [[package]] name = "crossbeam-deque" version = "0.8.2" @@ -344,14 +378,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdffe87e1d521a10f9696f833fe502293ea446d7f256c06128293a4119bdf4cb" dependencies = [ "quote", - "syn", + "syn 1.0.101", ] [[package]] name = "darling" -version = "0.13.4" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ "darling_core", "darling_macro", @@ -359,49 +393,87 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.13.4" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn", + "syn 2.0.85", ] [[package]] name = "darling_macro" -version = "0.13.4" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn", + "syn 2.0.85", ] [[package]] name = "dashmap" -version = "5.4.0" +version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if 1.0.0", - "hashbrown", + "hashbrown 0.14.5", "lock_api", "once_cell", "parking_lot_core", ] [[package]] -name = "debug_unreachable" -version = "0.1.1" +name = "data-encoding" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" + +[[package]] +name = "debugid" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" +dependencies = [ + "serde", + "uuid", +] + +[[package]] +name = "derive_builder" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.85", +] + +[[package]] +name = "derive_builder_macro" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a032eac705ca39214d169f83e3d3da290af06d8d1d344d1baad2fd002dca4b3" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ - "unreachable", + "derive_builder_core", + "syn 2.0.85", ] [[package]] @@ -418,9 +490,9 @@ checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" [[package]] name = "digest" -version = "0.10.5" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adfbc57365a37acbd2ebf2b64d7e69bb766e2fea813521ed536f5d0520dcf86c" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", @@ -428,50 +500,31 @@ dependencies = [ [[package]] name = "either" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" - -[[package]] -name = "enum-iterator" -version = "1.1.3" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a0ac4aeb3a18f92eaf09c6bb9b3ac30ff61ca95514fc58cbead1c9a6bf5401" -dependencies = [ - "enum-iterator-derive", -] +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] -name = "enum-iterator-derive" -version = "1.1.0" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "828de45d0ca18782232dfb8f3ea9cc428e8ced380eb26a520baaacfc70de39ce" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] -name = "enum_kind" -version = "0.2.1" +name = "errno" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b940da354ae81ef0926c5eaa428207b8f4f091d3956c891dfbd124162bed99" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ - "pmutil", - "proc-macro2", - "swc_macros_common", - "syn", + "libc", + "windows-sys 0.52.0", ] [[package]] name = "fastrand" -version = "1.8.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" -dependencies = [ - "instant", -] +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fixedbitset" @@ -487,25 +540,30 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] [[package]] name = "from_variant" -version = "0.1.4" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0981e470d2ab9f643df3921d54f1952ea100c39fdb6a3fdc820e20d2291df6c" +checksum = "e8d8947525c49c73130b5a7187b55b027b6b78fe60268d9f4c283ed690698cb1" dependencies = [ - "pmutil", "proc-macro2", "swc_macros_common", - "syn", + "syn 2.0.85", ] +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + [[package]] name = "generic-array" version = "0.14.6" @@ -524,27 +582,9 @@ checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" dependencies = [ "cfg-if 1.0.0", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getset" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e45727250e75cc04ff2846a66397da8ef2b3db8e40e0cef4df67950a07621eb9" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn", + "wasi", ] -[[package]] -name = "gimli" -version = "0.26.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" - [[package]] name = "glob" version = "0.3.0" @@ -557,7 +597,7 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a1e17342619edbc21a964c2afbeb6c820c6a2560032872f397bb97ea127bd0a" dependencies = [ - "aho-corasick", + "aho-corasick 0.7.19", "bstr", "fnv", "log", @@ -570,9 +610,34 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash", + "ahash 0.7.6", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.11", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash 0.8.11", + "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -588,6 +653,20 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hstr" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dae404c0c5d4e95d4858876ab02eecd6a196bb8caa42050dfa809938833fc412" +dependencies = [ + "hashbrown 0.14.5", + "new_debug_unreachable", + "once_cell", + "phf", + "rustc-hash", + "triomphe", +] + [[package]] name = "iana-time-zone" version = "0.1.50" @@ -609,9 +688,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -630,43 +709,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ "autocfg", - "hashbrown", - "serde", + "hashbrown 0.12.3", ] [[package]] -name = "instant" -version = "0.1.12" +name = "indexmap" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ - "cfg-if 1.0.0", + "equivalent", + "hashbrown 0.15.0", + "serde", ] [[package]] name = "is-macro" -version = "0.2.1" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c068d4c6b922cd6284c609cfa6dec0e41615c9c5a1a4ba729a970d8daba05fb" +checksum = "2069faacbe981460232f880d26bf3c7634e322d49053aa48c27e3ae642f728f1" dependencies = [ "Inflector", - "pmutil", "proc-macro2", "quote", - "syn", + "syn 2.0.85", ] -[[package]] -name = "is_ci" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616cde7c720bb2bb5824a224687d8f77bfd38922027f01d825cd7453be5099fb" - [[package]] name = "itertools" -version = "0.10.5" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] @@ -687,10 +760,13 @@ dependencies = [ ] [[package]] -name = "json_comments" -version = "0.2.1" +name = "jsonc-parser" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ee439ee368ba4a77ac70d04f14015415af8600d6c894dc1f11bd79758c57d5" +checksum = "7b56a20e76235284255a09fcd1f45cf55d3c524ea657ebd3854735925c57743d" +dependencies = [ + "serde_json", +] [[package]] name = "lazy_static" @@ -699,138 +775,71 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] -name = "lexical" -version = "6.1.1" +name = "libc" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7aefb36fd43fef7003334742cbf77b243fcd36418a1d1bdd480d613a67968f6" -dependencies = [ - "lexical-core", -] +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] -name = "lexical-core" -version = "0.8.5" +name = "linked-hash-map" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46" -dependencies = [ - "lexical-parse-float", - "lexical-parse-integer", - "lexical-util", - "lexical-write-float", - "lexical-write-integer", -] +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] -name = "lexical-parse-float" -version = "0.8.5" +name = "linux-raw-sys" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" -dependencies = [ - "lexical-parse-integer", - "lexical-util", - "static_assertions", -] +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] -name = "lexical-parse-integer" -version = "0.8.6" +name = "lock_api" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ - "lexical-util", - "static_assertions", + "autocfg", + "scopeguard", ] [[package]] -name = "lexical-util" -version = "0.8.5" +name = "log" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "static_assertions", + "cfg-if 1.0.0", ] [[package]] -name = "lexical-write-float" -version = "0.8.5" +name = "lru" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862" +checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" dependencies = [ - "lexical-util", - "lexical-write-integer", - "static_assertions", + "hashbrown 0.13.2", ] [[package]] -name = "lexical-write-integer" -version = "0.8.5" +name = "matchers" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" dependencies = [ - "lexical-util", - "static_assertions", + "regex-automata 0.1.10", ] [[package]] -name = "libc" -version = "0.2.134" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "329c933548736bc49fd575ee68c89e8be4d260064184389a5b77517cddd99ffb" - -[[package]] -name = "linked-hash-map" -version = "0.5.6" +name = "memchr" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] -name = "lock_api" -version = "0.4.9" +name = "memoffset" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "lru" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" -dependencies = [ - "hashbrown", -] - -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata", -] - -[[package]] -name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ "autocfg", ] @@ -843,19 +852,13 @@ checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" [[package]] name = "miette" -version = "4.7.1" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c90329e44f9208b55f45711f9558cec15d7ef8295cc65ecd6d4188ae8edc58c" +checksum = "4edc8853320c2a0dab800fbda86253c8938f6ea88510dc92c5f1ed20e794afc1" dependencies = [ - "atty", - "backtrace", + "cfg-if 1.0.0", "miette-derive", - "once_cell", "owo-colors", - "supports-color", - "supports-hyperlinks", - "supports-unicode", - "terminal_size", "textwrap", "thiserror", "unicode-width", @@ -863,13 +866,13 @@ dependencies = [ [[package]] name = "miette-derive" -version = "4.7.1" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b5bc45b761bcf1b5e6e6c4128cd93b84c218721a8d9b894aa0aff4ed180174c" +checksum = "dcf09caffaac8068c346b6df2a7fc27a177fd20b39421a39ce0a211bde679a6c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.85", ] [[package]] @@ -878,20 +881,11 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" -dependencies = [ - "adler", -] - [[package]] name = "new_debug_unreachable" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] name = "nom" @@ -912,6 +906,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + [[package]] name = "num-bigint" version = "0.4.3" @@ -954,52 +958,37 @@ dependencies = [ ] [[package]] -name = "num_threads" -version = "0.1.6" +name = "once_cell" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" -dependencies = [ - "libc", -] +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] -name = "object" -version = "0.29.0" +name = "output_vt100" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" +checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" dependencies = [ - "memchr", + "winapi", ] [[package]] -name = "once_cell" -version = "1.15.0" +name = "outref" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" +checksum = "7f222829ae9293e33a9f5e9f440c6760a3d450a64affe1846486b140db81c1f4" [[package]] -name = "ordered-float" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7940cf2ca942593318d07fcf2596cdca60a85c9e7fab408a5e21a4f9dcd40d87" -dependencies = [ - "num-traits", -] - -[[package]] -name = "output_vt100" -version = "0.1.3" +name = "overload" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" -dependencies = [ - "winapi", -] +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "owo-colors" -version = "3.5.0" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" +checksum = "fb37767f6569cd834a413442455e0f066d0d522de8630436e2a1761d9726ba56" [[package]] name = "parking_lot" @@ -1013,15 +1002,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.3" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if 1.0.0", "libc", "redox_syscall", "smallvec", - "windows-sys", + "windows-targets", ] [[package]] @@ -1030,6 +1019,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ecba01bf2678719532c5e3059e0b5f0811273d94b397088b82e3bd0a78c78fdd" +[[package]] +name = "path-clean" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17359afc20d7ab31fdb42bb844c8b3bb1dabd7dcf7e68428492da7f16966fcef" + [[package]] name = "pathdiff" version = "0.2.1" @@ -1038,9 +1033,9 @@ checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "petgraph" @@ -1049,25 +1044,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143" dependencies = [ "fixedbitset", - "indexmap", + "indexmap 1.9.1", ] [[package]] name = "phf" -version = "0.10.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ "phf_macros", "phf_shared", - "proc-macro-hack", ] [[package]] name = "phf_generator" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ "phf_shared", "rand", @@ -1075,23 +1069,22 @@ dependencies = [ [[package]] name = "phf_macros" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" dependencies = [ "phf_generator", "phf_shared", - "proc-macro-hack", "proc-macro2", "quote", - "syn", + "syn 2.0.85", ] [[package]] name = "phf_shared" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ "siphasher", ] @@ -1121,42 +1114,19 @@ dependencies = [ "wee_alloc", ] -[[package]] -name = "pmutil" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3894e5d549cccbe44afecf72922f277f603cd4bb0219c8342631ef18fffbe004" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" - -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - [[package]] name = "preset_env_base" -version = "0.3.2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "371fa3d5cd3a90724d8e8ad1e3201854dded11e79b5365dabd5e1e389274d001" +checksum = "1aaeaf4147a07c6615d43fce02d8139e1f835e6ee53e69db2a4810823c138c26" dependencies = [ - "ahash", + "ahash 0.8.11", "anyhow", "browserslist-rs", "dashmap", "from_variant", "once_cell", - "semver 1.0.14", + "semver 1.0.23", "serde", "st-map", "tracing", @@ -1175,42 +1145,21 @@ dependencies = [ ] [[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" +name = "proc-macro2" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ - "proc-macro2", - "quote", - "version_check", + "unicode-ident", ] [[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - -[[package]] -name = "proc-macro2" -version = "1.0.46" +name = "psm" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94e2ef8dbfc347b10c094890f778ee2e36ca9bb4262e86dc99cd217e35f3470b" +checksum = "aa37f80ca58604976033fae9515a8a2989fc13797d953f7c04fb8fa36a11f205" dependencies = [ - "unicode-ident", + "cc", ] [[package]] @@ -1230,36 +1179,36 @@ checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.101", ] [[package]] name = "quote" -version = "1.0.21" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] [[package]] -name = "rand" -version = "0.8.5" +name = "radium" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" [[package]] -name = "rand_chacha" -version = "0.3.1" +name = "radix_fmt" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce082a9940a7ace2ad4a8b7d0b1eac6aa378895f18be598230c5f2284ac05426" + +[[package]] +name = "rand" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ - "ppv-lite86", "rand_core", ] @@ -1268,52 +1217,46 @@ name = "rand_core" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] [[package]] name = "rayon" -version = "1.5.3" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ - "autocfg", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.3" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags", ] [[package]] name = "regex" -version = "1.6.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ - "aho-corasick", + "aho-corasick 1.1.3", "memchr", - "regex-syntax", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", ] [[package]] @@ -1322,7 +1265,18 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" dependencies = [ - "regex-syntax", + "regex-syntax 0.6.27", +] + +[[package]] +name = "regex-automata" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +dependencies = [ + "aho-corasick 1.1.3", + "memchr", + "regex-syntax 0.8.5", ] [[package]] @@ -1332,66 +1286,55 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" [[package]] -name = "relative-path" -version = "1.7.2" +name = "regex-syntax" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0df32d82cedd1499386877b062ebe8721f806de80b08d183c70184ef17dd1d42" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] -name = "remove_dir_all" -version = "0.5.3" +name = "relative-path" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] +checksum = "0df32d82cedd1499386877b062ebe8721f806de80b08d183c70184ef17dd1d42" [[package]] name = "rend" -version = "0.3.6" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79af64b4b6362ffba04eef3a4e10829718a4896dac19daa741851c86781edf95" +checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" dependencies = [ "bytecheck", ] -[[package]] -name = "retain_mut" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4389f1d5789befaf6029ebd9f7dac4af7f7e3d61b69d4f30e2ac02b57e7712b0" - [[package]] name = "rkyv" -version = "0.7.37" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f08c8062c1fe1253064043b8fc07bfea1b9702b71b4a86c11ea3588183b12e1" +checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" dependencies = [ + "bitvec", "bytecheck", - "hashbrown", + "bytes", + "hashbrown 0.12.3", "ptr_meta", "rend", "rkyv_derive", "seahash", + "tinyvec", + "uuid", ] [[package]] name = "rkyv_derive" -version = "0.7.37" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e289706df51226e84814bf6ba1a9e1013112ae29bc7a9878f73fce360520c403" +checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.101", ] -[[package]] -name = "rustc-demangle" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" - [[package]] name = "rustc-hash" version = "1.1.0" @@ -1407,11 +1350,24 @@ dependencies = [ "semver 0.9.0", ] +[[package]] +name = "rustix" +version = "0.38.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa260229e6538e52293eeb577aabd09945a09d6d9cc0fc550ed7529056c2e32a" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + [[package]] name = "rustversion" -version = "1.0.9" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "ryu" @@ -1419,11 +1375,17 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" +[[package]] +name = "ryu-js" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad97d4ce1560a5e27cec89519dc8300d1aa6035b099821261c651486a19e44d5" + [[package]] name = "scoped-tls" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" @@ -1448,9 +1410,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.14" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ "serde", ] @@ -1463,9 +1425,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.145" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" dependencies = [ "serde_derive", ] @@ -1483,31 +1445,43 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.145" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.85", ] [[package]] name = "serde_json" -version = "1.0.85" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] [[package]] -name = "sha-1" -version = "0.10.0" +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if 1.0.0", "cpufeatures", @@ -1523,6 +1497,21 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "simd-abstraction" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cadb29c57caadc51ff8346233b5cec1d240b68ce55cf1afc764818791876987" +dependencies = [ + "outref", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + [[package]] name = "siphasher" version = "0.3.10" @@ -1535,6 +1524,17 @@ version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +[[package]] +name = "smartstring" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29" +dependencies = [ + "autocfg", + "static_assertions", + "version_check", +] + [[package]] name = "smawk" version = "0.3.1" @@ -1543,25 +1543,28 @@ checksum = "f67ad224767faa3c7d8b6d91985b78e70a1324408abcb1cfcc2be4c06bc06043" [[package]] name = "sourcemap" -version = "6.2.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c46fdc1838ff49cf692226f5c2b0f5b7538f556863d0eca602984714667ac6e7" +checksum = "dab08a862c70980b8e23698b507e272317ae52a608a164a844111f5372374f1f" dependencies = [ - "base64", + "base64-simd", + "bitvec", + "data-encoding", + "debugid", "if_chain", - "lazy_static", - "regex", + "rustc-hash", "rustc_version", "serde", "serde_json", + "unicode-id-start", "url", ] [[package]] name = "st-map" -version = "0.1.6" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc9c9f3a1df5f73b7392bd9773108fef41ad9126f0282412fd5904389f0c0c4f" +checksum = "8257dd592de7614be71a2342d36ba2d527ddad3f9a0c8d09d6ceed4c371531e4" dependencies = [ "arrayvec", "static-map-macro", @@ -1573,16 +1576,28 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +[[package]] +name = "stacker" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799c883d55abdb5e98af1a7b3f23b9b6de8ecada0ecac058672d7635eb48ca7b" +dependencies = [ + "cc", + "cfg-if 1.0.0", + "libc", + "psm", + "windows-sys 0.59.0", +] + [[package]] name = "static-map-macro" -version = "0.2.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "752564de9cd8937fdbc1c55d47ac391758c352ab3755607cc391b659fe87d56b" +checksum = "710e9696ef338691287aeb937ee6ffe60022f579d3c8d2fd9d58973a9a10a466" dependencies = [ - "pmutil", "proc-macro2", "quote", - "syn", + "syn 2.0.85", ] [[package]] @@ -1591,92 +1606,36 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "string_cache" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213494b7a2b503146286049378ce02b482200519accc31872ee8be91fa820a08" -dependencies = [ - "new_debug_unreachable", - "once_cell", - "parking_lot", - "phf_shared", - "precomputed-hash", - "serde", -] - -[[package]] -name = "string_cache_codegen" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" -dependencies = [ - "phf_generator", - "phf_shared", - "proc-macro2", - "quote", -] - [[package]] name = "string_enum" -version = "0.3.1" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f584cc881e9e5f1fd6bf827b0444aa94c30d8fe6378cf241071b5f5700b2871f" +checksum = "05e383308aebc257e7d7920224fa055c632478d92744eca77f99be8fa1545b90" dependencies = [ - "pmutil", "proc-macro2", "quote", "swc_macros_common", - "syn", + "syn 2.0.85", ] [[package]] name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "supports-color" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4872ced36b91d47bae8a214a683fe54e7078875b399dfa251df346c9b547d1f9" -dependencies = [ - "atty", - "is_ci", -] - -[[package]] -name = "supports-hyperlinks" -version = "1.2.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "590b34f7c5f01ecc9d78dba4b3f445f31df750a67621cf31626f3b7441ce6406" -dependencies = [ - "atty", -] - -[[package]] -name = "supports-unicode" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8b945e45b417b125a8ec51f1b7df2f8df7920367700d1f98aedd21e5735f8b2" -dependencies = [ - "atty", -] +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "swc" -version = "0.226.34" +version = "0.290.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c3530bd683f2331cf9b869ef26fafec4999a11c5fa50d2b74604b2a03a3dde1" +checksum = "65928b3a6abe08e6b49d5c55ffa079e973e62796ad4e2ffaaa1df12068141d12" dependencies = [ - "ahash", "anyhow", "base64", "dashmap", "either", - "indexmap", - "json_comments", + "indexmap 2.6.0", + "jsonc-parser", "lru", "once_cell", "parking_lot", @@ -1689,6 +1648,7 @@ dependencies = [ "swc_atoms", "swc_cached", "swc_common", + "swc_compiler_base", "swc_config", "swc_ecma_ast", "swc_ecma_codegen", @@ -1707,55 +1667,69 @@ dependencies = [ "swc_error_reporters", "swc_node_comments", "swc_timer", + "swc_transform_common", + "swc_typescript", "swc_visit", "tracing", + "url", +] + +[[package]] +name = "swc_allocator" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76aa0eb65c0f39f9b6d82a7e5192c30f7ac9a78f084a21f270de1d8c600ca388" +dependencies = [ + "bumpalo", + "hashbrown 0.14.5", + "ptr_meta", + "rustc-hash", + "triomphe", ] [[package]] name = "swc_atoms" -version = "0.4.18" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da6caaa52367e268c7507a6723a5cffa03c78df8b0bdf3c8af3475eb99418b69" +checksum = "b25ff0f3fd48ab1a95d86fd0505fdd1ac904f84d0350dc8222bbc824e9d4fdf6" dependencies = [ + "bytecheck", + "hstr", "once_cell", "rkyv", "rustc-hash", "serde", - "string_cache", - "string_cache_codegen", - "triomphe", ] [[package]] name = "swc_cached" -version = "0.3.14" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb9e461aba8d2d5b94c94499af5c7a4a8aa4a93a1e3672b7b205248cd98a87f" +checksum = "83406221c501860fce9c27444f44125eafe9e598b8b81be7563d7036784cd05c" dependencies = [ - "ahash", + "ahash 0.8.11", "anyhow", "dashmap", "once_cell", "regex", "serde", - "swc_atoms", ] [[package]] name = "swc_common" -version = "0.28.10" +version = "0.40.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3926afd43f50edea791744d97d5fa38bde997978531d36ed507b2b908f920695" +checksum = "ca32839a37f3b12213b18623b1bd58d37641cab750c50c3c287876cb98b12ab4" dependencies = [ - "ahash", + "ahash 0.8.11", "anyhow", "ast_node", - "atty", "better_scoped_tls", + "bytecheck", "cfg-if 1.0.0", - "debug_unreachable", "either", "from_variant", + "new_debug_unreachable", "num-bigint", "once_cell", "parking_lot", @@ -1764,7 +1738,7 @@ dependencies = [ "serde", "siphasher", "sourcemap", - "string_cache", + "swc_allocator", "swc_atoms", "swc_eq_ignore_macros", "swc_visit", @@ -1774,111 +1748,336 @@ dependencies = [ "url", ] +[[package]] +name = "swc_compiler_base" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e70a05e62eaf316a0ba25aaaacfaa009b12f69d91cbe6b345ca295ecd1f3912" +dependencies = [ + "anyhow", + "base64", + "once_cell", + "pathdiff", + "rustc-hash", + "serde", + "serde_json", + "sourcemap", + "swc_allocator", + "swc_atoms", + "swc_common", + "swc_config", + "swc_ecma_ast", + "swc_ecma_codegen", + "swc_ecma_minifier", + "swc_ecma_parser", + "swc_ecma_visit", + "swc_timer", +] + [[package]] name = "swc_config" -version = "0.1.2" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc17721410f3f12aeb42dcb99528350adf122681ab4796e48c2cfc0bda0c752c" +checksum = "4740e53eaf68b101203c1df0937d5161a29f3c13bceed0836ddfe245b72dd000" dependencies = [ "anyhow", - "indexmap", + "indexmap 2.6.0", "serde", "serde_json", + "sourcemap", + "swc_cached", "swc_config_macro", ] [[package]] name = "swc_config_macro" -version = "0.1.0" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c5f56139042c1a95b54f5ca48baa0e0172d369bcc9d3d473dad1de36bae8399" +dependencies = [ + "proc-macro2", + "quote", + "swc_macros_common", + "syn 2.0.85", +] + +[[package]] +name = "swc_core" +version = "0.109.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abb1f322c79d2e0112f1c89b26a6e7c9e37548403a0dbedff322e1410a19568c" +dependencies = [ + "once_cell", + "swc", + "swc_allocator", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_codegen", + "swc_ecma_parser", + "swc_ecma_quote_macros", + "swc_ecma_transforms_base", + "swc_ecma_transforms_testing", + "swc_ecma_utils", + "swc_ecma_visit", + "swc_plugin", + "swc_plugin_macro", + "swc_plugin_proxy", + "vergen", +] + +[[package]] +name = "swc_ecma_ast" +version = "0.121.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84d568834a727fc06c608db119dcea52c2d58e9426e92e72f358e2f7dc847063" +dependencies = [ + "bitflags", + "bytecheck", + "is-macro", + "num-bigint", + "phf", + "rkyv", + "scoped-tls", + "serde", + "string_enum", + "swc_atoms", + "swc_common", + "unicode-id-start", +] + +[[package]] +name = "swc_ecma_codegen" +version = "0.158.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb64bc03d90fd5c90d6ab917bb2b1d7fbd31957df39e31ea24a3f554b4372251" +checksum = "e2549dd7b0f4db0b127fe286958f749b4e2d5467cb6739a78ac887df4f33dcef" +dependencies = [ + "memchr", + "num-bigint", + "once_cell", + "regex", + "serde", + "sourcemap", + "swc_allocator", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_codegen_macros", + "tracing", +] + +[[package]] +name = "swc_ecma_codegen_macros" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "859fabde36db38634f3fad548dd5e3410c1aebba1b67a3c63e67018fa57a0bca" dependencies = [ - "pmutil", "proc-macro2", "quote", "swc_macros_common", - "syn", + "syn 2.0.85", +] + +[[package]] +name = "swc_ecma_compat_bugfixes" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "204c0589ec432f795f3e38574244163d2288a0444ce7f499aa0b256a2346aeea" +dependencies = [ + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_compat_es2015", + "swc_ecma_transforms_base", + "swc_ecma_utils", + "swc_ecma_visit", + "swc_trace_macro", + "tracing", +] + +[[package]] +name = "swc_ecma_compat_common" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaa58f04f0ede7d44939974aa0795198aedb4a021cb0e56a977465f5a9ee6832" +dependencies = [ + "swc_common", + "swc_ecma_ast", + "swc_ecma_utils", + "swc_ecma_visit", + "swc_trace_macro", +] + +[[package]] +name = "swc_ecma_compat_es2015" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "193d25320c12f73f111bd12159519d2fa3aeb3d15cbb1f729882d48e71ce2443" +dependencies = [ + "arrayvec", + "indexmap 2.6.0", + "is-macro", + "rustc-hash", + "serde", + "serde_derive", + "smallvec", + "swc_atoms", + "swc_common", + "swc_config", + "swc_ecma_ast", + "swc_ecma_compat_common", + "swc_ecma_transforms_base", + "swc_ecma_transforms_classes", + "swc_ecma_transforms_macros", + "swc_ecma_utils", + "swc_ecma_visit", + "swc_trace_macro", + "tracing", +] + +[[package]] +name = "swc_ecma_compat_es2016" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a17adff62889cac35a5ac6099777ae20eaef603d0052c1a0e3ef8ac45412a543" +dependencies = [ + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_transforms_base", + "swc_ecma_transforms_macros", + "swc_ecma_utils", + "swc_ecma_visit", + "swc_trace_macro", + "tracing", +] + +[[package]] +name = "swc_ecma_compat_es2017" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a4f3c82273be28af3fb96e6b9a0f60218923c5923189e7f04050586be83e05b" +dependencies = [ + "serde", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_transforms_base", + "swc_ecma_transforms_macros", + "swc_ecma_utils", + "swc_ecma_visit", + "swc_trace_macro", + "tracing", +] + +[[package]] +name = "swc_ecma_compat_es2018" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dbed7700a811364d673ddaa4b2aa2e40033baa0264fc4dafbd67c08a711833a" +dependencies = [ + "serde", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_compat_common", + "swc_ecma_transforms_base", + "swc_ecma_transforms_macros", + "swc_ecma_utils", + "swc_ecma_visit", + "swc_trace_macro", + "tracing", +] + +[[package]] +name = "swc_ecma_compat_es2019" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abe53062abdd2f87154b26f0f3765ab68eec50156d2a2533fc6f23f21db33fbf" +dependencies = [ + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_transforms_base", + "swc_ecma_utils", + "swc_ecma_visit", + "swc_trace_macro", + "tracing", ] [[package]] -name = "swc_core" -version = "0.22.17" +name = "swc_ecma_compat_es2020" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c53018ba62a0a5383020522052883c407b32578abea1a4692c91a67100d3e7e" +checksum = "fd7c21f8d2dcdf78985663662ac100ffa901f7d9cb262c8fb249e76878e5da39" dependencies = [ - "once_cell", - "swc", + "serde", "swc_atoms", "swc_common", "swc_ecma_ast", - "swc_ecma_codegen", - "swc_ecma_parser", - "swc_ecma_quote_macros", + "swc_ecma_compat_es2022", "swc_ecma_transforms_base", - "swc_ecma_transforms_testing", "swc_ecma_utils", "swc_ecma_visit", - "swc_plugin", - "swc_plugin_macro", - "swc_plugin_proxy", - "vergen", + "swc_trace_macro", + "tracing", ] [[package]] -name = "swc_ecma_ast" -version = "0.91.8" +name = "swc_ecma_compat_es2021" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7df6d5ece8b32be2c4501b11d917a449d4e15a0cef935f61bd3583f277443914" +checksum = "132b4140f0f95fac85bb0185b729b803549ee10163164ee0ea8dbcb890d6e223" dependencies = [ - "bitflags", - "is-macro", - "num-bigint", - "rkyv", - "scoped-tls", - "serde", - "string_enum", "swc_atoms", "swc_common", - "unicode-id", + "swc_ecma_ast", + "swc_ecma_transforms_base", + "swc_ecma_utils", + "swc_ecma_visit", + "swc_trace_macro", + "tracing", ] [[package]] -name = "swc_ecma_codegen" -version = "0.124.14" +name = "swc_ecma_compat_es2022" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6155f5a65fe66e4d870d8755af60de5b2a4ab1d2464da640cd56618d3bee50c" +checksum = "9b8606eb5adf4254a9b7bc9c53c3f3337799f7dcf8f574105adba65ce5172ed7" dependencies = [ - "memchr", - "num-bigint", - "once_cell", - "rustc-hash", - "serde", - "sourcemap", "swc_atoms", "swc_common", "swc_ecma_ast", - "swc_ecma_codegen_macros", + "swc_ecma_compat_common", + "swc_ecma_transforms_base", + "swc_ecma_transforms_classes", + "swc_ecma_transforms_macros", + "swc_ecma_utils", + "swc_ecma_visit", + "swc_trace_macro", "tracing", ] [[package]] -name = "swc_ecma_codegen_macros" -version = "0.7.1" +name = "swc_ecma_compat_es3" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0159c99f81f52e48fe692ef7af1b0990b45d3006b14c6629be0b1ffee1b23aea" +checksum = "7238859b1243c22bad33513cf5e9f2191fc8205719c727b665f7fd55efed1706" dependencies = [ - "pmutil", - "proc-macro2", - "quote", - "swc_macros_common", - "syn", + "swc_common", + "swc_ecma_ast", + "swc_ecma_transforms_base", + "swc_ecma_utils", + "swc_ecma_visit", + "swc_trace_macro", + "tracing", ] [[package]] name = "swc_ecma_ext_transforms" -version = "0.88.14" +version = "0.124.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8c69a955e06aa8dc85c97cbb5c8ff7a79dcc4bc0fd88c51f00c69dd61efac55" +checksum = "d71495487d393475642215ddc1afaf4979f46d16f0fecc5f0f9869f99734ff61" dependencies = [ "phf", "swc_atoms", @@ -1890,11 +2089,10 @@ dependencies = [ [[package]] name = "swc_ecma_lints" -version = "0.63.17" +version = "0.105.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049a8adfdae6433bc391ab301bd6f6446333851330d88975cada0766844812cd" +checksum = "cafe0b5546ef0c681e54afbff5cc9f17cf5ac67edf32b0e8bf2be787f446efb6" dependencies = [ - "ahash", "auto_impl", "dashmap", "parking_lot", @@ -1911,21 +2109,21 @@ dependencies = [ [[package]] name = "swc_ecma_loader" -version = "0.40.10" +version = "0.52.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cf15b506bf98839d91d0a5f7f21cd1ced9e3eeaa3be2664991f0b1788e8b9" +checksum = "f521eea3476abc7ae7adcbfa3479881087e5ae8fe358d46376d761e83fdb3120" dependencies = [ - "ahash", "anyhow", "dashmap", "lru", "normpath", "once_cell", "parking_lot", - "path-clean", + "path-clean 0.1.0", "pathdiff", "serde", "serde_json", + "swc_atoms", "swc_cached", "swc_common", "tracing", @@ -1933,24 +2131,25 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.154.30" +version = "0.209.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e262ebdec1787c4b28b0c38fc9ef330ee0c6ba41548f64d9a1b96df4c2f899" +checksum = "b9f3b070a1169d5dd032055886598557b6ad866cdd3e9db77a37dd1f55d230be" dependencies = [ - "ahash", "arrayvec", - "indexmap", + "indexmap 2.6.0", "num-bigint", "num_cpus", "once_cell", "parking_lot", + "phf", + "radix_fmt", "regex", - "retain_mut", "rustc-hash", + "ryu-js", "serde", "serde_json", + "swc_allocator", "swc_atoms", - "swc_cached", "swc_common", "swc_config", "swc_ecma_ast", @@ -1958,6 +2157,7 @@ dependencies = [ "swc_ecma_parser", "swc_ecma_transforms_base", "swc_ecma_transforms_optimization", + "swc_ecma_usage_analyzer", "swc_ecma_utils", "swc_ecma_visit", "swc_timer", @@ -1966,16 +2166,19 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.119.12" +version = "0.152.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f99872d1038049cb57d89ba8e4cb74b63ff95a0caa573dd31d684cae90c180f0" +checksum = "b888663998ef49da15d1dd3377e6b62bab4f994588e4f405628cb058d11ce8b3" dependencies = [ "either", - "enum_kind", - "lexical", + "new_debug_unreachable", "num-bigint", + "num-traits", + "phf", "serde", "smallvec", + "smartstring", + "stacker", "swc_atoms", "swc_common", "swc_ecma_ast", @@ -1985,17 +2188,17 @@ dependencies = [ [[package]] name = "swc_ecma_preset_env" -version = "0.169.24" +version = "0.222.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b201deaa46fec9de78b9f492161468f53a0668068ef8acfd60ff01ec36ab0a2" +checksum = "1ca373759c7247341c18ce0632a46f3cff8d537cbcfd006a1445d3c328f241ce" dependencies = [ - "ahash", "anyhow", "dashmap", - "indexmap", + "indexmap 2.6.0", "once_cell", "preset_env_base", - "semver 1.0.14", + "rustc-hash", + "semver 1.0.23", "serde", "serde_json", "st-map", @@ -2010,12 +2213,11 @@ dependencies = [ [[package]] name = "swc_ecma_quote_macros" -version = "0.30.12" +version = "0.63.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85ef34dfc8e6cf24c1225c413da89ecf371a8563aa52477e46af83179249e1fc" +checksum = "b6782774ce045d06682408be632ea2899e807a61fd9a307126d0a2407228de1b" dependencies = [ "anyhow", - "pmutil", "proc-macro2", "quote", "swc_atoms", @@ -2023,30 +2225,27 @@ dependencies = [ "swc_ecma_ast", "swc_ecma_parser", "swc_macros_common", - "syn", + "syn 2.0.85", ] [[package]] name = "swc_ecma_testing" -version = "0.17.14" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6d3d22f74b150a8d4249d0545cf87e25744c52ef97bb867bc341a653dff39" +checksum = "d88a64496b73a0e9c9d8333d14d39904e8d87dbcefe7baaa161803a7f5bae110" dependencies = [ "anyhow", "hex", - "sha-1", - "swc_atoms", - "swc_common", - "swc_ecma_ast", - "swc_ecma_codegen", + "sha2", "testing", + "tracing", ] [[package]] name = "swc_ecma_transforms" -version = "0.193.23" +version = "0.244.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206568839e04c1552c0df5860d3d97ab994db78c0af6799026f3034b6a48b5c2" +checksum = "b73549ef9f33d8a175244169b554fde9cd669d331b7090b64c02146147ee0c33" dependencies = [ "swc_atoms", "swc_common", @@ -2064,12 +2263,13 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" -version = "0.108.17" +version = "0.150.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72a6017cb4d0acba2c812fa0efef6eca3e5c78fd18eb5e559b143802b33c35f7" +checksum = "867ae73ffc2ae8cad72651f3b02017131379860e8687e9fae4b1e25da7d91cf1" dependencies = [ "better_scoped_tls", "bitflags", + "indexmap 2.6.0", "once_cell", "phf", "rustc-hash", @@ -2086,9 +2286,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_classes" -version = "0.97.17" +version = "0.139.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3acfa842a743f9a4149823b6ddac84b1b78f2d451598dde56c43111766a736b" +checksum = "6ecbb88f0256ce6e0fdc69be5da1af089b1ae33f9923f716726b65203428b7ed" dependencies = [ "swc_atoms", "swc_common", @@ -2100,22 +2300,31 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_compat" -version = "0.131.19" +version = "0.176.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ab31b62c6475a977c1b4bcb748ab7b073c47e4eaf593a747011b74b81e08725" +checksum = "54a83188f4f8d7dc06ac0606bb698d1075ffe47c23e83c02dacccfb71d3bcf68" dependencies = [ - "ahash", "arrayvec", - "indexmap", + "indexmap 2.6.0", "is-macro", "num-bigint", - "ordered-float", "serde", "smallvec", "swc_atoms", "swc_common", "swc_config", "swc_ecma_ast", + "swc_ecma_compat_bugfixes", + "swc_ecma_compat_common", + "swc_ecma_compat_es2015", + "swc_ecma_compat_es2016", + "swc_ecma_compat_es2017", + "swc_ecma_compat_es2018", + "swc_ecma_compat_es2019", + "swc_ecma_compat_es2020", + "swc_ecma_compat_es2021", + "swc_ecma_compat_es2022", + "swc_ecma_compat_es3", "swc_ecma_transforms_base", "swc_ecma_transforms_classes", "swc_ecma_transforms_macros", @@ -2127,30 +2336,28 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_macros" -version = "0.5.0" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebf907935ec5492256b523ae7935a824d9fdc0368dcadc41375bad0dca91cd8b" +checksum = "500a1dadad1e0e41e417d633b3d6d5de677c9e0d3159b94ba3348436cdb15aab" dependencies = [ - "pmutil", "proc-macro2", "quote", "swc_macros_common", - "syn", + "syn 2.0.85", ] [[package]] name = "swc_ecma_transforms_module" -version = "0.148.20" +version = "0.195.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4e49dd323e43ca164426a1e8d3fca4d5bd813b11a18e899e7d8cc45df5e1c45" +checksum = "933221b7c1b8468c885eda2a3ad625d58d1f8259542166f35707a03313fbcdc7" dependencies = [ "Inflector", - "ahash", "anyhow", "bitflags", - "indexmap", + "indexmap 2.6.0", "is-macro", - "path-clean", + "path-clean 1.0.1", "pathdiff", "regex", "serde", @@ -2168,13 +2375,12 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_optimization" -version = "0.162.23" +version = "0.213.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c744fcd5b28d3f00899e8b8bc2c00b131c49ed866e4f8753a693f3494e8082d" +checksum = "831fa5251fed6d737a3ed4887ceb0a21ca392ebbdd6fb6de00bf8edf48bc86f4" dependencies = [ - "ahash", "dashmap", - "indexmap", + "indexmap 2.6.0", "once_cell", "petgraph", "rustc-hash", @@ -2193,11 +2399,12 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_proposal" -version = "0.139.19" +version = "0.184.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b58270120233513c80c29b9e2ac5c92893d08543d2de8a20b38f334dd7dc20b" +checksum = "c7279bc3f706a91d236b0233eb57441809402cd533cf866235c4c66b4f562c82" dependencies = [ "either", + "rustc-hash", "serde", "smallvec", "swc_atoms", @@ -2212,19 +2419,18 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_react" -version = "0.150.20" +version = "0.196.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8c0e45874f85710d9d4a053b061a41be5bebca9d16b24aaf3d87a54f80ba860" +checksum = "a2874f29c9acacc2ac3d20de5c1ff207f2eb68b536cc7655a6e29874895f6adc" dependencies = [ - "ahash", "base64", "dashmap", - "indexmap", + "indexmap 2.6.0", "once_cell", - "regex", "serde", - "sha-1", + "sha1", "string_enum", + "swc_allocator", "swc_atoms", "swc_common", "swc_config", @@ -2238,16 +2444,18 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_testing" -version = "0.110.17" +version = "0.155.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40c86e96e047ee102add0705e4a950bbe0f1a043d496b3a8b5add50177f78f3d" +checksum = "9a9ef17a904e2f6f340ce658cb9de0f1c328bc7c005d1c81df26e53af6d381f2" dependencies = [ "ansi_term", "anyhow", + "base64", "hex", "serde", "serde_json", - "sha-1", + "sha2", + "sourcemap", "swc_common", "swc_ecma_ast", "swc_ecma_codegen", @@ -2262,10 +2470,11 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.154.20" +version = "0.203.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb69104c3a7d6ff9108fb417999860903a5ebaaf4a81c0b603748c8e6350d91c" +checksum = "ea45a4c1332c93de14226c621ea4cb7ac5e0f874142824b21653c6f34cf719f0" dependencies = [ + "ryu-js", "serde", "swc_atoms", "swc_common", @@ -2276,15 +2485,34 @@ dependencies = [ "swc_ecma_visit", ] +[[package]] +name = "swc_ecma_usage_analyzer" +version = "0.34.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67cf63780f8abfcebdea8a0d6018575b09d7aac5c2ec778f12fe6dc09d27c6a5" +dependencies = [ + "indexmap 2.6.0", + "rustc-hash", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_utils", + "swc_ecma_visit", + "swc_timer", + "tracing", +] + [[package]] name = "swc_ecma_utils" -version = "0.102.14" +version = "0.138.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84f9c22fbb6d513d83fbb7b2c396bb71c53b25370cc1e11ea6a994d74b9186fa" +checksum = "41f6422008758309fb2ab79ddbbf0e635bb69e47e54196b89f00a0217e820620" dependencies = [ - "indexmap", + "indexmap 2.6.0", "num_cpus", "once_cell", + "rustc-hash", + "ryu-js", "swc_atoms", "swc_common", "swc_ecma_ast", @@ -2295,10 +2523,11 @@ dependencies = [ [[package]] name = "swc_ecma_visit" -version = "0.77.8" +version = "0.107.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4891bc895524ce913b3eae7763201f39a621f4991c4d9868b9ea94875e84f149" +checksum = "b5983d63df36fdefec8b4bdb88d1fdcd06c9acb815d987c871409a5a64d58f63" dependencies = [ + "new_debug_unreachable", "num-bigint", "swc_atoms", "swc_common", @@ -2309,21 +2538,20 @@ dependencies = [ [[package]] name = "swc_eq_ignore_macros" -version = "0.1.1" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c20468634668c2bbab581947bb8c75c97158d5a6959f4ba33df20983b20b4f6" +checksum = "63db0adcff29d220c3d151c5b25c0eabe7e32dd936212b84cdaa1392e3130497" dependencies = [ - "pmutil", "proc-macro2", "quote", - "syn", + "syn 2.0.85", ] [[package]] name = "swc_error_reporters" -version = "0.12.10" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d57d1b1fb0da73e20caadb86755db4d3371849c704c86dbaecd3f3968fc1cb4" +checksum = "83f9286183c9be40aafcbbe8c397403fb32af812a3dffe93eee9067aee4fbedb" dependencies = [ "anyhow", "miette", @@ -2334,35 +2562,33 @@ dependencies = [ [[package]] name = "swc_fast_graph" -version = "0.16.10" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97abd88688673d693aec09551783b067f4d4fff82f8e982b91160dd7febad484" +checksum = "7f5910e7aeb1e0125ad27be9346cc266d1c75b68b6dc57ca37921136f4758416" dependencies = [ - "ahash", - "indexmap", + "indexmap 2.6.0", "petgraph", + "rustc-hash", "swc_common", ] [[package]] name = "swc_macros_common" -version = "0.3.6" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4be988307882648d9bc7c71a6a73322b7520ef0211e920489a98f8391d8caa2" +checksum = "27e18fbfe83811ffae2bb23727e45829a0d19c6870bced7c0f545cc99ad248dd" dependencies = [ - "pmutil", "proc-macro2", "quote", - "syn", + "syn 2.0.85", ] [[package]] name = "swc_node_comments" -version = "0.15.10" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c7e415e35959e8118fd74ffee2d4a18bf459dac1293163735a294cba476cb9" +checksum = "31c325461f5e78e7749241f917945164adccfadcc2138a9a2e5ac9d186e1c459" dependencies = [ - "ahash", "dashmap", "swc_atoms", "swc_common", @@ -2370,29 +2596,29 @@ dependencies = [ [[package]] name = "swc_plugin" -version = "0.90.0" +version = "0.90.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca5df720531bfbd7ceb1139319c39c20c446abfb8f7e0eb47b104205a71152b4" +checksum = "3b059b8bb5b74cc5fc54559e8de09195fbddd20f4bb363b176b741993ef4894a" dependencies = [ "once_cell", ] [[package]] name = "swc_plugin_macro" -version = "0.9.8" +version = "0.9.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4241e5cbfb7aae61603ca4d161e132012f488cf86393855c5cd5dddbbfe34382" +checksum = "3232db481484070637b20a155c064096c0ea1ba04fa2247b89b618661b3574f4" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.85", ] [[package]] name = "swc_plugin_proxy" -version = "0.19.10" +version = "0.50.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c06a2f32bd80131aa7ba020eaed7810d39004bc805e58e561f1c3c1b970e109" +checksum = "62a0c7f6098cb0ea5d0191bc02c5b3705000f2dd94c6da31f3ac47adf77ae419" dependencies = [ "better_scoped_tls", "rkyv", @@ -2404,7 +2630,7 @@ dependencies = [ [[package]] name = "swc_plugin_transform_vue3_jsx" -version = "0.2.0" +version = "0.3.0" dependencies = [ "serde", "serde_json", @@ -2414,71 +2640,98 @@ dependencies = [ [[package]] name = "swc_timer" -version = "0.16.10" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e626e120ae437a135d679de736089493e5ba1c2d9b6e8c726f7105a17867858" +checksum = "f53899e4ab3f9ce3db83b4c845f8a27f37bf700b233febbc9a6da749651c2fbb" dependencies = [ "tracing", ] [[package]] name = "swc_trace_macro" -version = "0.1.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4795c8d23e0de62eef9cac0a20ae52429ee2ffc719768e838490f195b7d7267" +checksum = "69aa25f667e4d74ab10a17a266edeb8b354273817b20b91e60471f1c860a221b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.85", +] + +[[package]] +name = "swc_transform_common" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda3e80e1ad638d3575bc07745a914af13dcb02215098659f864731078271f2c" +dependencies = [ + "better_scoped_tls", + "once_cell", + "rustc-hash", + "serde", + "serde_json", +] + +[[package]] +name = "swc_typescript" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62f67e7bf045807f80a6b07d3acf3098db27bb3c82c93cc46eaf78ba386be950" +dependencies = [ + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "thiserror", ] [[package]] name = "swc_visit" -version = "0.5.3" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82f2bcb7223e185c4c7cbf5e0c1207dec6d2bfd5e72e3fb7b3e8d179747e9130" +checksum = "1ceb044142ba2719ef9eb3b6b454fce61ab849eb696c34d190f04651955c613d" dependencies = [ "either", - "swc_visit_macros", + "new_debug_unreachable", ] [[package]] -name = "swc_visit_macros" -version = "0.5.4" +name = "syn" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb1f3561674d84947694d41fb6d5737d19539222779baeac1b3a071a2b29428" +checksum = "e90cde112c4b9690b8cbe810cba9ddd8bc1d7472e2cae317b69e9438c1cba7d2" dependencies = [ - "Inflector", - "pmutil", "proc-macro2", "quote", - "swc_macros_common", - "syn", + "unicode-ident", ] [[package]] name = "syn" -version = "1.0.101" +version = "2.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e90cde112c4b9690b8cbe810cba9ddd8bc1d7472e2cae317b69e9438c1cba7d2" +checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + [[package]] name = "tempfile" -version = "3.3.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if 1.0.0", "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", - "winapi", + "once_cell", + "rustix", + "windows-sys 0.59.0", ] [[package]] @@ -2490,27 +2743,19 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "terminal_size" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "testing" -version = "0.30.10" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5584041a02f6327d9ec378b4e389dc0b5e748bb99705b765941a8e55f7d83d14" +checksum = "9217860da21fabe9c65981ba42f6dad2bd8f463b670448afe79aa9d50f0bc137" dependencies = [ "ansi_term", + "cargo_metadata", "difference", "once_cell", "pretty_assertions", "regex", + "serde", "serde_json", "swc_common", "swc_error_reporters", @@ -2521,26 +2766,25 @@ dependencies = [ [[package]] name = "testing_macros" -version = "0.2.7" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e74ff09d2d4d4b7ea140ff67eb7ed8fd35a708e2c327bcde5a25707d66840099" +checksum = "a39660370116afe46d5ff8bcb01b7afe2140dda3137ef5cb1914681e37a4ee06" dependencies = [ "anyhow", "glob", "once_cell", - "pmutil", "proc-macro2", "quote", "regex", "relative-path", - "syn", + "syn 2.0.85", ] [[package]] name = "textwrap" -version = "0.15.1" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16" +checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" dependencies = [ "smawk", "unicode-linebreak", @@ -2549,22 +2793,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.37" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" +checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.37" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" +checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.85", ] [[package]] @@ -2576,28 +2820,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "time" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - -[[package]] -name = "time" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3f9a28b618c3a6b9251b6908e9c99e04b9e5c02e6581ccbb67d59c34ef7f9b" -dependencies = [ - "itoa", - "libc", - "num_threads", -] - [[package]] name = "tinyvec" version = "1.6.0" @@ -2615,11 +2837,10 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tracing" -version = "0.1.36" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if 1.0.0", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -2627,20 +2848,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.22" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.85", ] [[package]] name = "tracing-core" -version = "0.1.29" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -2648,23 +2869,23 @@ dependencies = [ [[package]] name = "tracing-log" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ - "lazy_static", "log", + "once_cell", "tracing-core", ] [[package]] name = "tracing-subscriber" -version = "0.3.15" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60db860322da191b40952ad9affe65ea23e7dd6a5c442c2c42865810c6ab8e6b" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ - "ansi_term", "matchers", + "nu-ansi-term", "once_cell", "regex", "sharded-slab", @@ -2677,9 +2898,9 @@ dependencies = [ [[package]] name = "triomphe" -version = "0.1.8" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1ee9bd9239c339d714d657fac840c6d2a4f9c45f4f9ec7b0975113458be78db" +checksum = "ef8f7726da4807b58ea5c96fdc122f80702030edc33b35aff9190a51148ccc85" dependencies = [ "serde", "stable_deref_trait", @@ -2699,9 +2920,9 @@ checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-id" @@ -2709,6 +2930,12 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d70b6494226b36008c8366c288d77190b3fad2eb4c10533139c1c1f461127f1a" +[[package]] +name = "unicode-id-start" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f322b60f6b9736017344fa0635d64be2f458fbc04eef65f6be22976dd1ffd5b" + [[package]] name = "unicode-ident" version = "1.0.4" @@ -2721,7 +2948,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5faade31a542b8b35855fff6e8def199853b2da8da256da52f52f1316ee3137" dependencies = [ - "hashbrown", + "hashbrown 0.12.3", "regex", ] @@ -2736,30 +2963,27 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" - -[[package]] -name = "unreachable" -version = "0.1.1" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f2ae5ddb18e1c92664717616dd9549dde73f539f01bd7b77c2edb2446bdff91" -dependencies = [ - "void", -] +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "url" -version = "2.3.1" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "uuid" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" + [[package]] name = "valuable" version = "0.1.0" @@ -2768,34 +2992,38 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "vergen" -version = "7.4.2" +version = "9.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73ba753d713ec3844652ad2cb7eb56bc71e34213a14faddac7852a10ba88f61e" +checksum = "349ed9e45296a581f455bc18039878f409992999bc1d5da12a6800eb18c8752f" dependencies = [ "anyhow", - "cfg-if 1.0.0", - "enum-iterator", - "getset", + "cargo_metadata", + "derive_builder", + "regex", "rustversion", - "thiserror", - "time 0.3.14", + "vergen-lib", ] [[package]] -name = "version_check" -version = "0.9.4" +name = "vergen-lib" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "229eaddb0050920816cf051e619affaf18caa3dd512de8de5839ccbc8e53abb0" +dependencies = [ + "anyhow", + "derive_builder", + "rustversion", +] [[package]] -name = "void" -version = "1.0.2" +name = "version_check" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "vue3_jsx_folder" -version = "0.2.0" +version = "0.3.0" dependencies = [ "globset", "lazy_static", @@ -2806,12 +3034,6 @@ dependencies = [ "swc_core", ] -[[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" @@ -2825,8 +3047,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ "cfg-if 1.0.0", - "serde", - "serde_json", "wasm-bindgen-macro", ] @@ -2841,7 +3061,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.101", "wasm-bindgen-shared", ] @@ -2863,7 +3083,7 @@ checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.101", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2919,49 +3139,117 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" -version = "0.36.1" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", "windows_aarch64_msvc", "windows_i686_gnu", + "windows_i686_gnullvm", "windows_i686_msvc", "windows_x86_64_gnu", + "windows_x86_64_gnullvm", "windows_x86_64_msvc", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + [[package]] name = "windows_aarch64_msvc" -version = "0.36.1" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.36.1" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.36.1" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.36.1" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.36.1" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "wyz" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] [[package]] name = "yansi" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.85", +] diff --git a/Cargo.toml b/Cargo.toml index 38b5f8d..573211d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ authors = ["xxXyh1908 <15626874924@163.com>"] edition = "2021" license = "MIT" name = "swc_plugin_transform_vue3_jsx" -version = "0.2.0" +version = "0.3.0" [lib] crate-type = ["cdylib", "rlib"] @@ -19,8 +19,8 @@ opt-level = 2 [dependencies] serde = "1" serde_json = "1" -swc_core = {version = ">=0.22.0", features = [ - "plugin_transform", +swc_core = {version = "0.109", features = [ + "ecma_plugin_transform", "ecma_visit", "ecma_ast", "common", diff --git a/folder/Cargo.toml b/folder/Cargo.toml index 7fdfbee..29e0915 100644 --- a/folder/Cargo.toml +++ b/folder/Cargo.toml @@ -2,7 +2,7 @@ authors = ["xxXyh1908 <15626874924@163.com>"] edition = "2021" name = "vue3_jsx_folder" -version = "0.2.0" +version = "0.3.0" [lib] crate-type = ["rlib"] @@ -14,7 +14,7 @@ linked-hash-map = "0.5.6" regex = "1.6.0" serde = "1" serde_json = "1" -swc_core = {version = ">=0.22.0", features = [ +swc_core = {version = "0.109", features = [ "ecma_utils", "ecma_visit", "ecma_ast", diff --git a/folder/src/lib.rs b/folder/src/lib.rs index 5580c5d..2de030d 100644 --- a/folder/src/lib.rs +++ b/folder/src/lib.rs @@ -3,7 +3,6 @@ use swc_core::{ common::comments::Comments, ecma::visit::{as_folder, Fold}, }; - use crate::{ utils::{create_file_name_filter, create_filter}, visitor::{JSXTransformVisitor, JSXTransformVisitorOptions}, diff --git a/folder/src/visitor.rs b/folder/src/visitor.rs index ba8480f..59d207e 100644 --- a/folder/src/visitor.rs +++ b/folder/src/visitor.rs @@ -7,7 +7,7 @@ use lazy_static::lazy_static; use linked_hash_map::LinkedHashMap; use regex::Regex; use swc_core::{ - common::{comments::Comments, BytePos, Span, DUMMY_SP}, + common::{comments::Comments, BytePos, Span, SyntaxContext, DUMMY_SP}, ecma::{ ast::{ ArrayLit, ArrowExpr, AssignPat, BindingIdent, BlockStmt, CallExpr, Callee, ClassExpr, ClassMethod, @@ -17,7 +17,7 @@ use swc_core::{ JSXExprContainer, JSXFragment, JSXText, KeyValuePatProp, KeyValueProp, Lit, MethodProp, Module, ModuleDecl, ModuleExportName, ModuleItem, Number, ObjectLit, ObjectPat, ObjectPatProp, Pat, PrivateMethod, Program, Prop, PropName, PropOrSpread, Script, SeqExpr, SetterProp, SpreadElement, Stmt, Str, ThisExpr, - TsExportAssignment, TsModuleDecl, UnaryOp, VarDecl, VarDeclKind, VarDeclarator, + TsExportAssignment, TsModuleDecl, UnaryOp, VarDecl, VarDeclKind, VarDeclarator, ImportPhase }, atoms::js_word, utils::{private_ident, quote_ident, quote_str}, @@ -31,7 +31,7 @@ use crate::{ flags::{PatchFlags, SlotFlags}, utils::{camelize, camelize_upper_first, lower_first, upper_first, StringFilter}, visitor_helpers::{ - ast_ident_to_string, ast_str_to_string, clone_ident, clone_lit, create_ident, create_key_value_prop, + ast_ident_to_string,ast_ident_name_to_string, ast_str_to_string, clone_ident, clone_lit, create_ident, create_ident_name, create_key_value_prop, create_null_expr, create_private_ident, create_true_expr, create_void_zero_expr, find_decl_ident_from_module_items, find_decl_ident_from_pattern, find_decl_ident_from_pattern0, find_decl_ident_from_stmts, is_constant_expr, is_define_component_expr, is_script_top, @@ -48,7 +48,7 @@ mod event_helpers { use lazy_static::lazy_static; use swc_core::{ - common::DUMMY_SP, + common::{SyntaxContext, DUMMY_SP}, ecma::{ ast::{ ArrayLit, ArrowExpr, BinExpr, BinaryOp, BindingIdent, BlockStmt, BlockStmtOrExpr, ComputedPropName, @@ -319,8 +319,9 @@ mod event_helpers { event, Some(Expr::Arrow(ArrowExpr { span: DUMMY_SP, + ctxt: SyntaxContext::empty(), params: vec![Pat::Ident(BindingIdent::from(super::clone_ident(&self::EVENT_IDENT)))], - body: BlockStmtOrExpr::BlockStmt(BlockStmt { span: DUMMY_SP, stmts: code }), + body: Box::new(BlockStmtOrExpr::BlockStmt(BlockStmt { span: DUMMY_SP, stmts: code, ctxt: SyntaxContext::empty() })), is_async: false, is_generator: false, type_params: None, @@ -430,7 +431,7 @@ impl VModelArgument { fn to_prop_name_with_prefix(&self, prefix: &str) -> PropName { match self { - VModelArgument::Str(str) => PropName::Str(Str::from(String::from(prefix) + str)), + VModelArgument::Str(str) => PropName::Str(Str::from(String::from(prefix) + str.as_str())), VModelArgument::Expr(expr) => PropName::Computed(ComputedPropName { span: expr.as_ref().get_span(), expr: quote!( @@ -458,7 +459,7 @@ impl VModelArgument { fn to_prop_name_with_prefix_suffix(&self, prefix: &str, suffix: &str) -> PropName { match self { - VModelArgument::Str(str) => PropName::Str(Str::from(String::from(prefix) + str + suffix)), + VModelArgument::Str(str) => PropName::Str(Str::from(String::from(prefix) + str.as_str() + suffix)), VModelArgument::Expr(expr) => PropName::Computed(ComputedPropName { span: expr.as_ref().get_span(), expr: quote!( @@ -520,6 +521,7 @@ impl JSXTransformVisitor<'_> { for (i, (module_id, value)) in self.imports.drain().enumerate() { let mut specifiers = Vec::with_capacity(value.len()); + let mut props = Vec::new(); for (name, local) in value.into_iter() { specifiers.push(ImportSpecifier::Named(ImportNamedSpecifier { span: DUMMY_SP, @@ -533,9 +535,14 @@ impl JSXTransformVisitor<'_> { ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl { span: DUMMY_SP, specifiers, - src: module_id.into(), + src: Box::new(module_id.into()), type_only: false, - asserts: None, + phase: ImportPhase::Source, + with: Some(Box::new(ObjectLit { + span: DUMMY_SP, + props + })) + // asserts: None, })), ); } @@ -561,7 +568,7 @@ impl JSXTransformVisitor<'_> { let mut properties = Vec::with_capacity(value.len()); for (name, local) in value.into_iter() { properties.push(ObjectPatProp::KeyValue(KeyValuePatProp { - key: PropName::Ident(create_ident(&name)), + key: PropName::Ident(create_ident_name(&name)), value: Box::from(BindingIdent::from(local)), })) } @@ -575,6 +582,7 @@ impl JSXTransformVisitor<'_> { }), init: Some(Box::from(Expr::Call(CallExpr { span: DUMMY_SP, + ctxt: SyntaxContext::empty(), callee: Callee::Expr(Box::from(quote_ident!("require"))), args: vec![ExprOrSpread::from(Expr::Lit(Lit::Str(Str::from(module_id))))], type_args: None, @@ -586,12 +594,13 @@ impl JSXTransformVisitor<'_> { if !decls.is_empty() { items.insert( insert_index, - Stmt::Decl(Decl::Var(VarDecl { + Stmt::Decl(Decl::Var(Box::new(VarDecl { span: DUMMY_SP, + ctxt: SyntaxContext::empty(), kind: VarDeclKind::Const, declare: false, decls, - })), + }))), ); insert_index += 1; } @@ -599,8 +608,9 @@ impl JSXTransformVisitor<'_> { for (kind, ident, init) in self.new_global_vars.drain_values() { items.insert( insert_index, - Stmt::Decl(Decl::Var(VarDecl { + Stmt::Decl(Decl::Var(Box::new(VarDecl { span: DUMMY_SP, + ctxt: SyntaxContext::empty(), kind, declare: false, decls: vec![VarDeclarator { @@ -609,7 +619,7 @@ impl JSXTransformVisitor<'_> { init, definite: false, }], - })), + }))), ); insert_index += 1; } @@ -1048,6 +1058,7 @@ impl JSXTransformVisitor<'_> { let get_resolved_component_expr = || { Expr::Call(CallExpr { span, + ctxt: SyntaxContext::empty(), callee: Callee::Expr(Box::new(resolve_component.into())), args: vec![ExprOrSpread { spread: None, @@ -1088,7 +1099,7 @@ impl JSXTransformVisitor<'_> { match attr { JSXAttrOrSpread::JSXAttr(attr) => { let name = match &attr.name { - JSXAttrName::Ident(ident) => ast_ident_to_string(ident), + JSXAttrName::Ident(ident) => ast_ident_name_to_string(ident), JSXAttrName::JSXNamespacedName(name) => { let ns = &name.ns; let name = &name.name; @@ -1142,6 +1153,7 @@ impl JSXTransformVisitor<'_> { type_ann: None, body: Some(BlockStmt { span: DUMMY_SP, + ctxt: SyntaxContext::empty(), stmts: vec![quote!( r#"return this[ $key ];"# as Stmt, key: Expr = Expr::Lit(Lit::Str(Str::from(camelize_name.clone()))) @@ -1152,9 +1164,11 @@ impl JSXTransformVisitor<'_> { props_array.push(PropOrSpread::Prop(Box::new(Prop::Setter(SetterProp { span: DUMMY_SP, key: key.clone(), - param: Pat::Ident(BindingIdent::from(clone_ident(&value))), + this_param: Some(Pat::Ident(BindingIdent::from(clone_ident(&value)))), + param: Box::new(Pat::Ident(BindingIdent::from(clone_ident(&value)))), body: Some(BlockStmt { span: DUMMY_SP, + ctxt: SyntaxContext::empty(), stmts: vec![quote!( r#"this[ $key ] = $value;"# as Stmt, value: Ident = value, @@ -1228,7 +1242,7 @@ impl JSXTransformVisitor<'_> { JSXAttrOrSpread::JSXAttr(attr) => { match &attr.name { JSXAttrName::Ident(ident) => { - let name = ast_ident_to_string(ident); + let name = ast_ident_name_to_string(ident); if name == "type" { let expr = match &attr.value { Some(value) => match value { @@ -1280,7 +1294,7 @@ impl JSXTransformVisitor<'_> { match attr { JSXAttrOrSpread::JSXAttr(attr) => { let (mut name, name_span) = match &attr.name { - JSXAttrName::Ident(ident) => (ast_ident_to_string(ident), ident.get_span()), + JSXAttrName::Ident(ident) => (ast_ident_name_to_string(ident), ident.get_span()), JSXAttrName::JSXNamespacedName(name) => { let ns = &name.ns; let name = &name.name; @@ -1355,14 +1369,14 @@ impl JSXTransformVisitor<'_> { match *prop { Prop::Shorthand(ident) => { on_map.insert( - String::from("on") + &upper_first(&ast_ident_to_string(&ident)), + String::from("on") + upper_first(&ast_ident_to_string(&ident)).as_str(), Expr::Ident(clone_ident(&ident)), ); } Prop::KeyValue(key_value) => { if let ObjectKey::Str(key) = ObjectKey::from(&key_value.key) { on_map.insert( - String::from("on") + &upper_first(&key), + String::from("on") + upper_first(&key).as_str(), *key_value.value, ); } @@ -1370,7 +1384,7 @@ impl JSXTransformVisitor<'_> { Prop::Method(method) => { if let ObjectKey::Str(key) = ObjectKey::from(&method.key) { on_map.insert( - String::from("on") + &upper_first(&key), + String::from("on") + upper_first(&key).as_str(), Expr::Fn(FnExpr { ident: Some(create_ident(&key)), function: method.function, @@ -1398,6 +1412,7 @@ impl JSXTransformVisitor<'_> { dot3_token: DUMMY_SP, expr: Box::new(Expr::Call(CallExpr { span: DUMMY_SP, + ctxt: SyntaxContext::empty(), callee: Callee::Expr(Box::from(Expr::Ident( self.add_import(HELPER_ID, "transformOn"), ))), @@ -1429,10 +1444,10 @@ impl JSXTransformVisitor<'_> { if self.config.transform_on_update_event { if let Some(caps) = ON_UPDATE_EVENT_REGEX.captures(&name) { name = String::from("onUpdate:") - + &(match &caps.get(1) { + + (match &caps.get(1) { None => String::from(""), Some(m) => m.as_str().to_lowercase(), - }) + }).as_str() + (match &caps.get(2) { None => "", Some(m) => m.as_str(), @@ -1706,6 +1721,7 @@ impl JSXTransformVisitor<'_> { model_arg = VModelArgument::Expr(Box::new(Expr::Call(CallExpr { span: DUMMY_SP, + ctxt: SyntaxContext::empty(), callee: Callee::Expr(Box::new(Expr::Ident(ident))), args: vec![], type_args: None, @@ -1836,6 +1852,7 @@ impl JSXTransformVisitor<'_> { let get_resolved_directive_expr = || { Expr::Call(CallExpr { span: name_span.clone(), + ctxt: SyntaxContext::empty(), callee: Callee::Expr(Box::new(resolve_directive.into())), args: vec![ExprOrSpread { spread: None, @@ -2117,8 +2134,8 @@ impl JSXTransformVisitor<'_> { let mut reload_record_expressions = Vec::new(); let mut callback_param_binds_pattern = Vec::new(); let mut ssr_register_helper_expressions = Vec::new(); - let __VUE_HMR_RUNTIME__ = quote_ident!("__VUE_HMR_RUNTIME__"); - let __MODULE__ = private_ident!("__MODULE__"); + let __VUE_HMR_RUNTIME__ = quote_ident!("__VUE_HMR_RUNTIME__").into(); + let __MODULE__ = private_ident!("__MODULE__").into(); for (_, comp) in components { let DefineComponentInfo { local, mut exports } = comp; @@ -2145,13 +2162,13 @@ impl JSXTransformVisitor<'_> { )); callback_param_binds_pattern.push(ObjectPatProp::KeyValue(KeyValuePatProp { - key: PropName::Ident(create_ident(&export_name)), + key: PropName::Ident(create_ident_name(&export_name)), value: Box::new(if export_name == "default" { Pat::Assign(AssignPat { span: DUMMY_SP, left: Box::new(Pat::Ident(BindingIdent::from(clone_ident(&local)))), right: Box::new(Expr::Ident(clone_ident(&__MODULE__))), - type_ann: None, + // type_ann: None, }) } else { Pat::Ident(BindingIdent::from(clone_ident(&local))) @@ -2390,16 +2407,17 @@ impl JSXTransformVisitor<'_> { key, Expr::Fn(FnExpr { ident: None, - function: Function { + function: Box::new(Function { params: function.params.clone(), decorators: function.decorators.clone(), span: function.span.clone(), + ctxt: SyntaxContext::empty(), body: function.body.clone(), is_generator: function.is_generator, is_async: function.is_async, type_params: function.type_params.clone(), return_type: function.return_type.clone(), - }, + }), }), ) } @@ -2455,6 +2473,7 @@ impl JSXTransformVisitor<'_> { Expr::Call(CallExpr { span: DUMMY_SP, + ctxt: SyntaxContext::empty(), callee: Callee::Expr(Box::new(Expr::Ident(self.add_import("vue", "mergeProps")))), args, type_args: None, @@ -2491,7 +2510,7 @@ impl JSXTransformVisitor<'_> { modifiers.sort(); Expr::Ident(self.add_global_variable( - String::from("modifiers:") + &modifiers.join(","), + String::from("modifiers:") + modifiers.join(",").as_str(), move || { Some(Box::new(Expr::Object({ let mut props = Vec::with_capacity(modifiers.len()); @@ -2510,7 +2529,7 @@ impl JSXTransformVisitor<'_> { array_props.sort(); Expr::Ident(self.add_global_variable( - String::from("array_props:") + &array_props.join(","), + String::from("array_props:") + array_props.join(",").as_str(), move || { Some(Box::new(Expr::Array({ let mut elems = Vec::with_capacity(array_props.len()); @@ -2802,6 +2821,7 @@ impl JSXTransformVisitor<'_> { let mut v_node = Expr::Call(CallExpr { span: span.clone(), + ctxt: SyntaxContext::empty(), callee: Callee::Expr(Box::new(Expr::Ident(self._get_create_v_node()))), args: params, type_args: None, @@ -2810,6 +2830,7 @@ impl JSXTransformVisitor<'_> { if !directives.is_empty() { v_node = Expr::Call(CallExpr { span: span.clone(), + ctxt: SyntaxContext::empty(), callee: Callee::Expr(Box::new(self._get_with_directives().into())), args: vec![ ExprOrSpread { spread: None, expr: Box::new(v_node) }, diff --git a/folder/src/visitor_helpers.rs b/folder/src/visitor_helpers.rs index 3456d7b..6ffda7f 100644 --- a/folder/src/visitor_helpers.rs +++ b/folder/src/visitor_helpers.rs @@ -5,17 +5,10 @@ use std::{ use linked_hash_map::LinkedHashMap; use swc_core::{ - common::{Span, DUMMY_SP}, + common::{Span, SyntaxContext, DUMMY_SP}, ecma::{ ast::{ - self, ArrayPat, ArrowExpr, AssignPat, BigInt, BindingIdent, BlockStmt, BlockStmtOrExpr, Bool, Callee, - ClassDecl, ClassExpr, ClassMethod, ComputedPropName, Constructor, Decl, Expr, FnDecl, FnExpr, ForInStmt, - ForOfStmt, ForStmt, GetterProp, Ident, ImportSpecifier, JSXElement, JSXFragment, JSXMemberExpr, - JSXNamespacedName, JSXObject, JSXText, KeyValueProp, Lit, MemberExpr, MemberProp, MethodProp, Module, - ModuleDecl, ModuleItem, Null, Number, ObjectPat, ObjectPatProp, Param, ParamOrTsParamProp, Pat, - PrivateMethod, Prop, PropName, ReturnStmt, Script, SetterProp, SpreadElement, Stmt, Str, TsModuleDecl, - TsModuleName, TsNamespaceBody, TsParamPropParam, UnaryExpr, UnaryOp, VarDecl, VarDeclKind, VarDeclOrExpr, - VarDeclOrPat, VarDeclarator, + self, ArrayPat, ArrowExpr, AssignPat, BigInt, BindingIdent, BlockStmt, BlockStmtOrExpr, Bool, Callee, ClassDecl, ClassExpr, ClassMethod, ComputedPropName, Constructor, Decl, Expr, FnDecl, FnExpr, ForHead, ForInStmt, ForOfStmt, ForStmt, GetterProp, Ident, IdentName, ImportSpecifier, JSXElement, JSXFragment, JSXMemberExpr, JSXNamespacedName, JSXObject, JSXText, KeyValueProp, Lit, MemberExpr, MemberProp, MethodProp, Module, ModuleDecl, ModuleItem, Null, Number, ObjectPat, ObjectPatProp, Param, ParamOrTsParamProp, Pat, PrivateMethod, Prop, PropName, ReturnStmt, Script, SetterProp, SpreadElement, Stmt, Str, TsModuleDecl, TsModuleName, TsNamespaceBody, TsParamPropParam, UnaryExpr, UnaryOp, VarDecl, VarDeclKind, VarDeclOrExpr, VarDeclarator }, atoms::js_word, utils::private_ident, @@ -129,7 +122,7 @@ impl ObjectKey { impl From<&PropName> for ObjectKey { fn from(name: &PropName) -> Self { match name { - PropName::Ident(ident) => ObjectKey::Str(ast_ident_to_string(ident)), + PropName::Ident(ident) => ObjectKey::Str(ast_ident_name_to_string(ident)), PropName::Str(str) => ObjectKey::Str(ast_str_to_string(str)), PropName::Num(num) => { let f64_val = num.value; @@ -142,7 +135,7 @@ impl From<&PropName> for ObjectKey { } } PropName::BigInt(bigint) => { - let value = &bigint.value; + let value = bigint.value.as_ref(); match value.to_biguint() { None => ObjectKey::Expr(Expr::Lit(Lit::BigInt(BigInt::from(value.clone())))), Some(value) => ObjectKey::Str(value.to_string()), @@ -165,7 +158,7 @@ impl From<&PropName> for ObjectKey { } } Lit::BigInt(bigint) => { - let value = &bigint.value; + let value = bigint.value.as_ref(); match value.to_biguint() { None => ObjectKey::Expr(Expr::Lit(Lit::BigInt(BigInt::from(value.clone())))), Some(value) => ObjectKey::Str(value.to_string()), @@ -260,8 +253,9 @@ pub(crate) fn prepend_var_decls_into_stmts Option> { - Some(vec![Param { span: DUMMY_SP, decorators: vec![], pat: self.param.clone() }]) + Some(vec![Param { span: DUMMY_SP, decorators: vec![], pat: self.param.as_ref().clone() }]) } fn _prepend_var_decls>)>>(&mut self, var_decls: Iter) { prepend_var_decls_into_option_block_stmt(&mut self.body, var_decls); @@ -459,19 +454,20 @@ impl FunctionScope for ArrowExpr { Some(result) } fn _prepend_var_decls>)>>(&mut self, var_decls: Iter) { - match &mut self.body { + match &mut self.body.as_mut() { BlockStmtOrExpr::BlockStmt(block) => { prepend_var_decls_into_block_stmt(block, var_decls); } BlockStmtOrExpr::Expr(expr) => { let mut block = BlockStmt { span: DUMMY_SP, + ctxt: SyntaxContext::empty(), stmts: vec![Stmt::Return(ReturnStmt { span: DUMMY_SP, arg: Some(expr.clone()) })], }; prepend_var_decls_into_block_stmt(&mut block, var_decls); - self.body = BlockStmtOrExpr::BlockStmt(block); + self.body = Box::new(BlockStmtOrExpr::BlockStmt(block)); } _ => {} }; @@ -522,7 +518,7 @@ impl ForLike for ForStmt { impl ForLike for ForInStmt { fn _get_init_decl(&self) -> Option<&'_ VarDecl> { - if let VarDeclOrPat::VarDecl(decl) = &self.left { + if let ForHead::VarDecl(decl) = &self.left { return Some(decl); } None @@ -531,7 +527,7 @@ impl ForLike for ForInStmt { impl ForLike for ForOfStmt { fn _get_init_decl(&self) -> Option<&'_ VarDecl> { - if let VarDeclOrPat::VarDecl(decl) = &self.left { + if let ForHead::VarDecl(decl) = &self.left { return Some(decl); } None @@ -559,16 +555,19 @@ pub(crate) fn create_null_expr() -> Expr { } pub(crate) fn create_ident(name: &str) -> Ident { - Ident::new(name.into(), DUMMY_SP) + Ident::new(name.into(), DUMMY_SP, SyntaxContext::empty()) } +pub(crate) fn create_ident_name(name: &str) -> IdentName { + IdentName::new(name.into(), DUMMY_SP) +} pub(crate) fn create_private_ident(name: &str) -> Ident { let ident_name = format!("_{}", name); private_ident!(ident_name) } pub(crate) fn clone_ident(ident: &Ident) -> Ident { - Ident { span: ident.span.clone(), sym: ident.sym.clone(), optional: ident.optional } + Ident { span: ident.span.clone(), sym: ident.sym.clone(), optional: ident.optional,ctxt: SyntaxContext::empty() } } pub(crate) fn clone_lit(lit: &Lit) -> Lit { @@ -576,7 +575,7 @@ pub(crate) fn clone_lit(lit: &Lit) -> Lit { Lit::Str(str) => Lit::Str(Str::from(String::from(ast_str_to_string(str)))), Lit::Bool(_bool) => Lit::Bool(Bool::from(_bool.value)), Lit::Num(num) => Lit::Num(Number::from(num.value)), - Lit::BigInt(bigint) => Lit::BigInt(BigInt::from(bigint.value.clone())), + Lit::BigInt(bigint) => Lit::BigInt(BigInt::from(bigint.value.as_ref().clone())), Lit::Regex(regexp) => { Lit::Regex(ast::Regex { span: regexp.span.clone(), exp: regexp.exp.clone(), flags: regexp.flags.clone() }) } @@ -596,6 +595,9 @@ pub(crate) fn ast_str_to_string(str: &Str) -> String { pub(crate) fn ast_ident_to_string(ident: &Ident) -> String { String::from(ident.sym.chars().as_str()) } +pub(crate) fn ast_ident_name_to_string(ident: &IdentName) -> String { + String::from(ident.sym.chars().as_str()) +} pub(crate) fn unwrap_expr(mut expr: &Expr) -> &Expr { loop { @@ -896,6 +898,11 @@ pub(crate) fn find_decl_ident_from_decl0(decl: &Decl, idents: &mut Vec, f idents.push(clone_ident(ident)); } } + Decl::Using(decls) => { + for decl in decls.decls.iter() { + find_decl_ident_from_pattern0(&decl.name, idents); + } + } _ => {} } } @@ -975,8 +982,9 @@ pub(crate) fn generate_var_decl_stmts( let mut stmts = Vec::with_capacity(new_vars.len()); for (_, (kind, ident, expr)) in new_vars.drain() { - stmts.push(Stmt::Decl(Decl::Var(VarDecl { + stmts.push(Stmt::Decl(Decl::Var(Box::new(VarDecl { span: DUMMY_SP, + ctxt:SyntaxContext::empty(), kind, declare: false, decls: vec![VarDeclarator { @@ -985,7 +993,7 @@ pub(crate) fn generate_var_decl_stmts( init: expr, definite: false, }], - }))) + })))) } stmts @@ -1049,6 +1057,7 @@ impl_get_span!(swc_core::ecma::ast::ForStmt); impl_get_span!(swc_core::ecma::ast::Function); impl_get_span!(swc_core::ecma::ast::GetterProp); impl_get_span!(swc_core::ecma::ast::Ident); +impl_get_span!(swc_core::ecma::ast::IdentName); impl_get_span!(swc_core::ecma::ast::IfStmt); impl_get_span!(swc_core::ecma::ast::Import); impl_get_span!(swc_core::ecma::ast::ImportDecl); @@ -1056,6 +1065,7 @@ impl_get_span!(swc_core::ecma::ast::ImportDefaultSpecifier); impl_get_span!(swc_core::ecma::ast::ImportNamedSpecifier); impl_get_span!(swc_core::ecma::ast::ImportStarAsSpecifier); impl_get_span!(swc_core::ecma::ast::Invalid); +impl_get_span!(swc_core::ecma::ast::TsSatisfiesExpr); impl_get_span!(swc_core::ecma::ast::JSXClosingElement); impl_get_span!(swc_core::ecma::ast::JSXClosingFragment); impl_get_span!(swc_core::ecma::ast::JSXElement); @@ -1083,7 +1093,7 @@ impl_get_span!(swc_core::ecma::ast::PrivateMethod); impl_get_span!(swc_core::ecma::ast::PrivateName); impl_get_span!(swc_core::ecma::ast::PrivateProp); impl_get_span!(swc_core::ecma::ast::Regex); -impl_get_span!(swc_core::ecma::ast::ReservedUnused); +// impl_get_span!(swc_core::ecma::ast::ReservedUnused); impl_get_span!(swc_core::ecma::ast::RestPat); impl_get_span!(swc_core::ecma::ast::ReturnStmt); impl_get_span!(swc_core::ecma::ast::Script); @@ -1130,6 +1140,7 @@ impl_get_span!(swc_core::ecma::ast::TsMappedType); impl_get_span!(swc_core::ecma::ast::TsMethodSignature); impl_get_span!(swc_core::ecma::ast::TsModuleBlock); impl_get_span!(swc_core::ecma::ast::TsModuleDecl); +impl_get_span!(swc_core::ecma::ast::UsingDecl); impl_get_span!(swc_core::ecma::ast::TsNamespaceDecl); impl_get_span!(swc_core::ecma::ast::TsNamespaceExportDecl); impl_get_span!(swc_core::ecma::ast::TsNonNullExpr); @@ -1323,6 +1334,7 @@ impl AstSpanAccessor for Expr { Expr::PrivateName(expr) => expr.get_span(), Expr::OptChain(expr) => expr.get_span(), Expr::Invalid(expr) => expr.get_span(), + Expr::TsSatisfies(expr) => expr.get_span(), } } @@ -1365,6 +1377,7 @@ impl AstSpanAccessor for Expr { Expr::PrivateName(expr) => expr.set_span(_span), Expr::OptChain(expr) => expr.set_span(_span), Expr::Invalid(expr) => expr.set_span(_span), + Expr::TsSatisfies(expr) => expr.set_span(_span), } } } @@ -1379,6 +1392,7 @@ impl AstSpanAccessor for Decl { Decl::TsTypeAlias(decl) => decl.get_span(), Decl::TsEnum(decl) => decl.get_span(), Decl::TsModule(decl) => decl.get_span(), + Decl::Using(decl) => decl.get_span(), } } @@ -1391,6 +1405,7 @@ impl AstSpanAccessor for Decl { Decl::TsTypeAlias(decl) => decl.set_span(_span), Decl::TsEnum(decl) => decl.set_span(_span), Decl::TsModule(decl) => decl.set_span(_span), + Decl::Using(decl) => decl.set_span(_span), } } } diff --git a/package.json b/package.json index 19c3bbd..c4670f2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "swc-plugin-transform-vue3-jsx", - "version": "0.2.1", + "version": "0.3.0", "description": "SWC plugin for transform Vue3-jsx syntax", "author": "xxXyh1908", "license": "MIT", @@ -31,7 +31,7 @@ } }, "devDependencies": { - "@swc/core": "^1.3.1", + "@swc/core": "^1.4.0", "@types/node": "^18.7.19", "bumpp": "^8.2.1", "conventional-changelog-cli": "^2.2.2" diff --git a/playground/Cargo.toml b/playground/Cargo.toml index 02b81e8..226d5ce 100644 --- a/playground/Cargo.toml +++ b/playground/Cargo.toml @@ -16,8 +16,8 @@ lazy_static = "1.4.0" serde = "1" serde-wasm-bindgen = "0.4.3" serde_json = "1" -swc = ">=0.226.0" -swc_core = {version = ">=0.22.0", features = [ +swc = "0.290" +swc_core = {version = "0.109", features = [ "ecma_utils", "ecma_visit", "ecma_ast", @@ -27,8 +27,8 @@ swc_core = {version = ">=0.22.0", features = [ "common", "base", ]} -swc_ecma_transforms_base = ">=0.108.0" -swc_ecma_transforms_typescript = ">=0.154.0" +swc_ecma_transforms_base = "0.150" +swc_ecma_transforms_typescript = "0.203" vue3_jsx_folder = {path = "../folder"} wasm-bindgen = "0.2.82" diff --git a/playground/src/lib.rs b/playground/src/lib.rs index 24be0bd..fcd4efe 100644 --- a/playground/src/lib.rs +++ b/playground/src/lib.rs @@ -2,6 +2,7 @@ use std::path::Path; use anyhow::Error; use serde_wasm_bindgen::{from_value, to_value}; +use swc::PrintArgs; use swc_core::{ base::{ config::{IsModule, SourceMapsConfig}, @@ -69,7 +70,7 @@ fn _transform( None => FileName::Anon, }; - let fm = compiler.cm.new_source_file(filename, input.to_string()); + let fm = compiler.cm.new_source_file(filename.into(), input.to_string()); let comments = Some(compiler.comments() as &dyn Comments); let program = compiler.parse_js( @@ -100,25 +101,26 @@ fn _transform( } // Remove typescript types - program = program.fold_with(&mut strip(top_level_mark)); + program = program.fold_with(&mut strip(unresolved_mark, top_level_mark)); // Fix up any identifiers with the same name, but different contexts program = program.fold_with(&mut hygiene()); - let names = AHashMap::default(); + // let names = AHashMap::default(); let output = compiler.print( &program, - None, - None, - false, - EsVersion::latest(), - SourceMapsConfig::Bool(true), - &names, - None, - false, - Some(compiler.comments()), - true, - false, + PrintArgs::default() + // None, + // None, + // false, + // EsVersion::latest(), + // SourceMapsConfig::Bool(true), + // &names, + // None, + // false, + // Some(compiler.comments()), + // true, + // false, ); output From 93067bfbc062a6c9640729a7cde8c3585434cc03 Mon Sep 17 00:00:00 2001 From: chenyulun390 Date: Fri, 1 Nov 2024 11:39:04 +0800 Subject: [PATCH 2/2] fix(): change config --- .cargo/config.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 2b377d0..a79db2a 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,5 +1,5 @@ # These command aliases are not final, may change [alias] # Alias to build actual plugin binary for the specified target. -build-wasi = "build --target wasm32-wasip1" -build-wasm32 = "build --target wasm32-unknown-unknown" +build-wasi = "build --target wasm32-wasi" +build-wasm32 = "build --target wasm32-unknown-unknown" \ No newline at end of file