diff --git a/bun.lockb b/bun.lockb index 9d3e904..04b9e95 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/nodedevpkg/monobundle/package.json b/nodedevpkg/monobundle/package.json index a782e75..c29bcf3 100644 --- a/nodedevpkg/monobundle/package.json +++ b/nodedevpkg/monobundle/package.json @@ -16,13 +16,13 @@ "@innoai-tech/vuecomponentcompleter": "workspace:^", "@rollup/plugin-commonjs": "^28.0.1", "@rollup/plugin-node-resolve": "^15.3.0", - "browserslist": "^4.24.0", + "browserslist": "^4.24.2", "chalk": "^5.3.0", "esbuild": "^0.24.0", "globby": "^14.0.2", "js-yaml": "^4.1.0", "minimatch": "^10.0.1", - "rollup": "^4.24.0", + "rollup": "^4.27.4", "yargs": "^17.7.2" }, "peerDependencies": { diff --git a/nodedevpkg/purebundle/Cargo.lock b/nodedevpkg/purebundle/Cargo.lock index 3157b7d..5678b07 100644 --- a/nodedevpkg/purebundle/Cargo.lock +++ b/nodedevpkg/purebundle/Cargo.lock @@ -63,25 +63,25 @@ checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "ast_node" -version = "0.9.9" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9184f2b369b3e8625712493c89b785881f27eedc6cde480a81883cef78868b2" +checksum = "f4d23a6d1d5f18bdbc06d9aa908880e5f49205156ba804751af731c51f5cf81a" dependencies = [ "proc-macro2", "quote", - "swc_macros_common", + "swc_macros_common 0.3.13", "syn 2.0.72", ] [[package]] name = "ast_node" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4d23a6d1d5f18bdbc06d9aa908880e5f49205156ba804751af731c51f5cf81a" +checksum = "94741d66bdda032fcbf33e621b4e3a888d7d11bd3ac4446d82c5593a136936ff" dependencies = [ "proc-macro2", "quote", - "swc_macros_common", + "swc_macros_common 1.0.0", "syn 2.0.72", ] @@ -115,6 +115,15 @@ dependencies = [ "scoped-tls", ] +[[package]] +name = "better_scoped_tls" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50fd297a11c709be8348aec039c8b91de16075d2b2bdaee1bd562c0875993664" +dependencies = [ + "scoped-tls", +] + [[package]] name = "bitflags" version = "2.6.0" @@ -391,23 +400,23 @@ dependencies = [ [[package]] name = "from_variant" -version = "0.1.9" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32016f1242eb82af5474752d00fd8ebcd9004bd69b462b1c91de833972d08ed4" +checksum = "e8d8947525c49c73130b5a7187b55b027b6b78fe60268d9f4c283ed690698cb1" dependencies = [ "proc-macro2", - "swc_macros_common", + "swc_macros_common 0.3.13", "syn 2.0.72", ] [[package]] name = "from_variant" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d8947525c49c73130b5a7187b55b027b6b78fe60268d9f4c283ed690698cb1" +checksum = "8d7ccf961415e7aa17ef93dcb6c2441faaa8e768abe09e659b908089546f74c5" dependencies = [ "proc-macro2", - "swc_macros_common", + "swc_macros_common 1.0.0", "syn 2.0.72", ] @@ -477,9 +486,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hstr" -version = "0.2.10" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96274be293b8877e61974a607105d09c84caebe9620b47774aa8a6b942042dd4" +checksum = "dae404c0c5d4e95d4858876ab02eecd6a196bb8caa42050dfa809938833fc412" dependencies = [ "hashbrown 0.14.5", "new_debug_unreachable", @@ -821,10 +830,8 @@ dependencies = [ name = "purebundle" version = "0.1.0" dependencies = [ - "serde", "swc_core", - "swc_ecma_utils 0.134.1", - "testing 0.39.0", + "testing 0.42.0", ] [[package]] @@ -927,9 +934,9 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.44" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" +checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" dependencies = [ "bitvec", "bytecheck", @@ -945,9 +952,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.44" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" +checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" dependencies = [ "proc-macro2", "quote", @@ -1183,13 +1190,13 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "string_enum" -version = "0.4.4" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e383308aebc257e7d7920224fa055c632478d92744eca77f99be8fa1545b90" +checksum = "c9fe66b8ee349846ce2f9557a26b8f1e74843c4a13fb381f9a3d73617a5f956a" dependencies = [ "proc-macro2", "quote", - "swc_macros_common", + "swc_macros_common 1.0.0", "syn 2.0.72", ] @@ -1212,11 +1219,24 @@ dependencies = [ "triomphe", ] +[[package]] +name = "swc_allocator" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52cacc28f0ada8e4e31a720dd849ff06864b10e6ab0a1aaa99c06456cfe046af" +dependencies = [ + "bumpalo", + "hashbrown 0.14.5", + "ptr_meta", + "rustc-hash", + "triomphe", +] + [[package]] name = "swc_atoms" -version = "0.6.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6567e4e67485b3e7662b486f1565bdae54bd5b9d6b16b2ba1a9babb1e42125" +checksum = "0963b5f4cb08353dd4a386c7b5ee1c99d5a097722cdbc6a522efb2aeb91aad71" dependencies = [ "hstr", "once_cell", @@ -1226,9 +1246,9 @@ dependencies = [ [[package]] name = "swc_atoms" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0963b5f4cb08353dd4a386c7b5ee1c99d5a097722cdbc6a522efb2aeb91aad71" +checksum = "5d7211e5c57ea972f32b8a104d7006c4a68d094ec30c6a73bcd20d4d6c473c7c" dependencies = [ "bytecheck", "hstr", @@ -1240,15 +1260,15 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.37.3" +version = "0.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4a06183537a32e2213b4eebfacd8e0a3e9191c9c6f6b50fae8c19d808bb601" +checksum = "95fca87acdd34580b59a6f6686dfe72bcc7bad4b7abb7e6728e8e3fd4ecb1d7c" dependencies = [ - "ast_node 0.9.9", - "better_scoped_tls", + "ast_node 1.0.0", + "better_scoped_tls 0.1.1", "cfg-if", "either", - "from_variant 0.1.9", + "from_variant 1.0.0", "new_debug_unreachable", "num-bigint", "once_cell", @@ -1256,10 +1276,10 @@ dependencies = [ "rustc-hash", "serde", "siphasher", - "swc_allocator", - "swc_atoms 0.6.7", - "swc_eq_ignore_macros", - "swc_visit", + "swc_allocator 0.1.8", + "swc_atoms 1.0.0", + "swc_eq_ignore_macros 0.1.4", + "swc_visit 0.6.1", "termcolor", "tracing", "unicode-width", @@ -1268,17 +1288,17 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.40.0" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fca87acdd34580b59a6f6686dfe72bcc7bad4b7abb7e6728e8e3fd4ecb1d7c" +checksum = "4f87a21612a324493fd065e9c6fea960b4031088a213db782e2ca71d2fabb3ec" dependencies = [ "anyhow", - "ast_node 1.0.0", - "better_scoped_tls", + "ast_node 2.0.0", + "better_scoped_tls 1.0.0", "bytecheck", "cfg-if", "either", - "from_variant 1.0.0", + "from_variant 2.0.0", "new_debug_unreachable", "num-bigint", "once_cell", @@ -1288,10 +1308,10 @@ dependencies = [ "serde", "siphasher", "sourcemap", - "swc_allocator", - "swc_atoms 1.0.0", - "swc_eq_ignore_macros", - "swc_visit", + "swc_allocator 1.0.0", + "swc_atoms 2.0.0", + "swc_eq_ignore_macros 1.0.0", + "swc_visit 2.0.0", "termcolor", "tracing", "unicode-width", @@ -1300,19 +1320,19 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.106.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57e99f5a654203ac30e8b819a7c36a913d7620210ef43d7ca04e1269bbd17781" +checksum = "9b7891f75c3ecd9061dd9c70612cbfabaf8f06403d44f0094227ee29a29a7d2d" dependencies = [ "once_cell", - "swc_allocator", - "swc_atoms 1.0.0", - "swc_common 0.40.0", - "swc_ecma_ast 0.121.0", + "swc_allocator 1.0.0", + "swc_atoms 2.0.0", + "swc_common 4.0.1", + "swc_ecma_ast", "swc_ecma_parser", "swc_ecma_transforms_base", "swc_ecma_transforms_testing", - "swc_ecma_visit 0.107.0", + "swc_ecma_visit", "swc_plugin", "swc_plugin_macro", "swc_plugin_proxy", @@ -1321,26 +1341,9 @@ dependencies = [ [[package]] name = "swc_ecma_ast" -version = "0.118.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6c1b94abbaf080a4e4ae47101a83d4eedef90d733dd98e32b361356d3f5e4b" -dependencies = [ - "bitflags", - "is-macro", - "num-bigint", - "phf", - "scoped-tls", - "string_enum", - "swc_atoms 0.6.7", - "swc_common 0.37.3", - "unicode-id-start", -] - -[[package]] -name = "swc_ecma_ast" -version = "0.121.0" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1628b2c0c6349c1960b007fda04e0c1537480e0d0b1405305ef5846b752aa7a8" +checksum = "1bdab7759509c1b37ec77bd9fc231f525b888d9609c2963ce71995da1b27357c" dependencies = [ "bitflags", "bytecheck", @@ -1350,16 +1353,17 @@ dependencies = [ "rkyv", "scoped-tls", "string_enum", - "swc_atoms 1.0.0", - "swc_common 0.40.0", + "swc_atoms 2.0.0", + "swc_common 4.0.1", + "swc_visit 2.0.0", "unicode-id-start", ] [[package]] name = "swc_ecma_codegen" -version = "0.158.0" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25aef555943803034f0e0fd98ddfe72f1c3454f2c68a897075eb29bc63d4e930" +checksum = "e474f6c2671524dbb179b44a36425cb1a58928f0f7211c45043f0951a1842c5d" dependencies = [ "memchr", "num-bigint", @@ -1367,31 +1371,31 @@ dependencies = [ "regex", "serde", "sourcemap", - "swc_allocator", - "swc_atoms 1.0.0", - "swc_common 0.40.0", - "swc_ecma_ast 0.121.0", + "swc_allocator 1.0.0", + "swc_atoms 2.0.0", + "swc_common 4.0.1", + "swc_ecma_ast", "swc_ecma_codegen_macros", "tracing", ] [[package]] name = "swc_ecma_codegen_macros" -version = "0.7.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859fabde36db38634f3fad548dd5e3410c1aebba1b67a3c63e67018fa57a0bca" +checksum = "5f9a42f479a6475647e248fa9750982c87cd985e19d1016a1fc18a70682305d1" dependencies = [ "proc-macro2", "quote", - "swc_macros_common", + "swc_macros_common 1.0.0", "syn 2.0.72", ] [[package]] name = "swc_ecma_parser" -version = "0.152.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ef96894fa0fb3fba233ede22a75a7ddd8b7f0727a40aa8d1028b5dd25013d2e" +checksum = "54c5ab8bd4cc4a4956514699c84d1a25cdb5a33f5ec760ec64ce712e973019c9" dependencies = [ "either", "new_debug_unreachable", @@ -1402,33 +1406,33 @@ dependencies = [ "smallvec", "smartstring", "stacker", - "swc_atoms 1.0.0", - "swc_common 0.40.0", - "swc_ecma_ast 0.121.0", + "swc_atoms 2.0.0", + "swc_common 4.0.1", + "swc_ecma_ast", "tracing", "typed-arena", ] [[package]] name = "swc_ecma_testing" -version = "0.29.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d88a64496b73a0e9c9d8333d14d39904e8d87dbcefe7baaa161803a7f5bae110" +checksum = "9d0397cdbbdcfec2048da1291f44e2d433471fab9bfb430f8f879a831242d636" dependencies = [ "anyhow", "hex", "sha2", - "testing 0.42.0", + "testing 4.0.0", "tracing", ] [[package]] name = "swc_ecma_transforms_base" -version = "0.149.0" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2194d20416a03ae02058934f8387691809f86466a2f2e7a65c56dcb001bd46b" +checksum = "0eb4000822f02b54af0be4f668649fa1e5555f1e3392479d17a277eb81a841f0" dependencies = [ - "better_scoped_tls", + "better_scoped_tls 1.0.0", "bitflags", "indexmap", "once_cell", @@ -1436,20 +1440,20 @@ dependencies = [ "rustc-hash", "serde", "smallvec", - "swc_atoms 1.0.0", - "swc_common 0.40.0", - "swc_ecma_ast 0.121.0", + "swc_atoms 2.0.0", + "swc_common 4.0.1", + "swc_ecma_ast", "swc_ecma_parser", - "swc_ecma_utils 0.137.0", - "swc_ecma_visit 0.107.0", + "swc_ecma_utils", + "swc_ecma_visit", "tracing", ] [[package]] name = "swc_ecma_transforms_testing" -version = "0.152.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0cd337a171f362abb45841429b75c8fa78750fefa4896c8b1900ba16e4a2e71" +checksum = "21721599724e9f9c40467ff9cdd20f045f134c26e5fe794b1ee6708798c724ed" dependencies = [ "ansi_term", "anyhow", @@ -1459,91 +1463,68 @@ dependencies = [ "serde_json", "sha2", "sourcemap", - "swc_common 0.40.0", - "swc_ecma_ast 0.121.0", + "swc_common 4.0.1", + "swc_ecma_ast", "swc_ecma_codegen", "swc_ecma_parser", "swc_ecma_testing", "swc_ecma_transforms_base", - "swc_ecma_utils 0.137.0", - "swc_ecma_visit 0.107.0", + "swc_ecma_utils", + "swc_ecma_visit", "tempfile", - "testing 0.42.0", -] - -[[package]] -name = "swc_ecma_utils" -version = "0.134.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde8f1ef3f7bd53340c7bd679f1ec563a45225ac8fb63f22d6de1ff4b345475d" -dependencies = [ - "indexmap", - "num_cpus", - "once_cell", - "rustc-hash", - "ryu-js", - "swc_atoms 0.6.7", - "swc_common 0.37.3", - "swc_ecma_ast 0.118.1", - "swc_ecma_visit 0.104.5", - "tracing", - "unicode-id", + "testing 4.0.0", ] [[package]] name = "swc_ecma_utils" -version = "0.137.0" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "939f21c75eff61ad3e485fc54d38988f2f9744ceda24a3feb8228dd072171d94" +checksum = "0eb9a28511d17d1e6c5dfcf209368a1da4a542270c450fba7f27faf22c34df22" dependencies = [ "indexmap", "num_cpus", "once_cell", "rustc-hash", "ryu-js", - "swc_atoms 1.0.0", - "swc_common 0.40.0", - "swc_ecma_ast 0.121.0", - "swc_ecma_visit 0.107.0", + "swc_atoms 2.0.0", + "swc_common 4.0.1", + "swc_ecma_ast", + "swc_ecma_visit", "tracing", "unicode-id", ] [[package]] name = "swc_ecma_visit" -version = "0.104.5" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71f5f97db49b96208805104b381c5e117f55fad5f3d178e626c92934a4d0e36" +checksum = "c5af5332117aa0424e418556f74e9cee335dc47eb7ae35dddbd9fd65fc01452c" dependencies = [ "new_debug_unreachable", "num-bigint", - "swc_atoms 0.6.7", - "swc_common 0.37.3", - "swc_ecma_ast 0.118.1", - "swc_visit", + "swc_atoms 2.0.0", + "swc_common 4.0.1", + "swc_ecma_ast", + "swc_visit 2.0.0", "tracing", ] [[package]] -name = "swc_ecma_visit" -version = "0.107.0" +name = "swc_eq_ignore_macros" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15bd17e03251272ee04d1155036be5288055ab43d40ab2d9fd63ff815d326dad" +checksum = "63db0adcff29d220c3d151c5b25c0eabe7e32dd936212b84cdaa1392e3130497" dependencies = [ - "new_debug_unreachable", - "num-bigint", - "swc_atoms 1.0.0", - "swc_common 0.40.0", - "swc_ecma_ast 0.121.0", - "swc_visit", - "tracing", + "proc-macro2", + "quote", + "syn 2.0.72", ] [[package]] name = "swc_eq_ignore_macros" -version = "0.1.4" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63db0adcff29d220c3d151c5b25c0eabe7e32dd936212b84cdaa1392e3130497" +checksum = "e96e15288bf385ab85eb83cff7f9e2d834348da58d0a31b33bdb572e66ee413e" dependencies = [ "proc-macro2", "quote", @@ -1552,28 +1533,28 @@ dependencies = [ [[package]] name = "swc_error_reporters" -version = "0.21.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d049e9256abf29d9fc66d3db3ea44b6815a64ad565ce31e117a74ee96478bb3" +checksum = "83f9286183c9be40aafcbbe8c397403fb32af812a3dffe93eee9067aee4fbedb" dependencies = [ "anyhow", "miette", "once_cell", "parking_lot", - "swc_common 0.37.3", + "swc_common 0.40.0", ] [[package]] name = "swc_error_reporters" -version = "1.0.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83f9286183c9be40aafcbbe8c397403fb32af812a3dffe93eee9067aee4fbedb" +checksum = "fb4a3c124af5d297d98e6c18776ba04024087cde14602621017e8e9c6cd1c2d1" dependencies = [ "anyhow", "miette", "once_cell", "parking_lot", - "swc_common 0.40.0", + "swc_common 4.0.1", ] [[package]] @@ -1587,20 +1568,31 @@ dependencies = [ "syn 2.0.72", ] +[[package]] +name = "swc_macros_common" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a509f56fca05b39ba6c15f3e58636c3924c78347d63853632ed2ffcb6f5a0ac7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.72", +] + [[package]] name = "swc_plugin" -version = "0.90.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd2ab83a683ee8cdd8be4ce3f363d760a9977d4539aeaee5dbed179ec49fcc7" +checksum = "6b45099a38ed45528bef939d0eac1a0c1347749d0c67d3dd744d545316c5fd05" dependencies = [ "once_cell", ] [[package]] name = "swc_plugin_macro" -version = "0.9.16" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3232db481484070637b20a155c064096c0ea1ba04fa2247b89b618661b3574f4" +checksum = "0917ccfdcd3fa6cf41bdacef2388702a3b274f9ea708d930e1e8db37c7c3e1c6" dependencies = [ "proc-macro2", "quote", @@ -1609,23 +1601,23 @@ dependencies = [ [[package]] name = "swc_plugin_proxy" -version = "0.50.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7d1ff72008f9a4dd53b5b79f64057a59bedb3245ae17165fa8aece8b2da4782" +checksum = "6749c4027aad79cf648ffce6633100ea01a7b0d6cf17299cfa68ce141897c26c" dependencies = [ - "better_scoped_tls", + "better_scoped_tls 1.0.0", "rkyv", - "swc_common 0.40.0", - "swc_ecma_ast 0.121.0", + "swc_common 4.0.1", + "swc_ecma_ast", "swc_trace_macro", "tracing", ] [[package]] name = "swc_trace_macro" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69aa25f667e4d74ab10a17a266edeb8b354273817b20b91e60471f1c860a221b" +checksum = "4c78717a841565df57f811376a3d19c9156091c55175e12d378f3a522de70cef" dependencies = [ "proc-macro2", "quote", @@ -1641,6 +1633,16 @@ dependencies = [ "either", ] +[[package]] +name = "swc_visit" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9138b6a36bbe76dd6753c4c0794f7e26480ea757bee499738bedbbb3ae3ec5f3" +dependencies = [ + "either", + "new_debug_unreachable", +] + [[package]] name = "syn" version = "1.0.109" @@ -1692,9 +1694,9 @@ dependencies = [ [[package]] name = "testing" -version = "0.39.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3105e9569b7f674d1107d19494c993aafd19ea51f7a558b96b267b49c9b5f2bf" +checksum = "cb07036f78601d34da9ba6855e8694ee5f420b915b59c2e44283be0606ae304f" dependencies = [ "ansi_term", "cargo_metadata", @@ -1704,18 +1706,18 @@ dependencies = [ "regex", "serde", "serde_json", - "swc_common 0.37.3", - "swc_error_reporters 0.21.0", - "testing_macros", + "swc_common 0.40.0", + "swc_error_reporters 1.0.0", + "testing_macros 0.2.14", "tracing", "tracing-subscriber", ] [[package]] name = "testing" -version = "0.42.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb07036f78601d34da9ba6855e8694ee5f420b915b59c2e44283be0606ae304f" +checksum = "1c6b200c27382caadd583563c79cdf870d854e14c4c078731d447ecbfe27c35f" dependencies = [ "ansi_term", "cargo_metadata", @@ -1725,9 +1727,9 @@ dependencies = [ "regex", "serde", "serde_json", - "swc_common 0.40.0", - "swc_error_reporters 1.0.0", - "testing_macros", + "swc_common 4.0.1", + "swc_error_reporters 5.0.0", + "testing_macros 1.0.0", "tracing", "tracing-subscriber", ] @@ -1748,6 +1750,22 @@ dependencies = [ "syn 2.0.72", ] +[[package]] +name = "testing_macros" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2d27bf245b90a80d5aa231133418ae7db98f032855ce5292e12071ab29c4b26" +dependencies = [ + "anyhow", + "glob", + "once_cell", + "proc-macro2", + "quote", + "regex", + "relative-path", + "syn 2.0.72", +] + [[package]] name = "textwrap" version = "0.16.1" diff --git a/nodedevpkg/purebundle/Cargo.toml b/nodedevpkg/purebundle/Cargo.toml index 77f7ffa..285c7f6 100644 --- a/nodedevpkg/purebundle/Cargo.toml +++ b/nodedevpkg/purebundle/Cargo.toml @@ -10,9 +10,7 @@ crate-type = ["cdylib", "rlib"] lto = true [dependencies] -serde = { version = "1", features = ["derive"] } -swc_core = { version = "0.106", features = ["ecma_plugin_transform", "__parser"] } -swc_ecma_utils = { version = "0" } +swc_core = { version = "6.0.1", features = ["ecma_plugin_transform", "__parser"] } [dev-dependencies] testing = { version = "*" } diff --git a/nodedevpkg/purebundle/package.json b/nodedevpkg/purebundle/package.json index a20cb8e..fe46604 100644 --- a/nodedevpkg/purebundle/package.json +++ b/nodedevpkg/purebundle/package.json @@ -1,8 +1,8 @@ { "name": "@innoai-tech/purebundle", - "version": "0.4.2", + "version": "0.5.0", "dependencies": { - "@swc/core": "^1.7.36" + "@swc/core": "^1.9.3" }, "exports": { ".": { diff --git a/nodedevpkg/purebundle/src/annotate_pure_calls/mod.rs b/nodedevpkg/purebundle/src/annotate_pure_calls/mod.rs index faa8e23..ddb5c30 100644 --- a/nodedevpkg/purebundle/src/annotate_pure_calls/mod.rs +++ b/nodedevpkg/purebundle/src/annotate_pure_calls/mod.rs @@ -1,14 +1,14 @@ use swc_core::common::comments::Comments; use swc_core::ecma::ast::{ - ArrayLit, AssignExpr, AssignProp, CallExpr, Expr, Ident, KeyValueProp, Pat, VarDeclarator, + ArrayLit, AssignExpr, AssignProp, CallExpr, Expr, Ident, KeyValueProp, Pass, Pat, VarDeclarator, }; -use swc_core::ecma::visit::{as_folder, noop_visit_mut_type, Fold, VisitMut, VisitMutWith}; +use swc_core::ecma::visit::{noop_visit_mut_type, visit_mut_pass, VisitMut, VisitMutWith}; -pub fn annotate_pure_calls(comments: C) -> impl Fold + VisitMut +pub fn annotate_pure_calls(comments: C) -> impl VisitMut + Pass where C: Comments + Clone, { - as_folder(PureAnnotation { + visit_mut_pass(PureAnnotation { comments: Some(comments), }) } diff --git a/nodedevpkg/purebundle/src/ignore_side_imports/mod.rs b/nodedevpkg/purebundle/src/ignore_side_imports/mod.rs index 3d389ce..2476029 100644 --- a/nodedevpkg/purebundle/src/ignore_side_imports/mod.rs +++ b/nodedevpkg/purebundle/src/ignore_side_imports/mod.rs @@ -1,8 +1,8 @@ -use swc_core::ecma::ast::{ModuleDecl, ModuleItem}; -use swc_core::ecma::visit::{as_folder, noop_visit_mut_type, Fold, VisitMut, VisitMutWith}; +use swc_core::ecma::ast::{ModuleDecl, ModuleItem, Pass}; +use swc_core::ecma::visit::{noop_visit_mut_type, visit_mut_pass, VisitMut, VisitMutWith}; -pub fn ignore_side_imports() -> impl Fold + VisitMut { - as_folder(IgnoreSideImports {}) +pub fn ignore_side_imports() -> impl VisitMut + Pass { + visit_mut_pass(IgnoreSideImports {}) } struct IgnoreSideImports {} @@ -24,16 +24,16 @@ impl VisitMut for IgnoreSideImports { } } - #[cfg(test)] mod test { - use swc_core::common::{chain, Mark}; + use swc_core::common::Mark; use swc_core::ecma::transforms::base::resolver; use swc_core::ecma::transforms::testing::{test, Tester}; use swc_core::ecma::{ parser::{Syntax, TsSyntax}, - visit::{as_folder, Fold}, + visit::{visit_mut_pass}, }; + use swc_core::ecma::ast::Pass; const SYNTAX: Syntax = Syntax::Typescript(TsSyntax { tsx: true, @@ -43,14 +43,16 @@ mod test { disallow_ambiguous_jsx_like: true, }); - fn runner(_: &mut Tester) -> impl Fold { - chain!( + fn runner(_: &mut Tester) -> impl Pass { + ( resolver(Mark::new(), Mark::new(), false), - as_folder(super::IgnoreSideImports{}) + visit_mut_pass(super::IgnoreSideImports {}), ) } - swc_core::ecma::transforms::testing::test_inline!(SYNTAX, runner, + swc_core::ecma::transforms::testing::test_inline!( + SYNTAX, + runner, /* Name */ side_import_should_drop, /* Input */ r#" import { x } from "x" @@ -60,4 +62,4 @@ mod test { import { x } from "x" "# ); -} \ No newline at end of file +} diff --git a/nodedevpkg/purebundle/src/lib.rs b/nodedevpkg/purebundle/src/lib.rs index ecf585f..2bc1a48 100644 --- a/nodedevpkg/purebundle/src/lib.rs +++ b/nodedevpkg/purebundle/src/lib.rs @@ -1,4 +1,3 @@ -use swc_core::ecma::visit::FoldWith; use swc_core::plugin::metadata::TransformPluginProgramMetadata; use swc_core::{ecma::ast::Program, plugin::plugin_transform}; @@ -11,6 +10,6 @@ mod ignore_side_imports; #[plugin_transform] pub fn process_transform(program: Program, metadata: TransformPluginProgramMetadata) -> Program { program - .fold_with(&mut ignore_side_imports()) - .fold_with(&mut annotate_pure_calls(metadata.comments.clone())) + .apply(&mut ignore_side_imports()) + .apply(&mut annotate_pure_calls(metadata.comments.clone())) } diff --git a/nodedevpkg/vuecomponentcompleter/Cargo.lock b/nodedevpkg/vuecomponentcompleter/Cargo.lock index 5a467c7..4929c1c 100644 --- a/nodedevpkg/vuecomponentcompleter/Cargo.lock +++ b/nodedevpkg/vuecomponentcompleter/Cargo.lock @@ -2,12 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" - [[package]] name = "ahash" version = "0.7.8" @@ -42,9 +36,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" [[package]] name = "ansi_term" @@ -57,39 +51,27 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.89" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" - -[[package]] -name = "ast_node" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9184f2b369b3e8625712493c89b785881f27eedc6cde480a81883cef78868b2" -dependencies = [ - "proc-macro2", - "quote", - "swc_macros_common", - "syn 2.0.72", -] +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "ast_node" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4d23a6d1d5f18bdbc06d9aa908880e5f49205156ba804751af731c51f5cf81a" +checksum = "94741d66bdda032fcbf33e621b4e3a888d7d11bd3ac4446d82c5593a136936ff" dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.72", + "syn 2.0.89", ] [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "base64" @@ -108,9 +90,9 @@ dependencies = [ [[package]] name = "better_scoped_tls" -version = "0.1.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "794edcc9b3fb07bb4aecaa11f093fd45663b4feadb782d68303a2268bc2701de" +checksum = "50fd297a11c709be8348aec039c8b91de16075d2b2bdaee1bd562c0875993664" dependencies = [ "scoped-tls", ] @@ -175,15 +157,15 @@ dependencies = [ [[package]] name = "bytes" -version = "1.6.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] name = "camino" -version = "1.1.7" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] @@ -213,9 +195,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.6" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aba8f4e9906c7ce3c73463f62a7f0c65183ada1a2d47e397cc8810827f9694f" +checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" +dependencies = [ + "shlex", +] [[package]] name = "cfg-if" @@ -234,9 +219,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -272,7 +257,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.72", + "syn 2.0.89", ] [[package]] @@ -283,7 +268,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.72", + "syn 2.0.89", ] [[package]] @@ -304,33 +289,33 @@ dependencies = [ [[package]] name = "derive_builder" -version = "0.20.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd33f37ee6a119146a1781d3356a7c26028f83d779b2e04ecd45fdc75c76877b" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" dependencies = [ "derive_builder_macro", ] [[package]] name = "derive_builder_core" -version = "0.20.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7431fa049613920234f22c47fdc33e6cf3ee83067091ea4277a3f8c4587aae38" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.89", ] [[package]] name = "derive_builder_macro" -version = "0.20.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4abae7035bf79b9877b779505d8cf3749285b80c43941eda66604841889451dc" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.72", + "syn 2.0.89", ] [[package]] @@ -355,6 +340,17 @@ dependencies = [ "crypto-common", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "either" version = "1.13.0" @@ -374,14 +370,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "fastrand" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "fnv" @@ -400,24 +396,13 @@ dependencies = [ [[package]] name = "from_variant" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32016f1242eb82af5474752d00fd8ebcd9004bd69b462b1c91de833972d08ed4" -dependencies = [ - "proc-macro2", - "swc_macros_common", - "syn 2.0.72", -] - -[[package]] -name = "from_variant" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d8947525c49c73130b5a7187b55b027b6b78fe60268d9f4c283ed690698cb1" +checksum = "8d7ccf961415e7aa17ef93dcb6c2441faaa8e768abe09e659b908089546f74c5" dependencies = [ "proc-macro2", "swc_macros_common", - "syn 2.0.72", + "syn 2.0.89", ] [[package]] @@ -472,6 +457,18 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.3.9" @@ -486,9 +483,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hstr" -version = "0.2.10" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96274be293b8877e61974a607105d09c84caebe9620b47774aa8a6b942042dd4" +checksum = "dae404c0c5d4e95d4858876ab02eecd6a196bb8caa42050dfa809938833fc412" dependencies = [ "hashbrown 0.14.5", "new_debug_unreachable", @@ -498,6 +495,124 @@ dependencies = [ "triomphe", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -506,12 +621,23 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "icu_normalizer", + "icu_properties", ] [[package]] @@ -522,31 +648,31 @@ checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" [[package]] name = "indexmap" -version = "2.2.6" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.2", ] [[package]] name = "is-macro" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59a85abdc13717906baccb5a1e435556ce0df215f242892f721dff62bf25288f" +checksum = "1d57a3e447e24c22647738e4607f1df1e0ec6f72e16182c4cd199f647cdfb0e4" dependencies = [ - "Inflector", + "heck", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.89", ] [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "540654e97a3f4470a492cd30ff187bc95d89557a903a2bbf112e2fae98104ef2" [[package]] name = "lazy_static" @@ -556,9 +682,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.155" +version = "0.2.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" [[package]] name = "linux-raw-sys" @@ -566,6 +692,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" + [[package]] name = "lock_api" version = "0.4.12" @@ -619,7 +751,7 @@ checksum = "dcf09caffaac8068c346b6df2a7fc27a177fd20b39421a39ce0a211bde679a6c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.89", ] [[package]] @@ -679,9 +811,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "outref" @@ -697,9 +829,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "owo-colors" -version = "4.0.0" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caff54706df99d2a78a5a4e3455ff45448d81ef1bb63c22cd14052ca0e993a3f" +checksum = "fb37767f6569cd834a413442455e0f066d0d522de8630436e2a1761d9726ba56" [[package]] name = "parking_lot" @@ -760,7 +892,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.89", ] [[package]] @@ -774,15 +906,15 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pretty_assertions" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" dependencies = [ "diff", "yansi", @@ -790,18 +922,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] [[package]] name = "psm" -version = "0.1.21" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" +checksum = "200b9ff220857e53e184257720a14553b2f4aa02577d2ed9842d45d4b9654810" dependencies = [ "cc", ] @@ -828,9 +960,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -858,23 +990,23 @@ checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags", ] [[package]] name = "regex" -version = "1.10.6" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", ] [[package]] @@ -888,13 +1020,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", ] [[package]] @@ -905,9 +1037,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "relative-path" @@ -926,9 +1058,9 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.44" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" +checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" dependencies = [ "bitvec", "bytecheck", @@ -944,9 +1076,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.44" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" +checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" dependencies = [ "proc-macro2", "quote", @@ -970,22 +1102,22 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" dependencies = [ "bitflags", "errno", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "ryu" @@ -1043,31 +1175,32 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.204" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.204" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.89", ] [[package]] name = "serde_json" -version = "1.0.120" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -1092,6 +1225,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "simd-abstraction" version = "0.7.1" @@ -1103,9 +1242,9 @@ dependencies = [ [[package]] name = "simdutf8" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "siphasher" @@ -1138,9 +1277,9 @@ checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" [[package]] name = "sourcemap" -version = "9.0.0" +version = "9.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dab08a862c70980b8e23698b507e272317ae52a608a164a844111f5372374f1f" +checksum = "4d146f02f4bbbabbbe3da0f9cd3ea2ab779defc4ed1f070b5bd83ea48ed78811" dependencies = [ "base64-simd", "bitvec", @@ -1163,15 +1302,15 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "stacker" -version = "0.1.15" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" +checksum = "799c883d55abdb5e98af1a7b3f23b9b6de8ecada0ecac058672d7635eb48ca7b" dependencies = [ "cc", "cfg-if", "libc", "psm", - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -1182,14 +1321,14 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "string_enum" -version = "0.4.4" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e383308aebc257e7d7920224fa055c632478d92744eca77f99be8fa1545b90" +checksum = "c9fe66b8ee349846ce2f9557a26b8f1e74843c4a13fb381f9a3d73617a5f956a" dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.72", + "syn 2.0.89", ] [[package]] @@ -1200,9 +1339,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "swc_allocator" -version = "0.1.8" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc8bd3075d1c6964010333fae9ddcd91ad422a4f8eb8b3206a9b2b6afb4209e" +checksum = "52cacc28f0ada8e4e31a720dd849ff06864b10e6ab0a1aaa99c06456cfe046af" dependencies = [ "bumpalo", "hashbrown 0.14.5", @@ -1213,21 +1352,9 @@ dependencies = [ [[package]] name = "swc_atoms" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6567e4e67485b3e7662b486f1565bdae54bd5b9d6b16b2ba1a9babb1e42125" -dependencies = [ - "hstr", - "once_cell", - "rustc-hash", - "serde", -] - -[[package]] -name = "swc_atoms" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0963b5f4cb08353dd4a386c7b5ee1c99d5a097722cdbc6a522efb2aeb91aad71" +checksum = "5d7211e5c57ea972f32b8a104d7006c4a68d094ec30c6a73bcd20d4d6c473c7c" dependencies = [ "bytecheck", "hstr", @@ -1239,45 +1366,17 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.37.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4a06183537a32e2213b4eebfacd8e0a3e9191c9c6f6b50fae8c19d808bb601" -dependencies = [ - "ast_node 0.9.9", - "better_scoped_tls", - "cfg-if", - "either", - "from_variant 0.1.9", - "new_debug_unreachable", - "num-bigint", - "once_cell", - "parking_lot", - "rustc-hash", - "serde", - "siphasher", - "swc_allocator", - "swc_atoms 0.6.7", - "swc_eq_ignore_macros", - "swc_visit", - "termcolor", - "tracing", - "unicode-width", - "url", -] - -[[package]] -name = "swc_common" -version = "0.40.0" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fca87acdd34580b59a6f6686dfe72bcc7bad4b7abb7e6728e8e3fd4ecb1d7c" +checksum = "4f87a21612a324493fd065e9c6fea960b4031088a213db782e2ca71d2fabb3ec" dependencies = [ "anyhow", - "ast_node 1.0.0", + "ast_node", "better_scoped_tls", "bytecheck", "cfg-if", "either", - "from_variant 1.0.0", + "from_variant", "new_debug_unreachable", "num-bigint", "once_cell", @@ -1288,7 +1387,7 @@ dependencies = [ "siphasher", "sourcemap", "swc_allocator", - "swc_atoms 1.0.0", + "swc_atoms", "swc_eq_ignore_macros", "swc_visit", "termcolor", @@ -1299,19 +1398,19 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.106.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57e99f5a654203ac30e8b819a7c36a913d7620210ef43d7ca04e1269bbd17781" +checksum = "9b7891f75c3ecd9061dd9c70612cbfabaf8f06403d44f0094227ee29a29a7d2d" dependencies = [ "once_cell", "swc_allocator", - "swc_atoms 1.0.0", - "swc_common 0.40.0", - "swc_ecma_ast 0.121.0", + "swc_atoms", + "swc_common", + "swc_ecma_ast", "swc_ecma_parser", "swc_ecma_transforms_base", "swc_ecma_transforms_testing", - "swc_ecma_visit 0.107.0", + "swc_ecma_visit", "swc_plugin", "swc_plugin_macro", "swc_plugin_proxy", @@ -1320,26 +1419,9 @@ dependencies = [ [[package]] name = "swc_ecma_ast" -version = "0.118.1" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6c1b94abbaf080a4e4ae47101a83d4eedef90d733dd98e32b361356d3f5e4b" -dependencies = [ - "bitflags", - "is-macro", - "num-bigint", - "phf", - "scoped-tls", - "string_enum", - "swc_atoms 0.6.7", - "swc_common 0.37.3", - "unicode-id-start", -] - -[[package]] -name = "swc_ecma_ast" -version = "0.121.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1628b2c0c6349c1960b007fda04e0c1537480e0d0b1405305ef5846b752aa7a8" +checksum = "1bdab7759509c1b37ec77bd9fc231f525b888d9609c2963ce71995da1b27357c" dependencies = [ "bitflags", "bytecheck", @@ -1349,16 +1431,17 @@ dependencies = [ "rkyv", "scoped-tls", "string_enum", - "swc_atoms 1.0.0", - "swc_common 0.40.0", + "swc_atoms", + "swc_common", + "swc_visit", "unicode-id-start", ] [[package]] name = "swc_ecma_codegen" -version = "0.158.0" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25aef555943803034f0e0fd98ddfe72f1c3454f2c68a897075eb29bc63d4e930" +checksum = "e474f6c2671524dbb179b44a36425cb1a58928f0f7211c45043f0951a1842c5d" dependencies = [ "memchr", "num-bigint", @@ -1367,30 +1450,30 @@ dependencies = [ "serde", "sourcemap", "swc_allocator", - "swc_atoms 1.0.0", - "swc_common 0.40.0", - "swc_ecma_ast 0.121.0", + "swc_atoms", + "swc_common", + "swc_ecma_ast", "swc_ecma_codegen_macros", "tracing", ] [[package]] name = "swc_ecma_codegen_macros" -version = "0.7.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859fabde36db38634f3fad548dd5e3410c1aebba1b67a3c63e67018fa57a0bca" +checksum = "5f9a42f479a6475647e248fa9750982c87cd985e19d1016a1fc18a70682305d1" dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.72", + "syn 2.0.89", ] [[package]] name = "swc_ecma_parser" -version = "0.152.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ef96894fa0fb3fba233ede22a75a7ddd8b7f0727a40aa8d1028b5dd25013d2e" +checksum = "54c5ab8bd4cc4a4956514699c84d1a25cdb5a33f5ec760ec64ce712e973019c9" dependencies = [ "either", "new_debug_unreachable", @@ -1401,31 +1484,31 @@ dependencies = [ "smallvec", "smartstring", "stacker", - "swc_atoms 1.0.0", - "swc_common 0.40.0", - "swc_ecma_ast 0.121.0", + "swc_atoms", + "swc_common", + "swc_ecma_ast", "tracing", "typed-arena", ] [[package]] name = "swc_ecma_testing" -version = "0.29.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d88a64496b73a0e9c9d8333d14d39904e8d87dbcefe7baaa161803a7f5bae110" +checksum = "9d0397cdbbdcfec2048da1291f44e2d433471fab9bfb430f8f879a831242d636" dependencies = [ "anyhow", "hex", "sha2", - "testing 0.42.0", + "testing", "tracing", ] [[package]] name = "swc_ecma_transforms_base" -version = "0.149.0" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2194d20416a03ae02058934f8387691809f86466a2f2e7a65c56dcb001bd46b" +checksum = "0eb4000822f02b54af0be4f668649fa1e5555f1e3392479d17a277eb81a841f0" dependencies = [ "better_scoped_tls", "bitflags", @@ -1435,20 +1518,20 @@ dependencies = [ "rustc-hash", "serde", "smallvec", - "swc_atoms 1.0.0", - "swc_common 0.40.0", - "swc_ecma_ast 0.121.0", + "swc_atoms", + "swc_common", + "swc_ecma_ast", "swc_ecma_parser", - "swc_ecma_utils 0.137.0", - "swc_ecma_visit 0.107.0", + "swc_ecma_utils", + "swc_ecma_visit", "tracing", ] [[package]] name = "swc_ecma_transforms_testing" -version = "0.152.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0cd337a171f362abb45841429b75c8fa78750fefa4896c8b1900ba16e4a2e71" +checksum = "21721599724e9f9c40467ff9cdd20f045f134c26e5fe794b1ee6708798c724ed" dependencies = [ "ansi_term", "anyhow", @@ -1458,186 +1541,140 @@ dependencies = [ "serde_json", "sha2", "sourcemap", - "swc_common 0.40.0", - "swc_ecma_ast 0.121.0", + "swc_common", + "swc_ecma_ast", "swc_ecma_codegen", "swc_ecma_parser", "swc_ecma_testing", "swc_ecma_transforms_base", - "swc_ecma_utils 0.137.0", - "swc_ecma_visit 0.107.0", + "swc_ecma_utils", + "swc_ecma_visit", "tempfile", - "testing 0.42.0", -] - -[[package]] -name = "swc_ecma_utils" -version = "0.134.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde8f1ef3f7bd53340c7bd679f1ec563a45225ac8fb63f22d6de1ff4b345475d" -dependencies = [ - "indexmap", - "num_cpus", - "once_cell", - "rustc-hash", - "ryu-js", - "swc_atoms 0.6.7", - "swc_common 0.37.3", - "swc_ecma_ast 0.118.1", - "swc_ecma_visit 0.104.5", - "tracing", - "unicode-id", + "testing", ] [[package]] name = "swc_ecma_utils" -version = "0.137.0" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "939f21c75eff61ad3e485fc54d38988f2f9744ceda24a3feb8228dd072171d94" +checksum = "0eb9a28511d17d1e6c5dfcf209368a1da4a542270c450fba7f27faf22c34df22" dependencies = [ "indexmap", "num_cpus", "once_cell", "rustc-hash", "ryu-js", - "swc_atoms 1.0.0", - "swc_common 0.40.0", - "swc_ecma_ast 0.121.0", - "swc_ecma_visit 0.107.0", + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "swc_ecma_visit", "tracing", "unicode-id", ] [[package]] name = "swc_ecma_visit" -version = "0.104.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71f5f97db49b96208805104b381c5e117f55fad5f3d178e626c92934a4d0e36" -dependencies = [ - "new_debug_unreachable", - "num-bigint", - "swc_atoms 0.6.7", - "swc_common 0.37.3", - "swc_ecma_ast 0.118.1", - "swc_visit", - "tracing", -] - -[[package]] -name = "swc_ecma_visit" -version = "0.107.0" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15bd17e03251272ee04d1155036be5288055ab43d40ab2d9fd63ff815d326dad" +checksum = "c5af5332117aa0424e418556f74e9cee335dc47eb7ae35dddbd9fd65fc01452c" dependencies = [ "new_debug_unreachable", "num-bigint", - "swc_atoms 1.0.0", - "swc_common 0.40.0", - "swc_ecma_ast 0.121.0", + "swc_atoms", + "swc_common", + "swc_ecma_ast", "swc_visit", "tracing", ] [[package]] name = "swc_eq_ignore_macros" -version = "0.1.4" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63db0adcff29d220c3d151c5b25c0eabe7e32dd936212b84cdaa1392e3130497" +checksum = "e96e15288bf385ab85eb83cff7f9e2d834348da58d0a31b33bdb572e66ee413e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.89", ] [[package]] name = "swc_error_reporters" -version = "0.21.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d049e9256abf29d9fc66d3db3ea44b6815a64ad565ce31e117a74ee96478bb3" +checksum = "fb4a3c124af5d297d98e6c18776ba04024087cde14602621017e8e9c6cd1c2d1" dependencies = [ "anyhow", "miette", "once_cell", "parking_lot", - "swc_common 0.37.3", -] - -[[package]] -name = "swc_error_reporters" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83f9286183c9be40aafcbbe8c397403fb32af812a3dffe93eee9067aee4fbedb" -dependencies = [ - "anyhow", - "miette", - "once_cell", - "parking_lot", - "swc_common 0.40.0", + "swc_common", ] [[package]] name = "swc_macros_common" -version = "0.3.13" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f486687bfb7b5c560868f69ed2d458b880cebc9babebcb67e49f31b55c5bf847" +checksum = "a509f56fca05b39ba6c15f3e58636c3924c78347d63853632ed2ffcb6f5a0ac7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.89", ] [[package]] name = "swc_plugin" -version = "0.90.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd2ab83a683ee8cdd8be4ce3f363d760a9977d4539aeaee5dbed179ec49fcc7" +checksum = "6b45099a38ed45528bef939d0eac1a0c1347749d0c67d3dd744d545316c5fd05" dependencies = [ "once_cell", ] [[package]] name = "swc_plugin_macro" -version = "0.9.16" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3232db481484070637b20a155c064096c0ea1ba04fa2247b89b618661b3574f4" +checksum = "0917ccfdcd3fa6cf41bdacef2388702a3b274f9ea708d930e1e8db37c7c3e1c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.89", ] [[package]] name = "swc_plugin_proxy" -version = "0.50.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7d1ff72008f9a4dd53b5b79f64057a59bedb3245ae17165fa8aece8b2da4782" +checksum = "6749c4027aad79cf648ffce6633100ea01a7b0d6cf17299cfa68ce141897c26c" dependencies = [ "better_scoped_tls", "rkyv", - "swc_common 0.40.0", - "swc_ecma_ast 0.121.0", + "swc_common", + "swc_ecma_ast", "swc_trace_macro", "tracing", ] [[package]] name = "swc_trace_macro" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69aa25f667e4d74ab10a17a266edeb8b354273817b20b91e60471f1c860a221b" +checksum = "4c78717a841565df57f811376a3d19c9156091c55175e12d378f3a522de70cef" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.89", ] [[package]] name = "swc_visit" -version = "0.6.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e194d14f94121fd08b823d3379eedb3ce455785d9e0c3d2742c59377e283207" +checksum = "9138b6a36bbe76dd6753c4c0794f7e26480ea757bee499738bedbbb3ae3ec5f3" dependencies = [ "either", + "new_debug_unreachable", ] [[package]] @@ -1653,15 +1690,26 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.72" +version = "2.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "tap" version = "1.0.1" @@ -1670,14 +1718,15 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.10.1" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -1691,30 +1740,9 @@ dependencies = [ [[package]] name = "testing" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3105e9569b7f674d1107d19494c993aafd19ea51f7a558b96b267b49c9b5f2bf" -dependencies = [ - "ansi_term", - "cargo_metadata", - "difference", - "once_cell", - "pretty_assertions", - "regex", - "serde", - "serde_json", - "swc_common 0.37.3", - "swc_error_reporters 0.21.0", - "testing_macros", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "testing" -version = "0.42.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb07036f78601d34da9ba6855e8694ee5f420b915b59c2e44283be0606ae304f" +checksum = "1c6b200c27382caadd583563c79cdf870d854e14c4c078731d447ecbfe27c35f" dependencies = [ "ansi_term", "cargo_metadata", @@ -1724,8 +1752,8 @@ dependencies = [ "regex", "serde", "serde_json", - "swc_common 0.40.0", - "swc_error_reporters 1.0.0", + "swc_common", + "swc_error_reporters", "testing_macros", "tracing", "tracing-subscriber", @@ -1733,9 +1761,9 @@ dependencies = [ [[package]] name = "testing_macros" -version = "0.2.14" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a39660370116afe46d5ff8bcb01b7afe2140dda3137ef5cb1914681e37a4ee06" +checksum = "a2d27bf245b90a80d5aa231133418ae7db98f032855ce5292e12071ab29c4b26" dependencies = [ "anyhow", "glob", @@ -1744,7 +1772,7 @@ dependencies = [ "quote", "regex", "relative-path", - "syn 2.0.72", + "syn 2.0.89", ] [[package]] @@ -1760,22 +1788,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.89", ] [[package]] @@ -1788,6 +1816,16 @@ dependencies = [ "once_cell", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" version = "1.8.0" @@ -1822,7 +1860,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.89", ] [[package]] @@ -1866,9 +1904,9 @@ dependencies = [ [[package]] name = "triomphe" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6631e42e10b40c0690bf92f404ebcfe6e1fdb480391d15f17cc8e96eeed5369" +checksum = "ef8f7726da4807b58ea5c96fdc122f80702030edc33b35aff9190a51148ccc85" dependencies = [ "serde", "stable_deref_trait", @@ -1886,29 +1924,23 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - [[package]] name = "unicode-id" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1b6def86329695390197b82c1e244a54a131ceb66c996f2088a3876e2ae083f" +checksum = "10103c57044730945224467c09f71a4db0071c123a0648cc3e818913bde6b561" [[package]] name = "unicode-id-start" -version = "1.2.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc3882f69607a2ac8cc4de3ee7993d8f68bb06f2974271195065b3bd07f2edea" +checksum = "2f322b60f6b9736017344fa0635d64be2f458fbc04eef65f6be22976dd1ffd5b" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-linebreak" @@ -1916,43 +1948,46 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" -[[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" [[package]] name = "valuable" @@ -1996,10 +2031,8 @@ name = "vuecomponentcompleter" version = "0.1.0" dependencies = [ "convert_case", - "serde", "swc_core", - "swc_ecma_utils 0.134.1", - "testing 0.39.0", + "testing", ] [[package]] @@ -2026,11 +2059,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys", + "windows-sys 0.59.0", ] [[package]] @@ -2048,6 +2081,15 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + [[package]] name = "windows-targets" version = "0.52.6" @@ -2112,6 +2154,18 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "wyz" version = "0.5.1" @@ -2123,9 +2177,33 @@ dependencies = [ [[package]] name = "yansi" -version = "0.5.1" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" + +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", + "synstructure", +] [[package]] name = "zerocopy" @@ -2144,5 +2222,48 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.89", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", + "synstructure", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.89", ] diff --git a/nodedevpkg/vuecomponentcompleter/Cargo.toml b/nodedevpkg/vuecomponentcompleter/Cargo.toml index db3be71..6278a66 100644 --- a/nodedevpkg/vuecomponentcompleter/Cargo.toml +++ b/nodedevpkg/vuecomponentcompleter/Cargo.toml @@ -10,9 +10,7 @@ crate-type = ["cdylib", "rlib"] lto = true [dependencies] -serde = { version = "1", features = ["derive"] } -swc_core = { version = "0.106", features = ["ecma_plugin_transform", "__parser"] } -swc_ecma_utils = { version = "0" } +swc_core = { version = "6.0.1", features = ["ecma_plugin_transform", "__parser"] } convert_case = { version = "0.6.0" } [dev-dependencies] diff --git a/nodedevpkg/vuecomponentcompleter/package.json b/nodedevpkg/vuecomponentcompleter/package.json index 56896ee..f673ba8 100644 --- a/nodedevpkg/vuecomponentcompleter/package.json +++ b/nodedevpkg/vuecomponentcompleter/package.json @@ -1,8 +1,8 @@ { "name": "@innoai-tech/vuecomponentcompleter", - "version": "0.1.3", + "version": "0.2.0", "dependencies": { - "@swc/core": "^1.7.36" + "@swc/core": "^1.9.3" }, "exports": { ".": { diff --git a/nodedevpkg/vuecomponentcompleter/src/lib.rs b/nodedevpkg/vuecomponentcompleter/src/lib.rs index 176e2d1..8b96b88 100644 --- a/nodedevpkg/vuecomponentcompleter/src/lib.rs +++ b/nodedevpkg/vuecomponentcompleter/src/lib.rs @@ -1,4 +1,3 @@ -use swc_core::ecma::visit::FoldWith; use swc_core::plugin::metadata::TransformPluginProgramMetadata; use swc_core::{ecma::ast::Program, plugin::plugin_transform}; @@ -10,5 +9,5 @@ use self::vue_component_completer::*; #[plugin_transform] pub fn process_transform(program: Program, _metadata: TransformPluginProgramMetadata) -> Program { program - .fold_with(&mut vue_component_completer()) + .apply(&mut vue_component_completer()) } diff --git a/nodedevpkg/vuecomponentcompleter/src/vue_component_completer/mod.rs b/nodedevpkg/vuecomponentcompleter/src/vue_component_completer/mod.rs index cdd50dd..09783b0 100644 --- a/nodedevpkg/vuecomponentcompleter/src/vue_component_completer/mod.rs +++ b/nodedevpkg/vuecomponentcompleter/src/vue_component_completer/mod.rs @@ -1,14 +1,17 @@ -use swc_core::common::DUMMY_SP; -use swc_core::ecma::ast::{Expr, ExprOrSpread, Prop, Ident, IdentName, KeyValueProp, Lit, ObjectLit, Pat, PropName, VarDeclarator, PropOrSpread, ArrayLit, CallExpr}; -use swc_core::ecma::visit::{as_folder, noop_visit_mut_type, Fold, VisitMut, VisitMutWith}; use convert_case::{Case, Casing}; -pub fn vue_component_completer() -> impl Fold + VisitMut { - as_folder(VueComponentCompleter {}) +use swc_core::common::DUMMY_SP; +use swc_core::ecma::ast::{ + ArrayLit, CallExpr, Expr, ExprOrSpread, Ident, IdentName, KeyValueProp, Lit, ObjectLit, Pass, + Pat, Prop, PropName, PropOrSpread, VarDeclarator, +}; +use swc_core::ecma::visit::{noop_visit_mut_type, visit_mut_pass, VisitMut, VisitMutWith}; + +pub fn vue_component_completer() -> impl VisitMut + Pass { + visit_mut_pass(VueComponentCompleter {}) } struct VueComponentCompleter {} - impl VisitMut for VueComponentCompleter { noop_visit_mut_type!(); @@ -48,7 +51,6 @@ fn complete_call_expr(call_expr: &mut CallExpr, display_name: &str) { } } - fn create_component_options(display_name: &str, attrs: Vec<&str>) -> Box { let mut props: Vec<&str> = Vec::new(); let mut emits: Vec<&str> = Vec::new(); @@ -62,11 +64,7 @@ fn create_component_options(display_name: &str, attrs: Vec<&str>) -> Box { } }); - - let mut obj_props = Vec::from([ - PropOrSpread::Prop(prop_display_name(display_name)) - ]); - + let mut obj_props = Vec::from([PropOrSpread::Prop(prop_display_name(display_name))]); if props.len() != 0 { obj_props.push(PropOrSpread::Prop(prop_props(props))) @@ -76,14 +74,10 @@ fn create_component_options(display_name: &str, attrs: Vec<&str>) -> Box { obj_props.push(PropOrSpread::Prop(prop_emits(emits))) } - return Box::new( - Expr::Object( - ObjectLit { - span: DUMMY_SP, - props: obj_props, - }, - ), - ); + return Box::new(Expr::Object(ObjectLit { + span: DUMMY_SP, + props: obj_props, + })); } fn collect_props(call_expr: &mut CallExpr) -> Vec<&str> { @@ -93,11 +87,14 @@ fn collect_props(call_expr: &mut CallExpr) -> Vec<&str> { type_arg.params.iter().for_each(|ts_typ| { ts_typ.as_ts_type_lit().iter().for_each(|ts_type_lit| { ts_type_lit.members.iter().for_each(|ts_type_elem| { - ts_type_elem.as_ts_property_signature().iter().for_each(|prop| { - prop.key.as_ident().iter().for_each(|ident| { - props.push(ident.sym.as_str()); + ts_type_elem + .as_ts_property_signature() + .iter() + .for_each(|prop| { + prop.key.as_ident().iter().for_each(|ident| { + props.push(ident.sym.as_str()); + }) }) - }) }) }) }) @@ -107,54 +104,59 @@ fn collect_props(call_expr: &mut CallExpr) -> Vec<&str> { } fn prop_display_name(display_name: &str) -> Box { - return Box::new( - Prop::KeyValue(KeyValueProp { - key: PropName::Ident(IdentName::from(Ident::new_no_ctxt("displayName".into(), DUMMY_SP))), - value: Box::new(Expr::Lit(Lit::from(display_name))), - }), - ); + return Box::new(Prop::KeyValue(KeyValueProp { + key: PropName::Ident(IdentName::from(Ident::new_no_ctxt( + "displayName".into(), + DUMMY_SP, + ))), + value: Box::new(Expr::Lit(Lit::from(display_name))), + })); } - fn prop_props(props: Vec<&str>) -> Box { let elems = props .iter() - .map(|v| Some(ExprOrSpread { - spread: None, - expr: Box::new(Expr::Lit(Lit::from(*v))), - })) + .map(|v| { + Some(ExprOrSpread { + spread: None, + expr: Box::new(Expr::Lit(Lit::from(*v))), + }) + }) .collect(); - return Box::new( - Prop::KeyValue(KeyValueProp { - key: PropName::Ident(IdentName::from(Ident::new_no_ctxt("props".into(), DUMMY_SP))), - value: Box::new(Expr::Array(ArrayLit { - span: DUMMY_SP, - elems, - })), - }), - ); + return Box::new(Prop::KeyValue(KeyValueProp { + key: PropName::Ident(IdentName::from(Ident::new_no_ctxt( + "props".into(), + DUMMY_SP, + ))), + value: Box::new(Expr::Array(ArrayLit { + span: DUMMY_SP, + elems, + })), + })); } - fn prop_emits(props: Vec<&str>) -> Box { let elems = props .iter() - .map(|v| Some(ExprOrSpread { - spread: None, - expr: Box::new(Expr::Lit(Lit::from(to_emit_name(*v)))), - })) + .map(|v| { + Some(ExprOrSpread { + spread: None, + expr: Box::new(Expr::Lit(Lit::from(to_emit_name(*v)))), + }) + }) .collect(); - return Box::new( - Prop::KeyValue(KeyValueProp { - key: PropName::Ident(IdentName::from(Ident::new_no_ctxt("emits".into(), DUMMY_SP))), - value: Box::new(Expr::Array(ArrayLit { - span: DUMMY_SP, - elems, - })), - }), - ); + return Box::new(Prop::KeyValue(KeyValueProp { + key: PropName::Ident(IdentName::from(Ident::new_no_ctxt( + "emits".into(), + DUMMY_SP, + ))), + value: Box::new(Expr::Array(ArrayLit { + span: DUMMY_SP, + elems, + })), + })); } fn to_emit_name(s: &str) -> String { @@ -163,13 +165,14 @@ fn to_emit_name(s: &str) -> String { #[cfg(test)] mod test { - use swc_core::common::{chain, Mark}; + use swc_core::common::Mark; + use swc_core::ecma::ast::Pass; use swc_core::ecma::transforms::base::resolver; use swc_core::ecma::transforms::testing::test_inline; use swc_core::ecma::transforms::testing::{test, Tester}; use swc_core::ecma::{ parser::{Syntax, TsSyntax}, - visit::{as_folder, Fold}, + visit::visit_mut_pass, }; const SYNTAX: Syntax = Syntax::Typescript(TsSyntax { @@ -180,59 +183,77 @@ mod test { disallow_ambiguous_jsx_like: true, }); - fn runner(_: &mut Tester) -> impl Fold { - chain!( + fn runner(_: &mut Tester) -> impl Pass { + ( resolver(Mark::new(), Mark::new(), false), - as_folder(super::VueComponentCompleter{}) + visit_mut_pass(super::VueComponentCompleter {}), ) } - test_inline!(SYNTAX, runner, + test_inline!( + SYNTAX, + runner, /* Name */ should_complete_display_name_with_styled, /* Input */ r#" const X = styled("div")({}) "#, - /* Output */ r#" + /* Output */ + r#" const X = styled("div", { displayName: "X" })({}) "# ); - test_inline!(SYNTAX, runner, + test_inline!( + SYNTAX, + runner, /* Name */ should_complete_props_with_styled, - /* Input */ r#" + /* Input */ + r#" export const X = styled<{ path: string, placement?: "start" | "end", $default?: VNodeChild }, "div">("div", () => (Wrap) => )({}) "#, - /* Output */ r#" + /* Output */ + r#" export const X = styled<{ path: string, placement?: "start" | "end", $default?: VNodeChild }, "div">("div", () => (Wrap) => , { displayName: "X", props: ["path", "placement"] })({}) "# ); - test_inline!(SYNTAX, runner, + test_inline!( + SYNTAX, + runner, /* Name */ should_complete_display_name, /* Input */ r#" const X = component(() => null) "#, - /* Output */ r#" + /* Output */ + r#" const X = component(() => null, { displayName: "X" }) "# ); - test_inline!(SYNTAX, runner, + test_inline!( + SYNTAX, + runner, /* Name */ should_complete_with_props, - /* Input */ r#" + /* Input */ + r#" const X = component<{ active?: boolean }>(() => null) "#, - /* Output */ r#" + /* Output */ + r#" const X = component<{ active?: boolean }>(() => null, { displayName: "X", props: ["active"] }) "# ); - test_inline!(SYNTAX, runner, + test_inline!( + SYNTAX, + runner, /* Name */ should_complete_with_emits, - /* Input */ r#" + /* Input */ + r#" const X = component<{ onSelected?: () => void, onDidUpdate?: () => void }>(() => null) "#, - /* Output */ r#" + /* Output */ + r#" const X = component<{ onSelected?: () => void, onDidUpdate?: () => void }>(() => null, { displayName: "X", emits: ["selected", "did-update"] }) "# ); diff --git a/package.json b/package.json index 56bcebb..c5bc3ef 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "type": "module", "version": "1.0.0", "private": true, - "packageManager": "bun@1.1.31", + "packageManager": "bun@1.1.36", "workspaces": [ "nodepkg/*", "nodedevpkg/*" @@ -18,18 +18,18 @@ "devDependencies": { "@innoai-tech/devconfig": "workspace:*", "@innoai-tech/monobundle": "workspace:*", - "bun-types": "^1.1.31", - "core-js": "^3.38.1", + "bun-types": "^1.1.36", + "core-js": "^3.39.0", "esbuild": "^0.24.0", "jsdom": "^25.0.1", "prettier": "^3.3.3", "rxjs": "^7.8.1", - "turbo": "^2.2.1", - "typescript": "^5.6.3", - "vite": "^5.4.9" + "turbo": "^2.3.1", + "typescript": "^5.7.2", + "vite": "^5.4.11" }, "resolutions": { - "rollup": "^4.24.0" + "rollup": "^4.27.4" }, "prettier": {} }