diff --git a/Cargo.lock b/Cargo.lock index 01d4f92..bb83bc6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,20 +12,35 @@ dependencies = [ "regex", ] +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" [[package]] name = "ast_node" @@ -37,18 +52,18 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.29", + "syn 2.0.46", ] [[package]] name = "async-trait" -version = "0.1.73" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.46", ] [[package]] @@ -60,7 +75,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -69,6 +84,21 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base64" version = "0.13.1" @@ -92,36 +122,39 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "block-buffer" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -131,9 +164,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] @@ -163,40 +196,46 @@ dependencies = [ "typenum", ] -[[package]] -name = "ctor" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" -dependencies = [ - "quote", - "syn 1.0.107", -] - [[package]] name = "dashmap" -version = "5.4.0" +version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown 0.12.3", + "hashbrown 0.14.3", "lock_api", "once_cell", - "parking_lot_core 0.9.7", + "parking_lot_core 0.9.9", ] +[[package]] +name = "data-encoding" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" + [[package]] name = "data-url" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41b319d1b62ffbd002e057f36bebd1f42b9f97927c9577461d855f3513c4289f" +checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a" + +[[package]] +name = "debugid" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" +dependencies = [ + "serde", + "uuid", +] [[package]] name = "deno_ast" -version = "0.29.3" +version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "577ec3850834c2578eb44afa9250f9a807f8497664e6e2aaae19cea0aac2fe3b" +checksum = "da7b09db895527a94de1305455338926cd2a7003231ba589b7b7b57e8da344f2" dependencies = [ "anyhow", "base64", @@ -211,7 +250,6 @@ dependencies = [ "swc_ecma_ast", "swc_ecma_codegen", "swc_ecma_codegen_macros", - "swc_ecma_dep_graph", "swc_ecma_loader", "swc_ecma_parser", "swc_ecma_transforms_base", @@ -242,7 +280,7 @@ dependencies = [ "deno_graph", "escape8259", "futures", - "import_map", + "import_map 0.15.0", "parking_lot 0.11.2", "pretty_assertions", "tokio", @@ -266,9 +304,9 @@ dependencies = [ [[package]] name = "deno_graph" -version = "0.55.0" +version = "0.62.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f09c93dac12402a37be3ee24e0b6a691ddc5fdef13831b375b6c0950efc89e40" +checksum = "a190dc4324d6b2613451cb69989ce0c5ab52eea2ebaa5b96fbf828e553c377fb" dependencies = [ "anyhow", "async-trait", @@ -276,7 +314,9 @@ dependencies = [ "deno_ast", "deno_semver", "futures", - "indexmap 2.0.0", + "import_map 0.18.0", + "indexmap 2.1.0", + "log", "monch", "once_cell", "parking_lot 0.12.1", @@ -300,9 +340,9 @@ dependencies = [ [[package]] name = "deno_semver" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "594fd570fecc994ef602b96214f9d6c8ae11e60e29e37e89ab90af7f6b7f9d00" +checksum = "8169e0148da1946836e6e405bb7eefda411816577e3f2e5749bc6ae1ef952d13" dependencies = [ "monch", "once_cell", @@ -319,9 +359,9 @@ checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" [[package]] name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", @@ -329,9 +369,9 @@ dependencies = [ [[package]] name = "dprint-swc-ext" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a0a2492465344a58a37ae119de59e81fe5a2885f2711c7b5048ef0dfa14ce42" +checksum = "7b2f24ce6b89a06ae3eb08d5d4f88c05d0aef1fa58e2eba8dd92c97b84210c25" dependencies = [ "bumpalo", "num-bigint", @@ -345,9 +385,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "equivalent" @@ -372,9 +412,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -388,14 +428,14 @@ dependencies = [ "pmutil", "proc-macro2", "swc_macros_common", - "syn 2.0.29", + "syn 2.0.46", ] [[package]] name = "futures" -version = "0.3.26" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -408,9 +448,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.26" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -418,15 +458,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.26" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.26" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -435,38 +475,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.26" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-macro" -version = "0.3.26" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.46", ] [[package]] name = "futures-sink" -version = "0.3.26" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.26" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.26" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -482,24 +522,19 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", ] [[package]] -name = "getrandom" -version = "0.2.8" +name = "gimli" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "hashbrown" @@ -509,24 +544,34 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "hermit-abi" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" + +[[package]] +name = "hstr" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +checksum = "de90d3db62411eb62eddabe402d706ac4970f7ac8d088c05f11069cad9be9857" dependencies = [ - "libc", + "new_debug_unreachable", + "once_cell", + "phf", + "rustc-hash", + "smallvec", ] [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -552,6 +597,19 @@ dependencies = [ "url", ] +[[package]] +name = "import_map" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ecd467768fe83c2860e70e5de5297a7366a230ff53e1da2158bdac2384cd39d" +dependencies = [ + "indexmap 1.9.3", + "log", + "serde", + "serde_json", + "url", +] + [[package]] name = "indexmap" version = "1.9.3" @@ -565,12 +623,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.3", "serde", ] @@ -585,22 +643,21 @@ dependencies = [ [[package]] name = "is-macro" -version = "0.3.0" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4467ed1321b310c2625c5aa6c1b1ffc5de4d9e42668cf697a08fb033ee8265e" +checksum = "b75828adcb53122ef5ea649a39f50f82d94b754099bf6331b32e255e1891e8fb" dependencies = [ "Inflector", - "pmutil", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.46", ] [[package]] name = "itoa" -version = "1.0.5" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "js-sys" @@ -619,15 +676,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.139" +version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -635,29 +692,34 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "memchr" -version = "2.6.2" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" + +[[package]] +name = "miniz_oxide" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5486aed0026218e61b8a01d5fbd5a0a134649abb71a0e53b7bc088529dced86e" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] [[package]] name = "mio" -version = "0.8.5" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", - "log", "wasi", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] @@ -674,9 +736,9 @@ checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -696,37 +758,37 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ "hermit-abi", "libc", ] [[package]] -name = "once_cell" -version = "1.18.0" +name = "object" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] [[package]] -name = "output_vt100" -version = "0.1.3" +name = "once_cell" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" -dependencies = [ - "winapi", -] +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "parking_lot" @@ -746,7 +808,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.7", + "parking_lot_core 0.9.9", ] [[package]] @@ -758,22 +820,22 @@ dependencies = [ "cfg-if", "instant", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "smallvec", "winapi", ] [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.4.1", "smallvec", - "windows-sys 0.45.0", + "windows-targets", ] [[package]] @@ -784,36 +846,35 @@ checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "petgraph" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 1.9.3", + "indexmap 2.1.0", ] [[package]] name = "phf" -version = "0.10.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ "phf_macros", "phf_shared", - "proc-macro-hack", ] [[package]] name = "phf_generator" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ "phf_shared", "rand", @@ -821,32 +882,31 @@ dependencies = [ [[package]] name = "phf_macros" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" dependencies = [ "phf_generator", "phf_shared", - "proc-macro-hack", "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.46", ] [[package]] name = "phf_shared" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ "siphasher", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -862,30 +922,16 @@ checksum = "52a40bc70c2c58040d2d8b167ba9a5ff59fc9dab7ad44771cfde3dcfde7a09c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.46", ] -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - [[package]] name = "pretty_assertions" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a25e9bcb20aa780fd0bb16b72403a9064d6b3f22f026946029acb941a50af755" +checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" dependencies = [ - "ctor", "diff", - "output_vt100", "yansi", ] @@ -898,7 +944,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", "version_check", ] @@ -913,17 +959,11 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "2de98502f212cfcea8d0bb305bd0f49d7ebdd75b64ba0a68f937d888f4e0d6db" dependencies = [ "unicode-ident", ] @@ -939,9 +979,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -958,18 +998,6 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", "rand_core", ] @@ -978,9 +1006,6 @@ name = "rand_core" version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] [[package]] name = "redox_syscall" @@ -991,11 +1016,32 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "regex" -version = "1.7.1" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", @@ -1004,15 +1050,21 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "relative-path" -version = "1.7.3" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e898588f33fdd5b9420719948f9f2a32c922a246964576f71ba7f24f80610fbc" + +[[package]] +name = "rustc-demangle" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3bf6b372449361333ac1f498b7edae4dd5e70dccd7c0c2a7c7bce8f05ede648" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc-hash" @@ -1031,15 +1083,21 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.12" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" + +[[package]] +name = "ryu-js" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4950d85bc52415f8432144c97c4791bd0c4f7954de32a7270ee9cccd3c22b12b" [[package]] name = "scoped-tls" @@ -1049,9 +1107,9 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "semver" @@ -1070,9 +1128,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.152" +version = "1.0.194" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "0b114498256798c94a0689e1a15fec6005dee8ac1f41de56404b67afc2a4b773" dependencies = [ "serde_derive", ] @@ -1090,22 +1148,22 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.152" +version = "1.0.194" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +checksum = "a3385e45322e8f9931410f01b3031ec534c3947d0e94c18049af4d9f9907d4e0" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.46", ] [[package]] name = "serde_json" -version = "1.0.92" +version = "1.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7434af0dc1cbd59268aa98b4c22c131c0584d2232f6fb166efb993e2832e896a" +checksum = "6fbd975230bada99c8bb618e0c365c2eefa219158d5c6c29610fd09ff1833257" dependencies = [ - "indexmap 1.9.3", + "indexmap 2.1.0", "itoa", "ryu", "serde", @@ -1124,33 +1182,33 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" dependencies = [ "libc", ] [[package]] name = "siphasher" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "smartstring" @@ -1165,21 +1223,22 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.7" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", - "winapi", + "windows-sys", ] [[package]] name = "sourcemap" -version = "6.2.1" +version = "6.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aebe057d110ddba043708da3fb010bf562ff6e9d4d60c9ee92860527bcbeccd6" +checksum = "e4cbf65ca7dc576cf50e21f8d0712d96d4fcfd797389744b7b222a85cdf5bd90" dependencies = [ - "base64", + "data-encoding", + "debugid", "if_chain", "rustc_version", "serde", @@ -1188,12 +1247,6 @@ dependencies = [ "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" @@ -1213,32 +1266,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "string_cache" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" -dependencies = [ - "new_debug_unreachable", - "once_cell", - "parking_lot 0.12.1", - "phf_shared", - "precomputed-hash", - "serde", -] - -[[package]] -name = "string_cache_codegen" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" -dependencies = [ - "phf_generator", - "phf_shared", - "proc-macro2", - "quote", -] - [[package]] name = "string_enum" version = "0.4.1" @@ -1249,28 +1276,26 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.29", + "syn 2.0.46", ] [[package]] name = "swc_atoms" -version = "0.5.9" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f54563d7dcba626d4acfe14ed12def7ecc28e004debe3ecd2c3ee07cc47e449" +checksum = "b8a9e1b6d97f27b6abe5571f8fe3bdbd2fa987299fc2126450c7cde6214896ef" dependencies = [ + "hstr", "once_cell", "rustc-hash", "serde", - "string_cache", - "string_cache_codegen", - "triomphe", ] [[package]] name = "swc_bundler" -version = "0.219.5" +version = "0.222.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "421cc659acd7807306c5a422eb95d09c20975464fe3ad5004e1e62ee2a6fc304" +checksum = "7dc457de4306480ef5f2b54aa23f8d93ff476991de6e1db453bc94c56af732b0" dependencies = [ "anyhow", "crc", @@ -1298,9 +1323,9 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.32.0" +version = "0.33.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39cb7fcd56655c8ae7dcf2344f0be6cbff4d9c7cb401fe3ec8e56e1de8dfe582" +checksum = "5ccb656cd57c93614e4e8b33a60e75ca095383565c1a8d2bbe6a1103942831e0" dependencies = [ "ast_node", "better_scoped_tls", @@ -1314,7 +1339,6 @@ dependencies = [ "serde", "siphasher", "sourcemap", - "string_cache", "swc_atoms", "swc_eq_ignore_macros", "swc_visit", @@ -1345,18 +1369,19 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.29", + "syn 2.0.46", ] [[package]] name = "swc_ecma_ast" -version = "0.109.0" +version = "0.110.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bc2286cedd688a68f214faa1c19bb5cceab7c9c54d0cbe3273e4c1704e38f69" +checksum = "2c3d416121da2d56bcbd1b1623725a68890af4552fef0c6d1e4bfa92776ccd6a" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "is-macro", "num-bigint", + "phf", "scoped-tls", "serde", "string_enum", @@ -1367,9 +1392,9 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.144.1" +version = "0.146.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e62ba2c0ed1f119fc1a76542d007f1b2c12854d54dea15f5491363227debe11" +checksum = "7b7b37ef40385cc2e294ece3d42048dcda6392838724dd5f02ff8da3fa105271" dependencies = [ "memchr", "num-bigint", @@ -1394,26 +1419,14 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.29", -] - -[[package]] -name = "swc_ecma_dep_graph" -version = "0.111.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5526adf6a434f145c8caf7e3a2dba554a2ad09b84467b6a62210f9ef0af0f71" -dependencies = [ - "swc_atoms", - "swc_common", - "swc_ecma_ast", - "swc_ecma_visit", + "syn 2.0.46", ] [[package]] name = "swc_ecma_loader" -version = "0.44.2" +version = "0.45.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d7c322462657ae27ac090a2c89f7e456c94416284a2f5ecf66c43a6a3c19d1" +checksum = "31cf7549feec3698d0110a0a71ae547f31ae272dc92db3285ce126d6dcbdadf3" dependencies = [ "anyhow", "pathdiff", @@ -1424,13 +1437,15 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.139.0" +version = "0.141.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eab46cb863bc5cd61535464e07e5b74d5f792fa26a27b9f6fd4c8daca9903b7" +checksum = "9590deff1b29aafbff8901b9d38d00211393f6b17b5cab878562db89a8966d88" dependencies = [ "either", + "new_debug_unreachable", "num-bigint", "num-traits", + "phf", "serde", "smallvec", "smartstring", @@ -1444,12 +1459,12 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" -version = "0.132.2" +version = "0.134.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ffd4a8149052bfc1ec1832fcbe04f317846ce635a49ec438df33b06db27d26" +checksum = "d74ca42a400257d8563624122813c1849c3d87e7abe3b9b2ed7514c76f64ad2f" dependencies = [ "better_scoped_tls", - "bitflags 2.4.0", + "bitflags 2.4.1", "indexmap 1.9.3", "once_cell", "phf", @@ -1467,9 +1482,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_classes" -version = "0.121.2" +version = "0.123.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4b7fee0e2c6f12456d2aefb2418f2f26529b995945d493e1dce35a5a22584fc" +checksum = "7e68880cf7d65b93e0446b3ee079f33d94e0eddac922f75b736a6ea7669517c0" dependencies = [ "swc_atoms", "swc_common", @@ -1489,14 +1504,14 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.29", + "syn 2.0.46", ] [[package]] name = "swc_ecma_transforms_optimization" -version = "0.192.3" +version = "0.195.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "880fd2a588ac88a61cd1d21b10203bbabe31d7adacbd22de3bb4d702bf2c42b4" +checksum = "808ae9b4a291d73adf36d543f07d5a64a5c121a72c5d5f66898415d1b396b1d1" dependencies = [ "dashmap", "indexmap 1.9.3", @@ -1518,9 +1533,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_proposal" -version = "0.166.3" +version = "0.168.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122fd9a69f464694edefbf9c59106b3c15e5cc8cb8575a97836e4fb79018e98f" +checksum = "c17e1f409e026be953fabb327923ebc5fdc7c664bcac036b76107834798640ed" dependencies = [ "either", "rustc-hash", @@ -1538,9 +1553,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_react" -version = "0.178.3" +version = "0.180.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "675b5c755b0448268830e85e59429095d3423c0ce4a850b209c6f0eeab069f63" +checksum = "9fa7f368a80f28eeaa0f529cff6fb5d7578ef10a60be25bfd2582cb3f8ff5c9e" dependencies = [ "base64", "dashmap", @@ -1562,10 +1577,11 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.182.3" +version = "0.185.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eba97b1ea71739fcf278aedad4677a3cacb52288a3f3566191b70d16a889de6" +checksum = "daa2950c85abb4d555e092503ad2fa4f6dec0ee36a719273fb7a7bb29ead9ab6" dependencies = [ + "ryu-js", "serde", "swc_atoms", "swc_common", @@ -1578,9 +1594,9 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.122.0" +version = "0.124.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11006a3398ffd4693c4d3b0a1b1a5030edbdc04228159f5301120a6178144708" +checksum = "e4a4a0baf6cfa490666a9fe23a17490273f843d19ebc1d6ec89d64c3f8ccdb80" dependencies = [ "indexmap 1.9.3", "num_cpus", @@ -1596,9 +1612,9 @@ dependencies = [ [[package]] name = "swc_ecma_visit" -version = "0.95.0" +version = "0.96.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f628ec196e76e67892441e14eef2e423a738543d32bffdabfeec20c29582117" +checksum = "ba962f0becf83bab12a17365dface5a4f636c9e1743d479e292b96910a753743" dependencies = [ "num-bigint", "swc_atoms", @@ -1617,14 +1633,14 @@ dependencies = [ "pmutil", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.46", ] [[package]] name = "swc_fast_graph" -version = "0.20.0" +version = "0.21.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a407fff2eb5ce3bee7513bdd9531a7be0285bc1213500b6d98ad235428d94cce" +checksum = "8117f6d10bbcb30cb3e549d6fa7637cb6d7c713cb71b2ce1808105a6825c788d" dependencies = [ "indexmap 1.9.3", "petgraph", @@ -1634,9 +1650,9 @@ dependencies = [ [[package]] name = "swc_graph_analyzer" -version = "0.21.0" +version = "0.22.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90b996222612382d0d297d0315f5eedc5a830c37e62476c69774884633d31177" +checksum = "de8f0ac33ef7486723a3acdd9c4541dac79f0433bf878b9075826bca1163d83e" dependencies = [ "auto_impl", "petgraph", @@ -1654,7 +1670,7 @@ dependencies = [ "pmutil", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.46", ] [[package]] @@ -1678,14 +1694,14 @@ dependencies = [ "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.29", + "syn 2.0.46", ] [[package]] name = "syn" -version = "1.0.107" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", @@ -1694,9 +1710,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.29" +version = "2.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" +checksum = "89456b690ff72fddcecf231caedbe615c59480c93358a93dfae7fc29e3ebbf0e" dependencies = [ "proc-macro2", "quote", @@ -1714,22 +1730,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.38" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.38" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.46", ] [[package]] @@ -1749,14 +1765,13 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.25.0" +version = "1.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", - "memchr", "mio", "num_cpus", "parking_lot 0.12.1", @@ -1764,27 +1779,26 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.46", ] [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -1792,34 +1806,24 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.46", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", ] -[[package]] -name = "triomphe" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1ee9bd9239c339d714d657fac840c6d2a4f9c45f4f9ec7b0975113458be78db" -dependencies = [ - "serde", - "stable_deref_trait", -] - [[package]] name = "typed-arena" version = "2.0.2" @@ -1828,27 +1832,27 @@ checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-bidi" -version = "0.3.10" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" [[package]] name = "unicode-id" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d70b6494226b36008c8366c288d77190b3fad2eb4c10533139c1c1f461127f1a" +checksum = "b1b6def86329695390197b82c1e244a54a131ceb66c996f2088a3876e2ae083f" [[package]] name = "unicode-ident" -version = "1.0.6" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -1861,15 +1865,15 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "url" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", @@ -1877,6 +1881,12 @@ dependencies = [ "serde", ] +[[package]] +name = "uuid" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" + [[package]] name = "version_check" version = "0.9.4" @@ -1910,7 +1920,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.46", "wasm-bindgen-shared", ] @@ -1944,7 +1954,7 @@ checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.46", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1957,9 +1967,9 @@ checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" [[package]] name = "web-sys" -version = "0.3.58" +version = "0.3.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fed94beee57daf8dd7d51f2b15dc2bcde92d7a72304cdf662a4371008b71b90" +checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2" dependencies = [ "js-sys", "wasm-bindgen", @@ -1989,33 +1999,18 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows-sys" -version = "0.45.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ "windows-targets", ] [[package]] name = "windows-targets" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -2028,45 +2023,45 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "yansi" diff --git a/js/mod.ts b/js/mod.ts index ad3383a..cdeefdb 100644 --- a/js/mod.ts +++ b/js/mod.ts @@ -123,7 +123,7 @@ export interface CompilerOptions { inlineSources?: boolean; /** Controls how JSX constructs are emitted in JavaScript files. This only * affects output of JS files that started in `.jsx` or `.tsx` files. */ - jsx?: "jsx" | "preserve"; + jsx?: "preserve" | "react-jsx" | "react-jsxdev" | "react-native" | "react"; /** Changes the function called in `.js` files when compiling JSX Elements * using the classic JSX runtime. The most common change is to use `"h"` or * `"preact.h"`. */ @@ -131,6 +131,9 @@ export interface CompilerOptions { /** Specify the JSX fragment factory function to use when targeting react JSX * emit with jsxFactory compiler option is specified, e.g. `Fragment`. */ jsxFragmentFactory?: string; + /** The string module specifier to implicitly import JSX factories from when + * transpiling JSX. */ + jsxImportSource?: string; /** Enables the generation of sourcemap files. */ sourceMap?: boolean; } diff --git a/rs-lib/Cargo.toml b/rs-lib/Cargo.toml index c655fea..2230fe8 100644 --- a/rs-lib/Cargo.toml +++ b/rs-lib/Cargo.toml @@ -11,8 +11,8 @@ license = "MIT" [dependencies] anyhow = "1.0.44" base64 = "0.13.0" -deno_ast = { version = "0.29.3", features = ["bundler", "codegen", "module_specifier", "proposal", "react", "sourcemap", "transforms", "typescript", "visit", "transpiling"] } -deno_graph = "0.55.0" +deno_ast = { version = "0.31.6", features = ["bundler", "codegen", "module_specifier", "proposal", "react", "sourcemap", "transforms", "typescript", "visit", "transpiling"] } +deno_graph = "0.62.3" escape8259 = "0.5.2" futures = "0.3.17" import_map = "0.15.0" diff --git a/rs-lib/src/emit.rs b/rs-lib/src/emit.rs index 76efc88..0099528 100644 --- a/rs-lib/src/emit.rs +++ b/rs-lib/src/emit.rs @@ -202,12 +202,12 @@ pub fn bundle_graph( let mut buf = Vec::new(); let mut srcmap = Vec::new(); { - let cfg = swc::codegen::Config { - minify: false, - ascii_only: false, - target: deno_ast::ES_VERSION, - omit_last_semi: false, - }; + let cfg = swc::codegen::Config::default() + .with_ascii_only(false) + .with_minify(false) + .with_target(deno_ast::ES_VERSION) + .with_omit_last_semi(false); + let mut wr = Box::new(swc::codegen::text_writer::JsWriter::new( cm.clone(), "\n", diff --git a/rs-lib/src/lib.rs b/rs-lib/src/lib.rs index 4ff2ba4..8dbcf73 100644 --- a/rs-lib/src/lib.rs +++ b/rs-lib/src/lib.rs @@ -5,16 +5,21 @@ mod emit; mod text; use anyhow::Result; +use deno_graph::Range; use deno_graph::source::LoadResponse; use deno_graph::BuildOptions; use deno_graph::CapturingModuleAnalyzer; use deno_graph::GraphKind; use deno_graph::ModuleGraph; use deno_graph::ParsedSourceStore; +use deno_graph::source::ResolutionMode; +use deno_graph::source::ResolveError; use import_map::ImportMap; use std::collections::HashMap; use url::Url; +use deno_ast::ParsedSource; + pub use emit::bundle_graph; pub use emit::BundleEmit; pub use emit::BundleOptions; @@ -162,13 +167,14 @@ impl deno_graph::source::Resolver for ImportMapResolver { fn resolve( &self, specifier: &str, - referrer: &ModuleSpecifier, - ) -> Result { + referrer_range: &Range, + _mode: ResolutionMode + ) -> Result { let maybe_import_map = &self.0; let maybe_import_map_err = match maybe_import_map .as_ref() - .map(|import_map| import_map.resolve(specifier, referrer)) + .map(|import_map| import_map.resolve(specifier, &referrer_range.specifier)) { Some(Ok(value)) => return Ok(value), Some(Err(err)) => Some(err), @@ -176,9 +182,9 @@ impl deno_graph::source::Resolver for ImportMapResolver { }; if let Some(err) = maybe_import_map_err { - Err(err.into()) + Err(ResolveError::Other(err.into())) } else { - deno_graph::resolve_import(specifier, referrer).map_err(|err| err.into()) + deno_graph::resolve_import(specifier, &referrer_range.specifier).map_err(|err| err.into()) } } } diff --git a/testdata/jsx/main.tsx b/testdata/jsx/main.tsx new file mode 100644 index 0000000..dbcf2b0 --- /dev/null +++ b/testdata/jsx/main.tsx @@ -0,0 +1 @@ +const helloWorld =
; \ No newline at end of file diff --git a/tests/__snapshots__/jsx/jsx_default/bundle.js b/tests/__snapshots__/jsx/jsx_default/bundle.js new file mode 100644 index 0000000..f76473a --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_default/bundle.js @@ -0,0 +1,3 @@ +React.createElement("div", { + id: "helloWorld" +}); diff --git a/tests/__snapshots__/jsx/jsx_default/transpile/deno.json b/tests/__snapshots__/jsx/jsx_default/transpile/deno.json new file mode 100644 index 0000000..f6ca845 --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_default/transpile/deno.json @@ -0,0 +1,3 @@ +{ + "imports": {} +} diff --git a/tests/__snapshots__/jsx/jsx_default/transpile/local/jsx/main.tsx b/tests/__snapshots__/jsx/jsx_default/transpile/local/jsx/main.tsx new file mode 100644 index 0000000..0a062cb --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_default/transpile/local/jsx/main.tsx @@ -0,0 +1,3 @@ +const helloWorld = /*#__PURE__*/ React.createElement("div", { + id: "helloWorld" +}); diff --git a/tests/__snapshots__/jsx/jsx_default/transpile/modules.json b/tests/__snapshots__/jsx/jsx_default/transpile/modules.json new file mode 100644 index 0000000..f7b4a69 --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_default/transpile/modules.json @@ -0,0 +1,3 @@ +{ + "file:///jsx/main.tsx": "local/jsx/main.tsx" +} diff --git a/tests/__snapshots__/jsx/jsx_type_preserve/bundle.js b/tests/__snapshots__/jsx/jsx_type_preserve/bundle.js new file mode 100644 index 0000000..acc19f5 --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_preserve/bundle.js @@ -0,0 +1 @@ +
; diff --git a/tests/__snapshots__/jsx/jsx_type_preserve/transpile/deno.json b/tests/__snapshots__/jsx/jsx_type_preserve/transpile/deno.json new file mode 100644 index 0000000..f6ca845 --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_preserve/transpile/deno.json @@ -0,0 +1,3 @@ +{ + "imports": {} +} diff --git a/tests/__snapshots__/jsx/jsx_type_preserve/transpile/local/jsx/main.tsx b/tests/__snapshots__/jsx/jsx_type_preserve/transpile/local/jsx/main.tsx new file mode 100644 index 0000000..5c970c5 --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_preserve/transpile/local/jsx/main.tsx @@ -0,0 +1 @@ +const helloWorld =
; diff --git a/tests/__snapshots__/jsx/jsx_type_preserve/transpile/modules.json b/tests/__snapshots__/jsx/jsx_type_preserve/transpile/modules.json new file mode 100644 index 0000000..f7b4a69 --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_preserve/transpile/modules.json @@ -0,0 +1,3 @@ +{ + "file:///jsx/main.tsx": "local/jsx/main.tsx" +} diff --git a/tests/__snapshots__/jsx/jsx_type_react/bundle.js b/tests/__snapshots__/jsx/jsx_type_react/bundle.js new file mode 100644 index 0000000..f76473a --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_react/bundle.js @@ -0,0 +1,3 @@ +React.createElement("div", { + id: "helloWorld" +}); diff --git a/tests/__snapshots__/jsx/jsx_type_react/transpile/deno.json b/tests/__snapshots__/jsx/jsx_type_react/transpile/deno.json new file mode 100644 index 0000000..f6ca845 --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_react/transpile/deno.json @@ -0,0 +1,3 @@ +{ + "imports": {} +} diff --git a/tests/__snapshots__/jsx/jsx_type_react/transpile/local/jsx/main.tsx b/tests/__snapshots__/jsx/jsx_type_react/transpile/local/jsx/main.tsx new file mode 100644 index 0000000..0a062cb --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_react/transpile/local/jsx/main.tsx @@ -0,0 +1,3 @@ +const helloWorld = /*#__PURE__*/ React.createElement("div", { + id: "helloWorld" +}); diff --git a/tests/__snapshots__/jsx/jsx_type_react/transpile/modules.json b/tests/__snapshots__/jsx/jsx_type_react/transpile/modules.json new file mode 100644 index 0000000..f7b4a69 --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_react/transpile/modules.json @@ -0,0 +1,3 @@ +{ + "file:///jsx/main.tsx": "local/jsx/main.tsx" +} diff --git a/tests/__snapshots__/jsx/jsx_type_reactjsx/deno.json b/tests/__snapshots__/jsx/jsx_type_reactjsx/deno.json new file mode 100644 index 0000000..f6ca845 --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_reactjsx/deno.json @@ -0,0 +1,3 @@ +{ + "imports": {} +} diff --git a/tests/__snapshots__/jsx/jsx_type_reactjsx/local/jsx/main.tsx b/tests/__snapshots__/jsx/jsx_type_reactjsx/local/jsx/main.tsx new file mode 100644 index 0000000..fb42611 --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_reactjsx/local/jsx/main.tsx @@ -0,0 +1,4 @@ +import { jsx as _jsx } from "/jsx-runtime"; +const helloWorld = /*#__PURE__*/ _jsx("div", { + id: "helloWorld" +}); diff --git a/tests/__snapshots__/jsx/jsx_type_reactjsx/modules.json b/tests/__snapshots__/jsx/jsx_type_reactjsx/modules.json new file mode 100644 index 0000000..f7b4a69 --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_reactjsx/modules.json @@ -0,0 +1,3 @@ +{ + "file:///jsx/main.tsx": "local/jsx/main.tsx" +} diff --git a/tests/__snapshots__/jsx/jsx_type_reactjsx_with_custom_import_source/deno.json b/tests/__snapshots__/jsx/jsx_type_reactjsx_with_custom_import_source/deno.json new file mode 100644 index 0000000..f6ca845 --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_reactjsx_with_custom_import_source/deno.json @@ -0,0 +1,3 @@ +{ + "imports": {} +} diff --git a/tests/__snapshots__/jsx/jsx_type_reactjsx_with_custom_import_source/local/jsx/main.tsx b/tests/__snapshots__/jsx/jsx_type_reactjsx_with_custom_import_source/local/jsx/main.tsx new file mode 100644 index 0000000..3aec81c --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_reactjsx_with_custom_import_source/local/jsx/main.tsx @@ -0,0 +1,4 @@ +import { jsx as _jsx } from "example/jsx-runtime"; +const helloWorld = /*#__PURE__*/ _jsx("div", { + id: "helloWorld" +}); diff --git a/tests/__snapshots__/jsx/jsx_type_reactjsx_with_custom_import_source/modules.json b/tests/__snapshots__/jsx/jsx_type_reactjsx_with_custom_import_source/modules.json new file mode 100644 index 0000000..f7b4a69 --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_reactjsx_with_custom_import_source/modules.json @@ -0,0 +1,3 @@ +{ + "file:///jsx/main.tsx": "local/jsx/main.tsx" +} diff --git a/tests/__snapshots__/jsx/jsx_type_reactjsxdev/deno.json b/tests/__snapshots__/jsx/jsx_type_reactjsxdev/deno.json new file mode 100644 index 0000000..f6ca845 --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_reactjsxdev/deno.json @@ -0,0 +1,3 @@ +{ + "imports": {} +} diff --git a/tests/__snapshots__/jsx/jsx_type_reactjsxdev/local/jsx/main.tsx b/tests/__snapshots__/jsx/jsx_type_reactjsxdev/local/jsx/main.tsx new file mode 100644 index 0000000..364f575 --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_reactjsxdev/local/jsx/main.tsx @@ -0,0 +1,8 @@ +import { jsxDEV as _jsxDEV } from "/jsx-dev-runtime"; +const helloWorld = /*#__PURE__*/ _jsxDEV("div", { + id: "helloWorld" +}, void 0, false, { + fileName: "file:///Users/benedikt/PROJECTS/unyt/deno_emit/testdata/jsx/main.tsx", + lineNumber: 1, + columnNumber: 20 +}, this); diff --git a/tests/__snapshots__/jsx/jsx_type_reactjsxdev/modules.json b/tests/__snapshots__/jsx/jsx_type_reactjsxdev/modules.json new file mode 100644 index 0000000..f7b4a69 --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_reactjsxdev/modules.json @@ -0,0 +1,3 @@ +{ + "file:///jsx/main.tsx": "local/jsx/main.tsx" +} diff --git a/tests/__snapshots__/jsx/jsx_type_reactjsxdev_with_custom_import_source/deno.json b/tests/__snapshots__/jsx/jsx_type_reactjsxdev_with_custom_import_source/deno.json new file mode 100644 index 0000000..f6ca845 --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_reactjsxdev_with_custom_import_source/deno.json @@ -0,0 +1,3 @@ +{ + "imports": {} +} diff --git a/tests/__snapshots__/jsx/jsx_type_reactjsxdev_with_custom_import_source/local/jsx/main.tsx b/tests/__snapshots__/jsx/jsx_type_reactjsxdev_with_custom_import_source/local/jsx/main.tsx new file mode 100644 index 0000000..d876ab4 --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_reactjsxdev_with_custom_import_source/local/jsx/main.tsx @@ -0,0 +1,8 @@ +import { jsxDEV as _jsxDEV } from "example/jsx-dev-runtime"; +const helloWorld = /*#__PURE__*/ _jsxDEV("div", { + id: "helloWorld" +}, void 0, false, { + fileName: "file:///Users/benedikt/PROJECTS/unyt/deno_emit/testdata/jsx/main.tsx", + lineNumber: 1, + columnNumber: 20 +}, this); diff --git a/tests/__snapshots__/jsx/jsx_type_reactjsxdev_with_custom_import_source/modules.json b/tests/__snapshots__/jsx/jsx_type_reactjsxdev_with_custom_import_source/modules.json new file mode 100644 index 0000000..f7b4a69 --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_reactjsxdev_with_custom_import_source/modules.json @@ -0,0 +1,3 @@ +{ + "file:///jsx/main.tsx": "local/jsx/main.tsx" +} diff --git a/tests/__snapshots__/jsx/jsx_type_reactnative/bundle.js b/tests/__snapshots__/jsx/jsx_type_reactnative/bundle.js new file mode 100644 index 0000000..acc19f5 --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_reactnative/bundle.js @@ -0,0 +1 @@ +
; diff --git a/tests/__snapshots__/jsx/jsx_type_reactnative/transpile/deno.json b/tests/__snapshots__/jsx/jsx_type_reactnative/transpile/deno.json new file mode 100644 index 0000000..f6ca845 --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_reactnative/transpile/deno.json @@ -0,0 +1,3 @@ +{ + "imports": {} +} diff --git a/tests/__snapshots__/jsx/jsx_type_reactnative/transpile/local/jsx/main.tsx b/tests/__snapshots__/jsx/jsx_type_reactnative/transpile/local/jsx/main.tsx new file mode 100644 index 0000000..5c970c5 --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_reactnative/transpile/local/jsx/main.tsx @@ -0,0 +1 @@ +const helloWorld =
; diff --git a/tests/__snapshots__/jsx/jsx_type_reactnative/transpile/modules.json b/tests/__snapshots__/jsx/jsx_type_reactnative/transpile/modules.json new file mode 100644 index 0000000..f7b4a69 --- /dev/null +++ b/tests/__snapshots__/jsx/jsx_type_reactnative/transpile/modules.json @@ -0,0 +1,3 @@ +{ + "file:///jsx/main.tsx": "local/jsx/main.tsx" +} diff --git a/tests/jsx_test.ts b/tests/jsx_test.ts new file mode 100644 index 0000000..78fdc43 --- /dev/null +++ b/tests/jsx_test.ts @@ -0,0 +1,98 @@ +import { + resolveFixture, + testTranspile, + testTranspileAndBundle, +} from "./utils.ts"; + +Deno.test({ + name: "jsx default", + fn: testTranspileAndBundle( + resolveFixture("jsx/main.tsx"), + ), +}); + +Deno.test({ + name: "jsx type react", + fn: testTranspileAndBundle( + resolveFixture("jsx/main.tsx"), + { + compilerOptions: { + jsx: "react", + }, + }, + ), +}); + +Deno.test({ + name: "jsx type react-native", + fn: testTranspileAndBundle( + resolveFixture("jsx/main.tsx"), + { + compilerOptions: { + jsx: "react-native", + }, + }, + ), +}); + +Deno.test({ + name: "jsx type preserve", + fn: testTranspileAndBundle( + resolveFixture("jsx/main.tsx"), + { + compilerOptions: { + jsx: "preserve", + }, + }, + ), +}); + +Deno.test({ + name: "jsx type react-jsx", + fn: testTranspile( + resolveFixture("jsx/main.tsx"), + { + compilerOptions: { + jsx: "react-jsx", + }, + }, + ), +}); + +Deno.test({ + name: "jsx type react-jsx with custom import source", + fn: testTranspile( + resolveFixture("jsx/main.tsx"), + { + compilerOptions: { + jsx: "react-jsx", + jsxImportSource: "example", + }, + }, + ), +}); + +Deno.test({ + name: "jsx type react-jsxdev", + fn: testTranspile( + resolveFixture("jsx/main.tsx"), + { + compilerOptions: { + jsx: "react-jsxdev", + }, + }, + ), +}); + +Deno.test({ + name: "jsx type react-jsxdev with custom import source", + fn: testTranspile( + resolveFixture("jsx/main.tsx"), + { + compilerOptions: { + jsx: "react-jsxdev", + jsxImportSource: "example", + }, + }, + ), +}); diff --git a/wasm/src/lib.rs b/wasm/src/lib.rs index 7b43765..9cea135 100644 --- a/wasm/src/lib.rs +++ b/wasm/src/lib.rs @@ -29,6 +29,7 @@ pub struct CompilerOptions { pub jsx: String, pub jsx_factory: String, pub jsx_fragment_factory: String, + pub jsx_import_source: Option, pub source_map: bool, } @@ -43,6 +44,7 @@ impl Default for CompilerOptions { jsx: "react".to_string(), jsx_factory: "React.createElement".to_string(), jsx_fragment_factory: "React.Fragment".to_string(), + jsx_import_source: None, source_map: false, } } @@ -64,12 +66,13 @@ impl From for EmitOptions { inline_sources: options.inline_sources, jsx_factory: options.jsx_factory, jsx_fragment_factory: options.jsx_fragment_factory, - transform_jsx: options.jsx == "react", + transform_jsx: options.jsx == "react" || options.jsx == "react-jsx" || options.jsx == "react-jsxdev", var_decl_imports: false, source_map: options.source_map, - jsx_automatic: false, - jsx_development: false, - jsx_import_source: None, + jsx_automatic: options.jsx == "react-jsx" || options.jsx == "react-jsxdev", + jsx_development: options.jsx == "react-jsxdev", + jsx_import_source: options.jsx_import_source, + precompile_jsx: false } } }