diff --git a/Cargo.lock b/Cargo.lock index 5dfe024..bab357b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -58,15 +58,15 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "ast_node" -version = "0.9.6" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e3e06ec6ac7d893a0db7127d91063ad7d9da8988f8a1a256f03729e6eec026" +checksum = "2ab31376d309dd3bfc9cfb3c11c93ce0e0741bbe0354b20e7f8c60b044730b79" dependencies = [ "proc-macro2", "quote", @@ -112,6 +112,15 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "base64-simd" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "781dd20c3aff0bd194fe7d2a977dd92f21c173891f3a03b677359e5fa457e5d5" +dependencies = [ + "simd-abstraction", +] + [[package]] name = "better_scoped_tls" version = "0.1.1" @@ -129,9 +138,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "bitvec" @@ -308,9 +317,9 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" [[package]] name = "equivalent" @@ -351,9 +360,9 @@ dependencies = [ [[package]] name = "from_variant" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a0b11eeb173ce52f84ebd943d42e58813a2ebb78a6a3ff0a243b71c5199cd7b" +checksum = "fdc9cc75639b041067353b9bce2450d6847e547276c6fbe4487d7407980e07db" dependencies = [ "proc-macro2", "swc_macros_common", @@ -437,15 +446,16 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hstr" -version = "0.2.7" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17fafeca18cf0927e23ea44d7a5189c10536279dfe9094e0dfa953053fbb5377" +checksum = "96274be293b8877e61974a607105d09c84caebe9620b47774aa8a6b942042dd4" dependencies = [ + "hashbrown 0.14.3", "new_debug_unreachable", "once_cell", "phf", "rustc-hash", - "smallvec", + "triomphe", ] [[package]] @@ -659,6 +669,12 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "outref" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f222829ae9293e33a9f5e9f440c6760a3d450a64affe1846486b140db81c1f4" + [[package]] name = "overload" version = "0.1.1" @@ -758,17 +774,6 @@ version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" -[[package]] -name = "pmutil" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52a40bc70c2c58040d2d8b167ba9a5ff59fc9dab7ad44771cfde3dcfde7a09c6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "pretty_assertions" version = "1.4.0" @@ -934,9 +939,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.43" +version = "0.7.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5c462a1328c8e67e4d6dbad1eb0355dd43e8ab432c6e227a43657f16ade5033" +checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" dependencies = [ "proc-macro2", "quote", @@ -970,7 +975,7 @@ version = "0.38.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "errno", "libc", "linux-raw-sys", @@ -1033,18 +1038,18 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.195" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.195" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", @@ -1053,9 +1058,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.111" +version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" dependencies = [ "itoa", "ryu", @@ -1082,6 +1087,15 @@ 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.4" @@ -1119,20 +1133,29 @@ checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" [[package]] name = "sourcemap" -version = "6.4.1" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4cbf65ca7dc576cf50e21f8d0712d96d4fcfd797389744b7b222a85cdf5bd90" +checksum = "208d40b9e8cad9f93613778ea295ed8f3c2b1824217c6cfc7219d3f6f45b96d4" dependencies = [ + "base64-simd", + "bitvec", "data-encoding", "debugid", "if_chain", + "rustc-hash", "rustc_version", "serde", "serde_json", - "unicode-id", + "unicode-id-start", "url", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "stacker" version = "0.1.15" @@ -1154,9 +1177,9 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "string_enum" -version = "0.4.2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b650ea2087d32854a0f20b837fc56ec987a1cb4f758c9757e1171ee9812da63" +checksum = "05e383308aebc257e7d7920224fa055c632478d92744eca77f99be8fa1545b90" dependencies = [ "proc-macro2", "quote", @@ -1205,7 +1228,7 @@ dependencies = [ name = "swc-vue-jsx-visitor" version = "0.3.0" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "css_dataset", "fnv", "indexmap", @@ -1218,9 +1241,9 @@ dependencies = [ [[package]] name = "swc_atoms" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d538eaaa6f085161d088a04cf0a3a5a52c5a7f2b3bd9b83f73f058b0ed357c0" +checksum = "04d9d1941a7d24fc503efa29c53f88dd61e6a15cc371947a75cca3b48d564b5b" dependencies = [ "bytecheck", "hstr", @@ -1232,9 +1255,9 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.33.15" +version = "0.33.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3792c10fa5d3e93a705b31f13fdea4a6e68c3c20d4351e84ed1741b7864399cd" +checksum = "0523b2acc3b9938c51dd454956493d887cc40f0050206287f8599840010442d0" dependencies = [ "anyhow", "ast_node", @@ -1264,9 +1287,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.89.2" +version = "0.90.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7c46bece1a7540f267b50775924658f0625f82ba580986f53322becb1a204b9" +checksum = "ecbbbf25e5d035165bde87f2388f9fbe6d5ce38ddd2c6cb9f24084823a9c0044" dependencies = [ "once_cell", "swc_atoms", @@ -1285,11 +1308,11 @@ dependencies = [ [[package]] name = "swc_ecma_ast" -version = "0.111.1" +version = "0.112.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12b4d0f3b31d293dac16fc13a50f8a282a3bdb658f2a000ffe09b1b638f45c9" +checksum = "70656acd47c91918635f1e8589963428cb3170975b71d786c79fb7a25605f687" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "bytecheck", "is-macro", "num-bigint", @@ -1304,9 +1327,9 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.147.1" +version = "0.148.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71cf965b2cda4683eaf37ef4e238c0ca14a509ee76948638d815ccffb85bcd8b" +checksum = "154d03dc43e4033b668bc5021bd67088ff27f0d8da054348b5cd4e6fe94e7f26" dependencies = [ "memchr", "num-bigint", @@ -1323,9 +1346,9 @@ dependencies = [ [[package]] name = "swc_ecma_codegen_macros" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "394b8239424b339a12012ceb18726ed0244fce6bf6345053cb9320b2791dcaa5" +checksum = "090e409af49c8d1a3c13b3aab1ed09dd4eda982207eb3e63c2ad342f072b49c8" dependencies = [ "proc-macro2", "quote", @@ -1335,9 +1358,9 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.142.1" +version = "0.143.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c3eedda441af51ca25caebb88837649a40e2a39b763344a53cfedd869740c71" +checksum = "40b7faa481ac015b330f1c4bc8df2c9947242020e23ccdb10bc7a8ef84342509" dependencies = [ "either", "new_debug_unreachable", @@ -1357,9 +1380,9 @@ dependencies = [ [[package]] name = "swc_ecma_testing" -version = "0.22.17" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b73fd79980ad3182437a62dc0413bcd00e6157a7fcf5a64a86fa264ec6672ba" +checksum = "7c5704ef494b1805bc4566ff566b964bc1e9d3fb0f0e046ad6392b09a54de844" dependencies = [ "anyhow", "hex", @@ -1370,12 +1393,12 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" -version = "0.136.1" +version = "0.137.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db269d6b55688960fc214cac4c31026dff482e9355afa3c7417316b86c685452" +checksum = "660badfe2eed8b6213ec9dcd71aa0786f8fb46ffa012e0313bcba1fe4a9a5c73" dependencies = [ "better_scoped_tls", - "bitflags 2.4.2", + "bitflags 2.5.0", "indexmap", "once_cell", "phf", @@ -1393,9 +1416,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_testing" -version = "0.139.1" +version = "0.140.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "529425edc510c3e766d7a0dba16909a1b42f932a88ffb89442e3071325c067ce" +checksum = "7c0ea6f85b7bf04391a172d7a369e49865effa77ec3a6cd0e969a274cfcb982d" dependencies = [ "ansi_term", "anyhow", @@ -1419,9 +1442,9 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.126.1" +version = "0.127.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f44fc2b597f6429631231b083a6019b8400c9d524eff4b82ece4b7dfffdbe787" +checksum = "15d40abfc4f3a7bfdf54d11ac705cc9dd0836c48bf085b359143b4d40b50cb31" dependencies = [ "indexmap", "num_cpus", @@ -1437,9 +1460,9 @@ dependencies = [ [[package]] name = "swc_ecma_visit" -version = "0.97.1" +version = "0.98.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26ecefeec816318f1d449b4bac2e28a4243a167cc16620e15c3c1f2d91085770" +checksum = "93692bdcdbb63db8f5e10fea5d202b5487cb27eb443aec424f4335c88f9864af" dependencies = [ "num-bigint", "swc_atoms", @@ -1462,9 +1485,9 @@ dependencies = [ [[package]] name = "swc_error_reporters" -version = "0.17.14" +version = "0.17.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be42e786ee9bda3f72f7d7de791e1d7b49ab7f86ed54fdc5808681ae04406080" +checksum = "3329e73f159a3d38d4cd5f606a0918eeff39f5bbdbdafd9b6fecb290d2e9a32d" dependencies = [ "anyhow", "miette", @@ -1475,9 +1498,9 @@ dependencies = [ [[package]] name = "swc_macros_common" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50176cfc1cbc8bb22f41c6fe9d1ec53fbe057001219b5954961b8ad0f336fce9" +checksum = "91745f3561057493d2da768437c427c0e979dff7396507ae02f16c981c4a8466" dependencies = [ "proc-macro2", "quote", @@ -1506,9 +1529,9 @@ dependencies = [ [[package]] name = "swc_plugin_proxy" -version = "0.40.1" +version = "0.41.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d64191ea46b8156c495b77fce87759003d520109535d2fd524fe6d9e4de6238b" +checksum = "012e5996e3fe64805342b6e31a79d826402bbe4eed35be6a9366e54e41f5d75d" dependencies = [ "better_scoped_tls", "rkyv", @@ -1531,9 +1554,9 @@ dependencies = [ [[package]] name = "swc_visit" -version = "0.5.8" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b27078d8571abe23aa52ef608dd1df89096a37d867cf691cbb4f4c392322b7c9" +checksum = "043d11fe683dcb934583ead49405c0896a5af5face522e4682c16971ef7871b9" dependencies = [ "either", "swc_visit_macros", @@ -1541,12 +1564,11 @@ dependencies = [ [[package]] name = "swc_visit_macros" -version = "0.5.9" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8bb05975506741555ea4d10c3a3bdb0e2357cd58e1a4a4332b8ebb4b44c34d" +checksum = "4ae9ef18ff8daffa999f729db056d2821cd2f790f3a11e46422d19f46bb193e7" dependencies = [ "Inflector", - "pmutil", "proc-macro2", "quote", "swc_macros_common", @@ -1615,9 +1637,9 @@ dependencies = [ [[package]] name = "testing" -version = "0.35.16" +version = "0.35.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42599f638bd2b48c2892cf330862aca433c86286ae776d75c5074ba3b4935ed8" +checksum = "689e2661712768726869f62945ccbe5d76ab3a3957b88221275bebe22a0761c8" dependencies = [ "ansi_term", "cargo_metadata 0.15.4", @@ -1767,6 +1789,16 @@ dependencies = [ "tracing-log", ] +[[package]] +name = "triomphe" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "859eb650cfee7434994602c3a68b25d77ad9e68c8a6cd491616ef86661382eb3" +dependencies = [ + "serde", + "stable_deref_trait", +] + [[package]] name = "typed-arena" version = "2.0.2" @@ -1791,6 +1823,12 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1b6def86329695390197b82c1e244a54a131ceb66c996f2088a3876e2ae083f" +[[package]] +name = "unicode-id-start" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02aebfa694eccbbbffdd92922c7de136b9fe764396d2f10e21bce1681477cfc1" + [[package]] name = "unicode-ident" version = "1.0.12" diff --git a/package.json b/package.json index 2689d30..82b2de1 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ }, "devDependencies": { "@gplane/tsconfig": "^6.1.0", - "@swc/core": "^1.3.106", + "@swc/core": "^1.5.24", "@types/node": "^20.10.3", "dprint": "^0.45.0", "typescript": "^5.3.2", diff --git a/plugin/Cargo.toml b/plugin/Cargo.toml index b1ed4c5..58ba644 100644 --- a/plugin/Cargo.toml +++ b/plugin/Cargo.toml @@ -13,5 +13,5 @@ crate-type = ["cdylib"] [dependencies] serde_json = "1.0" -swc_core = { version = "0.89", features = ["ecma_plugin_transform"] } +swc_core = { version = "0.90", features = ["ecma_plugin_transform"] } swc-vue-jsx-visitor = { path = "../visitor", version = "*" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 057e8c7..b9b8aad 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ devDependencies: specifier: ^6.1.0 version: 6.1.0 '@swc/core': - specifier: ^1.3.106 - version: 1.3.106 + specifier: ^1.5.24 + version: 1.5.24 '@types/node': specifier: ^20.10.3 version: 20.10.3 @@ -49,6 +49,7 @@ packages: resolution: {integrity: sha512-NgIpvZHpiQaY4DxSygxknxBtvKE2KLK9dEbUNKNE098yTHhGq7ouPsoM7RtsO34RHJ3tEZLLJEuBHn20XP8LMg==} cpu: [arm64] os: [linux] + libc: [glibc] requiresBuild: true dev: true optional: true @@ -57,6 +58,7 @@ packages: resolution: {integrity: sha512-Y8p+FC0RNyKCGQjy99Uh1LSPrlQtUTvo4brdvU1THF3pyWu6Bg1p6NiP5a6SjE/6t9CMKZJz39zPreQtnDkSDA==} cpu: [arm64] os: [linux] + libc: [musl] requiresBuild: true dev: true optional: true @@ -65,6 +67,7 @@ packages: resolution: {integrity: sha512-u03NCZIpJhE5gIl9Q7jNL4sOPBFd/8BLVBiuLoLtbiTZQ+NNudHKgGNATJBU67q1MKpqKnt8/gQm139cJkHhrw==} cpu: [x64] os: [linux] + libc: [glibc] requiresBuild: true dev: true optional: true @@ -73,6 +76,7 @@ packages: resolution: {integrity: sha512-DQN8LPtxismkeU1X+sQywa80kWwCBcpQh9fXoJcvTEHrgzHBqbG2SEsUZpM12oKEua1KE/iBh+vgZ+4I3TdI2A==} cpu: [x64] os: [linux] + libc: [musl] requiresBuild: true dev: true optional: true @@ -342,6 +346,7 @@ packages: resolution: {integrity: sha512-OrEyIfpxSsMal44JpEVx9AEcGpdBQG1ZuWISAanaQTSMeStBW+oHWwOkoqR54bw3x8heP8gBOyoJiGg+fLY8qQ==} cpu: [arm64] os: [linux] + libc: [glibc] requiresBuild: true dev: true optional: true @@ -350,6 +355,7 @@ packages: resolution: {integrity: sha512-1H7wBbQuE6igQdxMSTjtFfD+DGAudcYWhp106z/9zBA8OQhsJRnemO4XGavdzHpGhRtRxbgmUGdO3YQgrWf2RA==} cpu: [arm64] os: [linux] + libc: [musl] requiresBuild: true dev: true optional: true @@ -358,6 +364,7 @@ packages: resolution: {integrity: sha512-FVyFI13tXw5aE65sZdBpNjPVIi4Q5mARnL/39UIkxvSgRAIqCo5sCpCELk0JtXHGee2owZz5aNLbWNfBHzr71Q==} cpu: [x64] os: [linux] + libc: [glibc] requiresBuild: true dev: true optional: true @@ -366,6 +373,7 @@ packages: resolution: {integrity: sha512-eBPYl2sLpH/o8qbSz6vPwWlDyThnQjJfcDOGFbNjmjb44XKC1F5dQfakOsADRVrXCNzM6ZsSIPDG5dc6HHLNFg==} cpu: [x64] os: [linux] + libc: [musl] requiresBuild: true dev: true optional: true @@ -398,8 +406,8 @@ packages: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true - /@swc/core-darwin-arm64@1.3.106: - resolution: {integrity: sha512-XYcbViNyHnnm7RWOAO1YipMmthM7m2aXF32b0y+JMLYFBEyFpjVX9btLkzeL7wRx/5B3I35yJNhE+xyx0Q1Gkw==} + /@swc/core-darwin-arm64@1.5.24: + resolution: {integrity: sha512-M7oLOcC0sw+UTyAuL/9uyB9GeO4ZpaBbH76JSH6g1m0/yg7LYJZGRmplhDmwVSDAR5Fq4Sjoi1CksmmGkgihGA==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] @@ -407,8 +415,8 @@ packages: dev: true optional: true - /@swc/core-darwin-x64@1.3.106: - resolution: {integrity: sha512-YKDPhUdfuwhmOUS9+CaIwl/0Tp+f1b73BH2EIESuxSNsogZf18a8HQ8O0fQEwdiwmA5LEqw47cj+kfOWV/0+kw==} + /@swc/core-darwin-x64@1.5.24: + resolution: {integrity: sha512-MfcFjGGYognpSBSos2pYUNYJSmqEhuw5ceGr6qAdME7ddbjGXliza4W6FggsM+JnWwpqa31+e7/R+GetW4WkaQ==} engines: {node: '>=10'} cpu: [x64] os: [darwin] @@ -416,8 +424,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm-gnueabihf@1.3.106: - resolution: {integrity: sha512-bHxxJXogvFfocLL5inZxxtx/x/WgKozigp80Vbx0viac1fPDJrqKBw2X4MzpMiuTRAGVQ03jJI6pDwbSBf+yDw==} + /@swc/core-linux-arm-gnueabihf@1.5.24: + resolution: {integrity: sha512-amI2pwtcWV3E/m/nf+AQtn1LWDzKLZyjCmWd3ms7QjEueWYrY8cU1Y4Wp7wNNsxIoPOi8zek1Uj2wwFD/pttNQ==} engines: {node: '>=10'} cpu: [arm] os: [linux] @@ -425,44 +433,48 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-gnu@1.3.106: - resolution: {integrity: sha512-c7jue++CHLgtpeaakEukoCLT9eNrImizbleE9Y7Is8CHqLq/7DG4s+7ma9DFKXIzW2MpTg9byIEQfpqSphVW6A==} + /@swc/core-linux-arm64-gnu@1.5.24: + resolution: {integrity: sha512-sTSvmqMmgT1ynH/nP75Pc51s+iT4crZagHBiDOf5cq+kudUYjda9lWMs7xkXB/TUKFHPCRK0HGunl8bkwiIbuw==} engines: {node: '>=10'} cpu: [arm64] os: [linux] + libc: [glibc] requiresBuild: true dev: true optional: true - /@swc/core-linux-arm64-musl@1.3.106: - resolution: {integrity: sha512-51EaC3Q8qAhLtWVnAVqoYX/gk3tK31cCBzUpwCcmhianhEBM2/WtKRAS4MqPhE8VVZuN3WjO2c2JaF2mX0yuoA==} + /@swc/core-linux-arm64-musl@1.5.24: + resolution: {integrity: sha512-vd2/hfOBGbrX21FxsFdXCUaffjkHvlZkeE2UMRajdXifwv79jqOHIJg3jXG1F3ZrhCghCzirFts4tAZgcG8XWg==} engines: {node: '>=10'} cpu: [arm64] os: [linux] + libc: [musl] requiresBuild: true dev: true optional: true - /@swc/core-linux-x64-gnu@1.3.106: - resolution: {integrity: sha512-tOUi8BB6jAeCXgx7ESLNnX7nrbMVKQ/XajK77v7Ad4SXf9HYArnimBJpXUUyVFJTXLSv4e6c7s6XHHqXb5Lwcg==} + /@swc/core-linux-x64-gnu@1.5.24: + resolution: {integrity: sha512-Zrdzi7NqzQxm2BvAG5KyOSBEggQ7ayrxh599AqqevJmsUXJ8o2nMiWQOBvgCGp7ye+Biz3pvZn1EnRzAp+TpUg==} engines: {node: '>=10'} cpu: [x64] os: [linux] + libc: [glibc] requiresBuild: true dev: true optional: true - /@swc/core-linux-x64-musl@1.3.106: - resolution: {integrity: sha512-binLw4Lbd83NPy4/m/teH2nbaifxveSD+sKDvpxywRbvYW2I0w/iCBpUBcbnl16TQF4TPOGpq5YwG9lVxPVw5g==} + /@swc/core-linux-x64-musl@1.5.24: + resolution: {integrity: sha512-1F8z9NRi52jdZQCGc5sflwYSctL6omxiVmIFVp8TC9nngjQKc00TtX/JC2Eo2HwvgupkFVl5YQJidAck9YtmJw==} engines: {node: '>=10'} cpu: [x64] os: [linux] + libc: [musl] requiresBuild: true dev: true optional: true - /@swc/core-win32-arm64-msvc@1.3.106: - resolution: {integrity: sha512-n4ttBWr8tM7DPzwcEOIBTyTMHZTzCmbic/HTtxEsPyMAf/Daen+yrTKzjPP6k2usfSrjkxA780RSJJxI1N8r2w==} + /@swc/core-win32-arm64-msvc@1.5.24: + resolution: {integrity: sha512-cKpP7KvS6Xr0jFSTBXY53HZX/YfomK5EMQYpCVDOvfsZeYHN20sQSKXfpVLvA/q2igVt1zzy1XJcOhpJcgiKLg==} engines: {node: '>=10'} cpu: [arm64] os: [win32] @@ -470,8 +482,8 @@ packages: dev: true optional: true - /@swc/core-win32-ia32-msvc@1.3.106: - resolution: {integrity: sha512-GhDNIwxE5FhkujESI6h/4ysT3wxwmrzTUlZYaR8rRui6a6SdX9feIPUHPEE5o5hpyp+xqlmvRxKkRxOnwsq8iA==} + /@swc/core-win32-ia32-msvc@1.5.24: + resolution: {integrity: sha512-IoPWfi0iwqjZuf7gE223+B97/ZwkKbu7qL5KzGP7g3hJrGSKAvv7eC5Y9r2iKKtLKyv5R/T6Ho0kFR/usi7rHw==} engines: {node: '>=10'} cpu: [ia32] os: [win32] @@ -479,8 +491,8 @@ packages: dev: true optional: true - /@swc/core-win32-x64-msvc@1.3.106: - resolution: {integrity: sha512-2M6yWChuMS1+/MPo3Dor0SOMkvmiugonWlzsZBAu/oZboH2xKrHSRv7brsBujb2Oe47r+NsbV+vq9tnnP9Vl1Q==} + /@swc/core-win32-x64-msvc@1.5.24: + resolution: {integrity: sha512-zHgF2k1uVJL8KIW+PnVz1To4a3Cz9THbh2z2lbehaF/gKHugH4c3djBozU4das1v35KOqf5jWIEviBLql2wDLQ==} engines: {node: '>=10'} cpu: [x64] os: [win32] @@ -488,37 +500,39 @@ packages: dev: true optional: true - /@swc/core@1.3.106: - resolution: {integrity: sha512-++QPSPkFq2qELYVScxNHJC42hKQChjiTWS2P0QQ5JWT4NHb9lmNSfrc1ylFIyImwRnxsW2MTBALLYLf95EFAsg==} + /@swc/core@1.5.24: + resolution: {integrity: sha512-Eph9zvO4xvqWZGVzTdtdEJ0Vqf0VIML/o/e4Qd2RLOqtfgnlRi7avmMu5C0oqciJ0tk+hqdUKVUZ4JPoPaiGvQ==} engines: {node: '>=10'} requiresBuild: true peerDependencies: - '@swc/helpers': ^0.5.0 + '@swc/helpers': '*' peerDependenciesMeta: '@swc/helpers': optional: true dependencies: - '@swc/counter': 0.1.2 - '@swc/types': 0.1.5 + '@swc/counter': 0.1.3 + '@swc/types': 0.1.7 optionalDependencies: - '@swc/core-darwin-arm64': 1.3.106 - '@swc/core-darwin-x64': 1.3.106 - '@swc/core-linux-arm-gnueabihf': 1.3.106 - '@swc/core-linux-arm64-gnu': 1.3.106 - '@swc/core-linux-arm64-musl': 1.3.106 - '@swc/core-linux-x64-gnu': 1.3.106 - '@swc/core-linux-x64-musl': 1.3.106 - '@swc/core-win32-arm64-msvc': 1.3.106 - '@swc/core-win32-ia32-msvc': 1.3.106 - '@swc/core-win32-x64-msvc': 1.3.106 + '@swc/core-darwin-arm64': 1.5.24 + '@swc/core-darwin-x64': 1.5.24 + '@swc/core-linux-arm-gnueabihf': 1.5.24 + '@swc/core-linux-arm64-gnu': 1.5.24 + '@swc/core-linux-arm64-musl': 1.5.24 + '@swc/core-linux-x64-gnu': 1.5.24 + '@swc/core-linux-x64-musl': 1.5.24 + '@swc/core-win32-arm64-msvc': 1.5.24 + '@swc/core-win32-ia32-msvc': 1.5.24 + '@swc/core-win32-x64-msvc': 1.5.24 dev: true - /@swc/counter@0.1.2: - resolution: {integrity: sha512-9F4ys4C74eSTEUNndnER3VJ15oru2NumfQxS8geE+f3eB5xvfxpWyqE5XlVnxb/R14uoXi6SLbBwwiDSkv+XEw==} + /@swc/counter@0.1.3: + resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} dev: true - /@swc/types@0.1.5: - resolution: {integrity: sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==} + /@swc/types@0.1.7: + resolution: {integrity: sha512-scHWahbHF0eyj3JsxG9CFJgFdFNaVQCNAimBlT6PzS3n/HptxqREjsm4OH6AN3lYcffZYSPxXW8ua2BEHp0lJQ==} + dependencies: + '@swc/counter': 0.1.3 dev: true /@types/estree@1.0.5: diff --git a/visitor/Cargo.toml b/visitor/Cargo.toml index 2b75394..776e484 100644 --- a/visitor/Cargo.toml +++ b/visitor/Cargo.toml @@ -14,7 +14,7 @@ fnv = "1.0" indexmap = "2.1" regex = "1.10" serde = { version = "1.0", features = ["derive"] } -swc_core = { version = "0.89", features = [ +swc_core = { version = "0.90", features = [ "ecma_parser", "ecma_plugin_transform", "ecma_utils", diff --git a/visitor/src/lib.rs b/visitor/src/lib.rs index 63fcb28..5981098 100644 --- a/visitor/src/lib.rs +++ b/visitor/src/lib.rs @@ -455,9 +455,12 @@ where Expr::Assign(AssignExpr { span: DUMMY_SP, op: op!("="), - left: PatOrExpr::Expr(Box::new( - directive.value, - )), + left: AssignTarget::Simple( + SimpleAssignTarget::Paren(ParenExpr { + span: DUMMY_SP, + expr: Box::new(directive.value) + }), + ), right: Box::new(Expr::Ident(quote_ident!( "$event" ))), @@ -786,9 +789,12 @@ where expr: Box::new(Expr::Assign(AssignExpr { span: DUMMY_SP, op: op!("="), - left: PatOrExpr::Expr(Box::new(Expr::Ident( - slot_ident.clone(), - ))), + left: AssignTarget::Simple(SimpleAssignTarget::Paren( + ParenExpr{ + span: DUMMY_SP, + expr: Box::new(Expr::Ident(slot_ident.clone())), + } + )), right: Box::new(expr.clone()), })), }], @@ -1287,10 +1293,10 @@ where Expr::JSXElement(jsx_element) => *expr = self.transform_jsx_element(jsx_element), Expr::JSXFragment(jsx_fragment) => *expr = self.transform_jsx_fragment(jsx_fragment), Expr::Assign(AssignExpr { - left: PatOrExpr::Pat(pat), + left: AssignTarget::Simple(simple_assign_target), .. }) => { - if let Pat::Ident(binding_ident) = &**pat { + if let SimpleAssignTarget::Ident(binding_ident) = &*simple_assign_target { self.assignment_left = Some(binding_ident.id.clone()); } }