From 9db80b12860cd7320ade20c7f3d58187cfd23a17 Mon Sep 17 00:00:00 2001 From: erkelost <1256029807@qq.com> Date: Thu, 14 Nov 2024 18:01:20 +0800 Subject: [PATCH] chore: update deps --- Cargo.lock | 593 +++++++++++++++++++++++++++++------- rust-plugins/dts/Cargo.toml | 4 + rust-plugins/dts/src/lib.rs | 38 ++- 3 files changed, 513 insertions(+), 122 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 44e0f791a..e407767e1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -228,6 +228,12 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +[[package]] +name = "assert-unchecked" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7330592adf847ee2e3513587b4db2db410a0d751378654e7e993d9adcbe5c795" + [[package]] name = "ast_node" version = "2.0.0" @@ -237,7 +243,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -248,7 +254,7 @@ checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -279,7 +285,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -350,9 +356,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" dependencies = [ "serde", ] @@ -510,7 +516,7 @@ checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -583,6 +589,15 @@ dependencies = [ "thiserror", ] +[[package]] +name = "castaway" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0abae9be0aaf9ea96a3b1b8b1b55c602ca751eba1b1500220cea4ecbafe7c0d5" +dependencies = [ + "rustversion", +] + [[package]] name = "cc" version = "1.0.83" @@ -690,7 +705,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -760,6 +775,20 @@ dependencies = [ "memchr", ] +[[package]] +name = "compact_str" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6050c3a16ddab2e412160b31f2c871015704239bca62f72f6e5f0be631d3f644" +dependencies = [ + "castaway", + "cfg-if", + "itoa", + "rustversion", + "ryu", + "static_assertions", +] + [[package]] name = "console" version = "0.15.8" @@ -769,7 +798,7 @@ dependencies = [ "encode_unicode", "lazy_static", "libc", - "unicode-width", + "unicode-width 0.1.11", "windows-sys 0.52.0", ] @@ -876,6 +905,12 @@ dependencies = [ "windows-sys 0.33.0", ] +[[package]] +name = "cow-utils" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "417bef24afe1460300965a25ff4a24b8b45ad011948302ec221e8a0a81eb2c79" + [[package]] name = "cpufeatures" version = "0.2.12" @@ -1082,7 +1117,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30d2b3721e861707777e3195b0158f950ae6dc4a27e4d02ff9f67e3eb3de199e" dependencies = [ "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -1130,7 +1165,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -1152,7 +1187,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core 0.20.10", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -1263,7 +1298,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -1283,7 +1318,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core 0.20.2", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -1547,7 +1582,7 @@ checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -1568,7 +1603,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -1755,6 +1790,10 @@ dependencies = [ "farmfe_macro_plugin", "farmfe_toolkit", "farmfe_toolkit_plugin_types", + "oxc_allocator", + "oxc_parser", + "oxc_span", + "oxc_transformer", "regex", "serde", "serde_json", @@ -1951,7 +1990,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -2107,7 +2146,7 @@ checksum = "8d7ccf961415e7aa17ef93dcb6c2441faaa8e768abe09e659b908089546f74c5" dependencies = [ "proc-macro2", "swc_macros_common", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -2187,7 +2226,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -2270,7 +2309,7 @@ checksum = "b0e085ded9f1267c32176b40921b9754c474f7dd96f7e808d4a982e48aa1e854" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -2523,7 +2562,7 @@ dependencies = [ "new_debug_unreachable", "once_cell", "phf", - "rustc-hash", + "rustc-hash 1.1.0", "triomphe", ] @@ -2638,7 +2677,7 @@ dependencies = [ "libflate", "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -2673,7 +2712,7 @@ dependencies = [ "instant", "number_prefix", "portable-atomic", - "unicode-width", + "unicode-width 0.1.11", ] [[package]] @@ -2751,7 +2790,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -3003,7 +3042,7 @@ version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "libc", "redox_syscall 0.4.1", ] @@ -3014,7 +3053,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "libc", ] @@ -3105,9 +3144,9 @@ checksum = "0ca88d725a0a943b096803bd34e73a4437208b6077654cc4ecb2947a5f91618d" [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" @@ -3147,9 +3186,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" dependencies = [ "autocfg", ] @@ -3163,7 +3202,7 @@ dependencies = [ "miette-derive 5.10.0", "once_cell", "thiserror", - "unicode-width", + "unicode-width 0.1.11", ] [[package]] @@ -3177,7 +3216,7 @@ dependencies = [ "owo-colors", "textwrap", "thiserror", - "unicode-width", + "unicode-width 0.1.11", ] [[package]] @@ -3188,7 +3227,7 @@ checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -3199,7 +3238,7 @@ checksum = "dcf09caffaac8068c346b6df2a7fc27a177fd20b39421a39ce0a211bde679a6c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -3258,7 +3297,7 @@ version = "2.16.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1bd081bbaef43600fd2c5dd4c525b8ecea7dfdacf40ebc674e87851dce6559e" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "ctor 0.2.6", "napi-derive", "napi-sys", @@ -3284,7 +3323,7 @@ dependencies = [ "napi-derive-backend", "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -3299,7 +3338,7 @@ dependencies = [ "quote", "regex", "semver 1.0.21", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -3393,6 +3432,12 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "nonmax" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "610a5acd306ec67f907abe5567859a3c693fb9886eb1f012ab8f2a47bef3db51" + [[package]] name = "normpath" version = "0.2.0" @@ -3408,7 +3453,7 @@ version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "crossbeam-channel", "filetime", "fsevent-sys", @@ -3423,11 +3468,10 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", "serde", @@ -3441,11 +3485,10 @@ checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] @@ -3507,7 +3550,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -3573,7 +3616,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "block2 0.5.1", "libc", "objc2 0.5.2", @@ -3589,7 +3632,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation", @@ -3628,7 +3671,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "block2 0.5.1", "libc", "objc2 0.5.2", @@ -3640,7 +3683,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation", @@ -3652,7 +3695,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation", @@ -3706,9 +3749,288 @@ dependencies = [ [[package]] name = "owo-colors" -version = "4.0.0" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb37767f6569cd834a413442455e0f066d0d522de8630436e2a1761d9726ba56" + +[[package]] +name = "oxc-browserslist" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d240f6572a29895f324ad834a42a0c4bad0739269a08d0181ad7d6db7537e0d1" +dependencies = [ + "nom", + "rustc-hash 2.0.0", + "serde", + "serde_json", + "thiserror", + "time", +] + +[[package]] +name = "oxc-miette" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e03e63fd113c068b82d07c9c614b0b146c08a3ac0a4dface3ea1d1a9d14d549e" +dependencies = [ + "cfg-if", + "owo-colors", + "oxc-miette-derive", + "textwrap", + "thiserror", + "unicode-width 0.2.0", +] + +[[package]] +name = "oxc-miette-derive" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e21f680e8c5f1900297d394627d495351b9e37761f7bbf90116bd5eeb6e80967" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "oxc_allocator" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "931f734a61f63a0571163b160b764d90d83077c4d2631d15b26fe1b66763dad8" +dependencies = [ + "allocator-api2", + "bumpalo", +] + +[[package]] +name = "oxc_ast" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9a771175e84c2324c841fe7ca3ddacb5df8102f043e2fc3e96d0bfee039c13d" +dependencies = [ + "bitflags 2.6.0", + "cow-utils", + "num-bigint", + "num-traits", + "oxc_allocator", + "oxc_ast_macros", + "oxc_estree", + "oxc_regular_expression", + "oxc_span", + "oxc_syntax", +] + +[[package]] +name = "oxc_ast_macros" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed71131e79889e226fb6510b90fa1a4a7495c8fdac43a4f505334fb0f1324e3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "oxc_cfg" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e13f126deb1a5c4ac158816cd6dae5ad22004e9010de1b59e8fbfa20d636872" +dependencies = [ + "bitflags 2.6.0", + "itertools 0.13.0", + "nonmax", + "oxc_index", + "oxc_syntax", + "petgraph", + "rustc-hash 2.0.0", +] + +[[package]] +name = "oxc_data_structures" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60c1e9651f904dd130930ae4d567147e06155600f7e545376558a8f476ca398c" +dependencies = [ + "assert-unchecked", +] + +[[package]] +name = "oxc_diagnostics" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caff54706df99d2a78a5a4e3455ff45448d81ef1bb63c22cd14052ca0e993a3f" +checksum = "e37049d46eb02a97e4cc0900672a921666393c642c1ad419a20d483285f5b590" +dependencies = [ + "oxc-miette", + "rustc-hash 2.0.0", +] + +[[package]] +name = "oxc_ecmascript" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93b4201e1ebf6c13ed7296268ef08dabb864218e835f2b1f174eea73958888d5" +dependencies = [ + "num-bigint", + "num-traits", + "oxc_ast", + "oxc_span", + "oxc_syntax", +] + +[[package]] +name = "oxc_estree" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fa45c638ccfd88b5c26147b0a98e1e8dd49542327dda94445b940ef91920d6a" + +[[package]] +name = "oxc_index" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae76739229d0cc5e834e0e3b9e8c4078a86828ff47f5bc71138e4571ce528f83" + +[[package]] +name = "oxc_parser" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0106e10cd67a59d91a75232d4c40f188b8532efea9b9bbed110bce157e7d3b9a" +dependencies = [ + "assert-unchecked", + "bitflags 2.6.0", + "cow-utils", + "memchr", + "num-bigint", + "num-traits", + "oxc_allocator", + "oxc_ast", + "oxc_diagnostics", + "oxc_regular_expression", + "oxc_span", + "oxc_syntax", + "rustc-hash 2.0.0", + "seq-macro", +] + +[[package]] +name = "oxc_regular_expression" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bd0d5b1b943173378a5f61d6a4c49edc7e8c9157241e9bbba54594d7449b4c" +dependencies = [ + "oxc_allocator", + "oxc_ast_macros", + "oxc_diagnostics", + "oxc_estree", + "oxc_span", + "phf", + "rustc-hash 2.0.0", + "unicode-id-start", +] + +[[package]] +name = "oxc_semantic" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90df00caf2d0bc7adf30f60e16b7b0672f92e328d025b00b5ea0ace2edffb5c2" +dependencies = [ + "assert-unchecked", + "indexmap 2.6.0", + "itertools 0.13.0", + "oxc_allocator", + "oxc_ast", + "oxc_cfg", + "oxc_diagnostics", + "oxc_ecmascript", + "oxc_index", + "oxc_span", + "oxc_syntax", + "phf", + "rustc-hash 2.0.0", +] + +[[package]] +name = "oxc_span" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7b5d7caf8a20611f34c5c9ebdf232b6b42498e5424d02ef1e2dffe31553b49f" +dependencies = [ + "compact_str", + "oxc-miette", + "oxc_allocator", + "oxc_ast_macros", + "oxc_estree", +] + +[[package]] +name = "oxc_syntax" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3135d5ddd0dc8ca535c0ac517a526ace8cac2699bb1345064c9fe046ca761dfa" +dependencies = [ + "assert-unchecked", + "bitflags 2.6.0", + "dashmap 6.1.0", + "nonmax", + "oxc_allocator", + "oxc_ast_macros", + "oxc_estree", + "oxc_index", + "oxc_span", + "phf", + "rustc-hash 2.0.0", + "ryu-js", + "unicode-id-start", +] + +[[package]] +name = "oxc_transformer" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ddfedbd5af5e66b6d1d0165a5e81c473544e77d1aa0e1552dd1c3d43541f008" +dependencies = [ + "base64 0.22.1", + "cow-utils", + "dashmap 6.1.0", + "indexmap 2.6.0", + "itoa", + "oxc-browserslist", + "oxc_allocator", + "oxc_ast", + "oxc_data_structures", + "oxc_diagnostics", + "oxc_ecmascript", + "oxc_parser", + "oxc_regular_expression", + "oxc_semantic", + "oxc_span", + "oxc_syntax", + "oxc_traverse", + "ropey", + "rustc-hash 2.0.0", + "serde", + "serde_json", + "sha1", +] + +[[package]] +name = "oxc_traverse" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef6ab3d857d404750ae266d1ade5ba95e6d59d617a92b44b2c63d860fc887e3" +dependencies = [ + "compact_str", + "itoa", + "memoffset 0.9.1", + "oxc_allocator", + "oxc_ast", + "oxc_data_structures", + "oxc_ecmascript", + "oxc_semantic", + "oxc_span", + "oxc_syntax", + "rustc-hash 2.0.0", +] [[package]] name = "parking_lot" @@ -3762,9 +4084,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "petgraph" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", "indexmap 2.6.0", @@ -3800,7 +4122,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -3829,7 +4151,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -3944,9 +4266,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.81" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -4331,11 +4653,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ "base64 0.21.7", - "bitflags 2.5.0", + "bitflags 2.6.0", "serde", "serde_derive", ] +[[package]] +name = "ropey" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93411e420bcd1a75ddd1dc3caf18c23155eda2c090631a85af21ba19e97093b5" +dependencies = [ + "smallvec", + "str_indices", +] + [[package]] name = "rust-embed" version = "8.5.0" @@ -4358,7 +4690,7 @@ dependencies = [ "quote", "rust-embed-utils", "shellexpand", - "syn 2.0.65", + "syn 2.0.87", "walkdir", ] @@ -4384,6 +4716,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustc_version" version = "0.2.3" @@ -4408,7 +4746,7 @@ version = "0.38.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -4442,9 +4780,9 @@ checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "ryu-js" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4950d85bc52415f8432144c97c4791bd0c4f7954de32a7270ee9cccd3c22b12b" +checksum = "ad97d4ce1560a5e27cec89519dc8300d1aa6035b099821261c651486a19e44d5" [[package]] name = "same-file" @@ -4467,7 +4805,7 @@ dependencies = [ "parking_lot", "prost", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "serde", "serde_json", "url", @@ -4496,7 +4834,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -4547,11 +4885,17 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +[[package]] +name = "seq-macro" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" + [[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", ] @@ -4569,13 +4913,13 @@ dependencies = [ [[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.65", + "syn 2.0.87", ] [[package]] @@ -4586,17 +4930,18 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] name = "serde_json" -version = "1.0.120" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "indexmap 2.6.0", "itoa", + "memchr", "ryu", "serde", ] @@ -4821,7 +5166,7 @@ dependencies = [ "data-encoding", "debugid", "if_chain", - "rustc-hash", + "rustc-hash 1.1.0", "rustc_version 0.2.3", "serde", "serde_json", @@ -4875,7 +5220,7 @@ checksum = "9cf483ea7e0e3a03d1b91687895814425149ad77facd3e2b6839dde26da98454" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -4884,6 +5229,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "str_indices" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d08889ec5408683408db66ad89e0e1f93dff55c73a4ccc71c427d5b277ee47e6" + [[package]] name = "string_enum" version = "1.0.0" @@ -4893,7 +5244,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -4923,7 +5274,7 @@ dependencies = [ "bumpalo", "hashbrown 0.14.5", "ptr_meta", - "rustc-hash", + "rustc-hash 1.1.0", "triomphe", ] @@ -4937,7 +5288,7 @@ dependencies = [ "hstr", "once_cell", "rkyv", - "rustc-hash", + "rustc-hash 1.1.0", "serde", ] @@ -4973,7 +5324,7 @@ dependencies = [ "once_cell", "parking_lot", "rkyv", - "rustc-hash", + "rustc-hash 1.1.0", "serde", "siphasher", "sourcemap", @@ -4982,7 +5333,7 @@ dependencies = [ "swc_eq_ignore_macros", "swc_visit", "tracing", - "unicode-width", + "unicode-width 0.1.11", "url", ] @@ -5010,7 +5361,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -5033,8 +5384,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5975118f6d3fe1cff7e7073999a9ffc37f55b9f57c1e4e11d81ca3cb6dda2d1c" dependencies = [ "auto_impl", - "bitflags 2.5.0", - "rustc-hash", + "bitflags 2.6.0", + "rustc-hash 1.1.0", "serde", "swc_atoms", "swc_common", @@ -5052,7 +5403,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -5075,7 +5426,7 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf51da567426fa8850597ccd115572aca04b93dfaeb2a43ee8e5fc5d5849ba6c" dependencies = [ - "rustc-hash", + "rustc-hash 1.1.0", "serde", "swc_atoms", "swc_common", @@ -5149,7 +5500,7 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99e7c0cd9dfe2a49c8f0b4ce699c13c9e270b8487a0176e1d89e5a9a586d0b3b" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "bytecheck", "is-macro", "num-bigint", @@ -5193,7 +5544,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -5235,7 +5586,7 @@ dependencies = [ "arrayvec", "indexmap 2.6.0", "is-macro", - "rustc-hash", + "rustc-hash 1.1.0", "serde", "serde_derive", "smallvec", @@ -5428,7 +5779,7 @@ dependencies = [ "phf", "radix_fmt", "regex", - "rustc-hash", + "rustc-hash 1.1.0", "ryu-js", "serde", "serde_json", @@ -5481,7 +5832,7 @@ dependencies = [ "indexmap 2.6.0", "once_cell", "preset_env_base", - "rustc-hash", + "rustc-hash 1.1.0", "semver 1.0.21", "serde", "serde_json", @@ -5522,12 +5873,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6f43d1983d48dca819a7d0c79c5eb98011a2f8759acbddd972858ec228c66d4" dependencies = [ "better_scoped_tls", - "bitflags 2.5.0", + "bitflags 2.6.0", "indexmap 2.6.0", "once_cell", "phf", "rayon", - "rustc-hash", + "rustc-hash 1.1.0", "serde", "smallvec", "swc_atoms", @@ -5599,7 +5950,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -5610,7 +5961,7 @@ checksum = "25f8b1f049d172e4b83167751293728ce0c4692e364c1ffbce7af35bb7dad855" dependencies = [ "Inflector", "anyhow", - "bitflags 2.5.0", + "bitflags 2.6.0", "indexmap 2.6.0", "is-macro", "path-clean 1.0.1", @@ -5640,7 +5991,7 @@ dependencies = [ "once_cell", "petgraph", "rayon", - "rustc-hash", + "rustc-hash 1.1.0", "serde_json", "swc_atoms", "swc_common", @@ -5661,7 +6012,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3090cde1901f95b5430171709acc319cd36acda5c2a4a77706656ede5fbdd4f" dependencies = [ "either", - "rustc-hash", + "rustc-hash 1.1.0", "serde", "smallvec", "swc_atoms", @@ -5724,7 +6075,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c85c31dad1d402a52394eb184742a7095ba02277c55df327b89fb8bd65e59a7c" dependencies = [ "indexmap 2.6.0", - "rustc-hash", + "rustc-hash 1.1.0", "swc_atoms", "swc_common", "swc_ecma_ast", @@ -5744,7 +6095,7 @@ dependencies = [ "num_cpus", "once_cell", "rayon", - "rustc-hash", + "rustc-hash 1.1.0", "ryu-js", "swc_atoms", "swc_common", @@ -5777,7 +6128,7 @@ checksum = "e96e15288bf385ab85eb83cff7f9e2d834348da58d0a31b33bdb572e66ee413e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -5801,7 +6152,7 @@ checksum = "b1b3add3571bc073f49b4f4fb4326f54c24fe7799296e0ad5341af895150e79c" dependencies = [ "indexmap 2.6.0", "petgraph", - "rustc-hash", + "rustc-hash 1.1.0", "swc_common", ] @@ -5825,8 +6176,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12419d070a0d184f599e804394d357d5c05f9a4264543ab62a057429ba86a95d" dependencies = [ "auto_impl", - "bitflags 2.5.0", - "rustc-hash", + "bitflags 2.6.0", + "rustc-hash 1.1.0", "swc_atoms", "swc_common", "swc_html_ast", @@ -5843,7 +6194,7 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -5921,7 +6272,7 @@ checksum = "a509f56fca05b39ba6c15f3e58636c3924c78347d63853632ed2ffcb6f5a0ac7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -5980,7 +6331,7 @@ checksum = "4c78717a841565df57f811376a3d19c9156091c55175e12d378f3a522de70cef" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -6006,9 +6357,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.65" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2863d96a84c6439701d7a38f9de935ec562c8832cc55d1dde0f513b52fad106" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", @@ -6082,13 +6433,13 @@ dependencies = [ [[package]] name = "textwrap" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" +checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" dependencies = [ "smawk", "unicode-linebreak", - "unicode-width", + "unicode-width 0.1.11", ] [[package]] @@ -6108,7 +6459,7 @@ checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -6190,7 +6541,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -6283,7 +6634,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] @@ -6393,6 +6744,12 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +[[package]] +name = "unicode-width" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" + [[package]] name = "unicode-xid" version = "0.2.4" @@ -6658,7 +7015,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", "wasm-bindgen-shared", ] @@ -6692,7 +7049,7 @@ checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6901,7 +7258,7 @@ dependencies = [ "lazy_static", "libc", "mach2", - "memoffset 0.9.0", + "memoffset 0.9.1", "more-asserts", "region", "scopeguard", @@ -7007,7 +7364,7 @@ version = "0.121.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "indexmap 2.6.0", "semver 1.0.21", ] @@ -7020,7 +7377,7 @@ checksum = "a259b226fd6910225aa7baeba82f9d9933b6d00f2ce1b49b80fa4214328237cc" dependencies = [ "leb128", "memchr", - "unicode-width", + "unicode-width 0.1.11", "wasm-encoder", ] @@ -7644,7 +8001,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.65", + "syn 2.0.87", ] [[package]] diff --git a/rust-plugins/dts/Cargo.toml b/rust-plugins/dts/Cargo.toml index d74924323..8af4af2a9 100644 --- a/rust-plugins/dts/Cargo.toml +++ b/rust-plugins/dts/Cargo.toml @@ -15,3 +15,7 @@ regex = "1.7.3" serde = { version = "1.0", features = ["derive", "rc"] } serde_json = { version = "1.0", features = ["preserve_order"] } url = "2.3.1" +oxc_allocator = "0.36.0" +oxc_parser = "0.36.0" +oxc_span = "0.36.0" +oxc_transformer = "0.36.0" diff --git a/rust-plugins/dts/src/lib.rs b/rust-plugins/dts/src/lib.rs index fed9b111f..24341ad6d 100644 --- a/rust-plugins/dts/src/lib.rs +++ b/rust-plugins/dts/src/lib.rs @@ -1,11 +1,18 @@ #![deny(clippy::all)] +use farmfe_toolkit::swc_ecma_transforms::{helpers::inject_helpers, typescript::tsx}; -use farmfe_core::{config::Config, plugin::Plugin}; +use farmfe_core::{ + config::Config, + plugin::Plugin, + swc_common::{comments::SingleThreadedComments, Mark}, + swc_ecma_ast::{Module as EcmaAstModule, ModuleItem}, + swc_ecma_parser::{lexer::Lexer, EsSyntax as EsConfig, Parser, StringInput, Syntax}, +}; use farmfe_macro_plugin::farm_plugin; #[derive(serde::Deserialize)] -pub struct Options { +pub struct DtsOptions { pub my_option: Option, } @@ -14,7 +21,7 @@ pub struct FarmPluginDts {} impl FarmPluginDts { fn new(config: &Config, options: String) -> Self { - let opts: Options = serde_json::from_str(&options).unwrap(); + let opts: DtsOptions = serde_json::from_str(&options).unwrap(); Self {} } } @@ -47,7 +54,30 @@ impl Plugin for FarmPluginDts { if param.resolved_path.ends_with(".farm-runtime") { return Ok(None); } - println!("load path: {:#?}", param); + // println!("load path: {:#?}", param); + Ok(None) + } + + fn transform( + &self, + param: &farmfe_core::plugin::PluginTransformHookParam, + context: &std::sync::Arc, + ) -> farmfe_core::error::Result> { + // module type guard is neccessary + // return Ok(Some(farmfe_core::plugin::PluginTransformHookResult { + // content: compile_result.css, + // source_map: compile_result.source_map, + // // tell farm compiler that we have transformed this module to css + // module_type: Some(farmfe_core::module::ModuleType::Css), + // ignore_previous_source_map: false, + // })); + if param.resolved_path.ends_with(".farm-runtime") { + return Ok(None); + } + // let transform_options = oxc_transformer::TransformOptions::default(); + // println!("transform_options : {:#?}", transform_options); + println!("transform path: {:#?}", param); + Ok(None) } }