From f0222b41034d8ebf4b017e0dde5ab46d08394c9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 2 Jul 2024 19:30:53 +0900 Subject: [PATCH 01/16] Update swc_core --- Cargo.toml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index aa5860e49f1f4..158f7fd1f36c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -108,18 +108,18 @@ strip = true [workspace.dependencies] async-recursion = "1.0.2" # Keep consistent with preset_env_base through swc_core -browserslist-rs = { version = "0.15.0" } +browserslist-rs = { version = "0.16.0" } miette = { version = "5.10.0", features = ["fancy"] } mdxjs = "0.2.4" -modularize_imports = { version = "0.68.16" } -styled_components = { version = "0.96.17" } -styled_jsx = { version = "0.73.24" } -swc_core = { version = "0.95.4", features = [ +modularize_imports = { version = "0.68.7" } +styled_components = { version = "0.96.6" } +styled_jsx = { version = "0.73.10" } +swc_core = { version = "0.96.0", features = [ "ecma_loader_lru", "ecma_loader_parking_lot", ] } -swc_emotion = { version = "0.72.15" } -swc_relay = { version = "0.44.16" } +swc_emotion = { version = "0.72.6" } +swc_relay = { version = "0.44.5" } testing = { version = "0.36.0" } # Temporary: Reference the latest git minor version of pathfinder_simd until it's published. pathfinder_simd = "0.5.3" From b61c418c9c85d086c6a765dc1270b8b0863ce25c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 2 Jul 2024 19:34:53 +0900 Subject: [PATCH 02/16] Update mdxjs --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 158f7fd1f36c9..6ef801ec98316 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -110,7 +110,7 @@ async-recursion = "1.0.2" # Keep consistent with preset_env_base through swc_core browserslist-rs = { version = "0.16.0" } miette = { version = "5.10.0", features = ["fancy"] } -mdxjs = "0.2.4" +mdxjs = "0.2.5" modularize_imports = { version = "0.68.7" } styled_components = { version = "0.96.6" } styled_jsx = { version = "0.73.10" } From e38bfec305da982a7426118f794d11f1eed0d329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 2 Jul 2024 20:20:59 +0900 Subject: [PATCH 03/16] Update chrono --- Cargo.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dff4502909952..e8190f1943d76 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1355,9 +1355,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", @@ -1365,7 +1365,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.48.1", + "windows-targets 0.52.5", ] [[package]] From a54550555704b9db9465af2960b0993e1ae22cb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Tue, 2 Jul 2024 20:44:55 +0900 Subject: [PATCH 04/16] Fix for browserslists --- crates/turbopack-core/src/environment.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/turbopack-core/src/environment.rs b/crates/turbopack-core/src/environment.rs index b858816e02b4f..f75350592bd1e 100644 --- a/crates/turbopack-core/src/environment.rs +++ b/crates/turbopack-core/src/environment.rs @@ -86,7 +86,7 @@ impl Environment { ExecutionEnvironment::Browser(browser_env) => { Vc::cell(Versions::parse_versions(browserslist::resolve( browser_env.await?.browserslist_query.split(','), - &browserslist::Opts::new(), + &browserslist::Opts::default(), )?)?) } ExecutionEnvironment::EdgeWorker(_) => todo!(), From f6044d078f91b0b54f947f8e025e7f2a1b23cb50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Wed, 3 Jul 2024 12:03:56 +0900 Subject: [PATCH 05/16] Update test refs --- .../output/crates_turbopack-tests_tests_snapshot_b36339._.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/turbopack-tests/tests/snapshot/emotion/emotion/output/crates_turbopack-tests_tests_snapshot_b36339._.js b/crates/turbopack-tests/tests/snapshot/emotion/emotion/output/crates_turbopack-tests_tests_snapshot_b36339._.js index 7e35bb31cc053..22bb0e475b339 100644 --- a/crates/turbopack-tests/tests/snapshot/emotion/emotion/output/crates_turbopack-tests_tests_snapshot_b36339._.js +++ b/crates/turbopack-tests/tests/snapshot/emotion/emotion/output/crates_turbopack-tests_tests_snapshot_b36339._.js @@ -12,7 +12,7 @@ var __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests ; ; const StyledButton = /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$node_modules$2f40$emotion$2f$styled$2f$index$2e$js__$5b$test$5d$__$28$ecmascript$29$__["default"])("button", { - target: "ekn3dmj0" + target: "e9t88h50" })("background:blue;"); function ClassNameButton({ children }) { return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$crates$2f$turbopack$2d$tests$2f$tests$2f$snapshot$2f$node_modules$2f40$emotion$2f$react$2f$jsx$2d$dev$2d$runtime$2e$js__$5b$test$5d$__$28$ecmascript$29$__["jsxDEV"])("button", { From 4202b3d07d2562993bc3cb3359b0cd67b302fc43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Wed, 3 Jul 2024 12:04:27 +0900 Subject: [PATCH 06/16] lint --- crates/turbopack-ecmascript/src/parse.rs | 8 ++++---- crates/turbopack-swc-ast-explorer/src/main.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/turbopack-ecmascript/src/parse.rs b/crates/turbopack-ecmascript/src/parse.rs index 604b65aa82163..689f79799b3fe 100644 --- a/crates/turbopack-ecmascript/src/parse.rs +++ b/crates/turbopack-ecmascript/src/parse.rs @@ -12,7 +12,7 @@ use swc_core::{ ecma::{ ast::{EsVersion, Program}, lints::{config::LintConfig, rules::LintParams}, - parser::{lexer::Lexer, EsConfig, Parser, Syntax, TsConfig}, + parser::{lexer::Lexer, EsSyntax, Parser, Syntax, TsSyntax}, transforms::base::{ helpers::{Helpers, HELPERS}, resolver, @@ -285,7 +285,7 @@ async fn parse_content( let mut parsed_program = { let lexer = Lexer::new( match ty { - EcmascriptModuleAssetType::Ecmascript => Syntax::Es(EsConfig { + EcmascriptModuleAssetType::Ecmascript => Syntax::Es(EsSyntax { jsx: true, fn_bind: true, decorators: true, @@ -298,7 +298,7 @@ async fn parse_content( explicit_resource_management: true, }), EcmascriptModuleAssetType::Typescript { tsx, .. } => { - Syntax::Typescript(TsConfig { + Syntax::Typescript(TsSyntax { decorators: true, dts: false, no_early_errors: true, @@ -307,7 +307,7 @@ async fn parse_content( }) } EcmascriptModuleAssetType::TypescriptDeclaration => { - Syntax::Typescript(TsConfig { + Syntax::Typescript(TsSyntax { decorators: true, dts: true, no_early_errors: true, diff --git a/crates/turbopack-swc-ast-explorer/src/main.rs b/crates/turbopack-swc-ast-explorer/src/main.rs index 626ef085fc071..bb8809614afe2 100644 --- a/crates/turbopack-swc-ast-explorer/src/main.rs +++ b/crates/turbopack-swc-ast-explorer/src/main.rs @@ -9,7 +9,7 @@ use swc_core::{ common::{errors::ColorConfig, source_map::FileName, Globals, SourceMap, GLOBALS}, ecma::{ ast::EsVersion, - parser::{Syntax, TsConfig}, + parser::{Syntax, TsSyntax}, }, }; @@ -30,7 +30,7 @@ fn main() -> Result<()> { let sm = Arc::new(SourceMap::default()); let file = sm.new_source_file(FileName::Anon, contents); let target = EsVersion::latest(); - let syntax = Syntax::Typescript(TsConfig { + let syntax = Syntax::Typescript(TsSyntax { tsx: true, decorators: false, dts: false, From 09e04a25d25004c65ea9de74be9c5391588369cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Wed, 3 Jul 2024 13:37:50 +0900 Subject: [PATCH 07/16] cargo lockfile --- Cargo.lock | 222 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 135 insertions(+), 87 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e8190f1943d76..9b460f0a0f86b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -715,9 +715,9 @@ dependencies = [ [[package]] name = "binding_macros" -version = "0.69.0" +version = "0.70.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e1686de576561c3dfd417fe1de23f60b855f8a1a2ea0f68a0f461e2f2e53e0" +checksum = "e777679fa2aa9a07faccbf118ab98152013f6538cdaf1282392a82d8e0c7dc3c" dependencies = [ "anyhow", "console_error_panic_hook", @@ -1040,6 +1040,24 @@ dependencies = [ "thiserror", ] +[[package]] +name = "browserslist-rs" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdf0ca73de70c3da94e4194e4a01fe732378f55d47cf4c0588caab22a0dbfa14" +dependencies = [ + "ahash 0.8.9", + "chrono", + "either", + "indexmap 2.2.6", + "itertools 0.13.0", + "nom", + "once_cell", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "bstr" version = "0.2.17" @@ -2558,9 +2576,9 @@ checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" [[package]] name = "either" -version = "1.10.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "embedded-io" @@ -3915,6 +3933,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.9" @@ -4429,9 +4456,9 @@ dependencies = [ [[package]] name = "markdown" -version = "1.0.0-alpha.17" +version = "1.0.0-alpha.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e27d6220ce21f80ce5c4201f23a37c6f1ad037c72c9d1ff215c2919605a5d6" +checksum = "4e61c5c85b392273c4d4ea546e6399ace3e3db172ab01b6de8f3d398d1dbd2ec" dependencies = [ "unicode-id", ] @@ -4484,9 +4511,9 @@ dependencies = [ [[package]] name = "mdxjs" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce40dd4643deb0adb6ab3eda8374bd23da81a87e982ff9493e07bf9356f3248f" +checksum = "6996bd9591dc92f29740adca2e1290fa17919dab0b0337918ee05f257cff284e" dependencies = [ "markdown", "serde", @@ -4830,9 +4857,9 @@ checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] name = "new_debug_unreachable" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] name = "newline-converter" @@ -5828,7 +5855,25 @@ checksum = "08ccd15679953ae0d5fa716af78b58c0bfdc69a0534bfe9ea423abd1eaaf527b" dependencies = [ "ahash 0.8.9", "anyhow", - "browserslist-rs", + "browserslist-rs 0.15.0", + "dashmap", + "from_variant", + "once_cell", + "semver 1.0.23", + "serde", + "st-map", + "tracing", +] + +[[package]] +name = "preset_env_base" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ecfcd4aefde8c1ed1ac4f1118ca5021763a717ba87f5508db7785e864dac1d8" +dependencies = [ + "ahash 0.8.9", + "anyhow", + "browserslist-rs 0.16.0", "dashmap", "from_variant", "once_cell", @@ -7117,22 +7162,11 @@ dependencies = [ "serial-core", ] -[[package]] -name = "sha-1" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", @@ -7622,7 +7656,7 @@ dependencies = [ "anyhow", "lightningcss", "parcel_selectors", - "preset_env_base", + "preset_env_base 0.4.13", "serde", "swc_common", "swc_css_ast", @@ -7718,9 +7752,9 @@ dependencies = [ [[package]] name = "swc" -version = "0.278.0" +version = "0.279.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fd1744254f522db85caadd3e30abc485432f7b0cf498040c855f1d6230df0df" +checksum = "267d1595c1992901ff8d9b0b299b000c38c1f4bcc117c7a60652acaaac77e356" dependencies = [ "anyhow", "base64 0.21.4", @@ -7764,6 +7798,7 @@ dependencies = [ "swc_plugin_runner", "swc_timer", "swc_transform_common", + "swc_typescript", "swc_visit", "tokio", "tracing", @@ -7797,9 +7832,9 @@ dependencies = [ [[package]] name = "swc_bundler" -version = "0.230.0" +version = "0.230.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd503e72a3511f3cd7b553eb9635e42dc6d45ff622aa13e0773c8b2d6473346" +checksum = "9c506ddddebb846f8e68780464e2fe1fdc0add4bc265659f713a71015ffcdb13" dependencies = [ "anyhow", "crc", @@ -7876,9 +7911,9 @@ dependencies = [ [[package]] name = "swc_compiler_base" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "970284db7590bd2fa8cbb3ff08efc970ad3233b6b06c43b64ff5fea88743cc3f" +checksum = "e37fcb78ee79d792ba97b63f58869b9995b7248b46676503e0d0328d19dba2c5" dependencies = [ "anyhow", "base64 0.21.4", @@ -7930,9 +7965,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.95.4" +version = "0.96.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c87d2488f08d269b91a516b0b726e11569a9713ee148c3015571b415e1c430" +checksum = "6e6580d304e9780be6027527eb3a7108731948cf1f29d598685be10bc8f05209" dependencies = [ "binding_macros", "swc", @@ -8079,7 +8114,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90be51bf58aaff6d4682ada46bd44506d53b8aec8d1b0cebdc5bfe05b163f853" dependencies = [ "once_cell", - "preset_env_base", + "preset_env_base 0.4.13", "serde", "serde_json", "swc_atoms", @@ -8139,9 +8174,9 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.151.0" +version = "0.151.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6602bcf4fd78b2ef0c7b2abcdbd3e35dfa564a6bcfb0f256e86b41ff3299d7" +checksum = "f5141a8cb4eb69e090e6aea5d49061b46919be5210f3d084f9d9ad63d30f5cff" dependencies = [ "memchr", "num-bigint", @@ -8170,9 +8205,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_bugfixes" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f8e8697555cf32b8dd18c62637ce804c8c96343a6752d622e12e84fd0cea336" +checksum = "04182e17ec1343e355c4150b51226627d0160b8c0fb612bfcf3faa3d030a3866" dependencies = [ "swc_atoms", "swc_common", @@ -8200,9 +8235,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2015" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0514f6652e4bdb327df10c7a577346fa1f2bea5a416360f12763e4bb15d1794" +checksum = "d23a9a192078d1d074113d77d8ad811f2a81a4447ae967739824da5d391616bf" dependencies = [ "arrayvec 0.7.4", "indexmap 2.2.6", @@ -8226,9 +8261,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2016" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4a58e0626e1d6f156b6c30a596fcaddf99d7fd2826fed118ee848a6b8339d32" +checksum = "a166a024e6415bb6e6e326ed6ebe2fadcea093408f0de3cf1308b4f971c171b0" dependencies = [ "swc_atoms", "swc_common", @@ -8243,9 +8278,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2017" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e11928d0da6babf2632d9b1580bb5f476f251c3c5a5ce9ceb9f650e4ee5b38fe" +checksum = "65f84891ddbc61b105222e64f7f33cf8a27d4020cbae2e7381899eacb69c540a" dependencies = [ "serde", "swc_atoms", @@ -8261,9 +8296,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2018" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaee1dbdf5d65fe8149c51298c2065bf94e4b32b922c487deeda3f9033e246d6" +checksum = "fe11cda413787f46bef9a66752933fb8f6f2e509cb938758ad67d27710619ee6" dependencies = [ "serde", "swc_atoms", @@ -8280,9 +8315,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2019" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2243e1b427495d787fc06966b60ba61e194bcd46646c7ee95a0481674a44f353" +checksum = "ce2888fa110ff41e36bd824fa8636f876f812e64c8b12d721df90a133c28ee86" dependencies = [ "swc_atoms", "swc_common", @@ -8296,9 +8331,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es2020" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e791d25641ba974d01a1f6f8795244ccb7cb16e916f91b51d72609db6cd94cf3" +checksum = "3baf93ce04ee5a888e41265280dcb12d4e6a7bcf907ef2526b69d2aed9187607" dependencies = [ "serde", "swc_atoms", @@ -8349,9 +8384,9 @@ dependencies = [ [[package]] name = "swc_ecma_compat_es3" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de9acee5e6867cb91460a48a2cc0900db01fdd90112cdd4c74defc7dcd4577" +checksum = "d2d6a9792a2f534232b98a1564e3982d9135d86f6948a55e8f944ab3b960e602" dependencies = [ "swc_common", "swc_ecma_ast", @@ -8378,9 +8413,9 @@ dependencies = [ [[package]] name = "swc_ecma_lints" -version = "0.95.0" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "221b7fc65afd0104e856960a301b1be861cad04a3b144ecb2dd209874c905a37" +checksum = "b58d31115dae5a96bf15fcae9958711b14e9cf9944d045c91796d039d2879dbc" dependencies = [ "auto_impl", "dashmap", @@ -8420,9 +8455,9 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.197.0" +version = "0.197.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d74a46ad5fa5c070d65454d6d20a833948a099082cc8bcf620c2a669eba3b43" +checksum = "9f9852fc8849b5e0d442bd59b6054f908d03b1af4229a9adcf6aae9db2d366b7" dependencies = [ "arrayvec 0.7.4", "indexmap 2.2.6", @@ -8430,6 +8465,7 @@ dependencies = [ "num_cpus", "once_cell", "parking_lot", + "phf 0.11.2", "radix_fmt", "rayon", "regex", @@ -8454,9 +8490,9 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.146.2" +version = "0.146.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8953dcf07d90ad14d82c79ef48a2e0c510a043c7e6af3aed4ef59277044ba854" +checksum = "5cb0661386d67b828093fe7e87381c0808298595ba38cd00101973e70ab66dd6" dependencies = [ "either", "new_debug_unreachable", @@ -8476,15 +8512,15 @@ dependencies = [ [[package]] name = "swc_ecma_preset_env" -version = "0.209.0" +version = "0.210.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9a4cc2b1deb679c15be85f77d0f4bca75404c5964c786761a056e1a4cfe828" +checksum = "9cd4847a3356a01bb9a73ccdd1c462dfdaed66d27d7ea6d6785ee1b54c9556ce" dependencies = [ "anyhow", "dashmap", "indexmap 2.2.6", "once_cell", - "preset_env_base", + "preset_env_base 0.5.0", "rustc-hash", "semver 1.0.23", "serde", @@ -8501,9 +8537,9 @@ dependencies = [ [[package]] name = "swc_ecma_quote_macros" -version = "0.57.0" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79eedaab1225550fac9c364c9b07ce329fc4d67c2b4896d1c054aca0976f8f5f" +checksum = "9537bc1a7daca42be1922137f4e59458bd72dd330cf9c96877e191e632bc2a8a" dependencies = [ "anyhow", "proc-macro2", @@ -8531,9 +8567,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms" -version = "0.232.0" +version = "0.232.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e8e66bc10715c10219239772abd2f6be99eda573e69e5abb8646b1f3fce83dc" +checksum = "6845e7a7001aa2793225568e0661b55f57352a2103fa28934dd9cbc0d41cd933" dependencies = [ "swc_atoms", "swc_common", @@ -8551,9 +8587,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" -version = "0.140.0" +version = "0.140.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daee7af0abfccc9855656fc36ac472e1e6a61398a3a1a1b3bf05ef7a7e7af6b0" +checksum = "4341c6272c4feaaf22cc8104f65ebcadac8ad2098dfacb6eb62e8c053698a40d" dependencies = [ "better_scoped_tls", "bitflags 2.5.0", @@ -8589,9 +8625,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_compat" -version = "0.166.0" +version = "0.166.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e03c5afd68b80591a3871ac3692f3adaf281c0c3c686db51a73ed91270d6f4c" +checksum = "626198f214d4c09adc98ab14565c19d72b6df9630f7e806ef9b2ef05a5fd17a5" dependencies = [ "arrayvec 0.7.4", "indexmap 2.2.6", @@ -8638,9 +8674,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_module" -version = "0.183.0" +version = "0.183.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f814b5dacf9b37d3e2df900cef6f00471e78ad73dc595b427ca34fb74543e1d" +checksum = "d7dc1df5996d98d1a27995e8b8a13f805a801d9286cb9ed29103662c767c747e" dependencies = [ "Inflector", "anyhow", @@ -8665,9 +8701,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_optimization" -version = "0.201.0" +version = "0.201.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58577833f2a748ce4f8d934b59e528cc2391c43dc716040b15952ce7a1afae6" +checksum = "724a8306e98c1b1f9640fc44c1acc0c971f6daa17651919e06b64f905d4a4564" dependencies = [ "dashmap", "indexmap 2.2.6", @@ -8690,9 +8726,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_proposal" -version = "0.174.1" +version = "0.174.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db0e71b7a87c4fcddec835e6717854849ab8bba9c9f6332858f6c8b66c1ad9f" +checksum = "779a6d7db3524ab63f44ebc7944c96fd2b845475fef1411d1b211719f93980bf" dependencies = [ "either", "rustc-hash", @@ -8710,9 +8746,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_react" -version = "0.186.0" +version = "0.186.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5209735a7136c17c08dc6af3031e73157cc5a59c1f176f0e160d799aaece227" +checksum = "446da32cac8299973aaf1d37496562bfd0c1e4f3c3ab5d0af6f07f42e8184102" dependencies = [ "base64 0.21.4", "dashmap", @@ -8720,7 +8756,7 @@ dependencies = [ "once_cell", "rayon", "serde", - "sha-1", + "sha1", "string_enum", "swc_atoms", "swc_common", @@ -8735,9 +8771,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_testing" -version = "0.143.0" +version = "0.143.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2622a94000bb4e04548afe0540150f616c58296d5485c0653d1fae69c23efd98" +checksum = "774e9741d3377635e9b48b8f118722d758f42e51743789c0852f4b1524b7c428" dependencies = [ "ansi_term", "anyhow", @@ -8761,9 +8797,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.191.0" +version = "0.191.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd0ed356e5e19a7111ac24773439141bd3941eb420a51bfbce762757fc7adc2" +checksum = "a6a27f93ecb3e04591302628407878fca336a676829309d53bb3f7cd1b708cd7" dependencies = [ "ryu-js", "serde", @@ -8795,9 +8831,9 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.130.0" +version = "0.130.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "831490c6d4a52f06932fa2c3d87fc0d0aa43211a5df6b5e05a1ec2c57a2f2519" +checksum = "612fea1ef92ca438eebdd60c7969e6ee6191eb2e4306018584b9e82390c5e093" dependencies = [ "indexmap 2.2.6", "num_cpus", @@ -8974,9 +9010,9 @@ dependencies = [ [[package]] name = "swc_plugin_runner" -version = "0.109.0" +version = "0.109.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d36d7e035c81f623b6fc58755025defc719ef25aea0607214102c1f1616ab41" +checksum = "633742a4ee0d51337b7b29771e94f93badd6944919eaff0515c4a14e7993fc4d" dependencies = [ "anyhow", "enumset", @@ -9048,6 +9084,18 @@ dependencies = [ "serde_json", ] +[[package]] +name = "swc_typescript" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbe6ad7122e2d9070da178c0c752b529a3ad9b9e1c931fce0aed8233eacad9e3" +dependencies = [ + "swc_atoms", + "swc_common", + "swc_ecma_ast", + "thiserror", +] + [[package]] name = "swc_visit" version = "0.5.14" @@ -10559,7 +10607,7 @@ dependencies = [ "async-recursion", "async-trait", "auto-hash-map", - "browserslist-rs", + "browserslist-rs 0.16.0", "futures", "indexmap 1.9.3", "lazy_static", From fcb66e5f7b848cf7fd373dfce9a6746f000e1d1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Wed, 3 Jul 2024 13:40:24 +0900 Subject: [PATCH 08/16] Update styled-jsx --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 6ef801ec98316..e8fcdb7bacec9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -113,7 +113,7 @@ miette = { version = "5.10.0", features = ["fancy"] } mdxjs = "0.2.5" modularize_imports = { version = "0.68.7" } styled_components = { version = "0.96.6" } -styled_jsx = { version = "0.73.10" } +styled_jsx = { version = "0.73.26" } swc_core = { version = "0.96.0", features = [ "ecma_loader_lru", "ecma_loader_parking_lot", From 49f77050266e3498581062aeab70a19b9dc609e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Wed, 3 Jul 2024 13:40:32 +0900 Subject: [PATCH 09/16] cargo lockfile --- Cargo.lock | 88 +++++++----------------------------------------------- 1 file changed, 11 insertions(+), 77 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9b460f0a0f86b..793ec72df8c4c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1018,28 +1018,6 @@ dependencies = [ "syn 2.0.58", ] -[[package]] -name = "browserslist-rs" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "405bbd46590a441abe5db3e5c8af005aa42e640803fecb51912703e93e4ce8d3" -dependencies = [ - "ahash 0.8.9", - "anyhow", - "chrono", - "either", - "indexmap 2.2.6", - "itertools 0.12.0", - "nom", - "once_cell", - "quote", - "serde", - "serde_json", - "string_cache", - "string_cache_codegen", - "thiserror", -] - [[package]] name = "browserslist-rs" version = "0.16.0" @@ -5847,24 +5825,6 @@ dependencies = [ "termtree", ] -[[package]] -name = "preset_env_base" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08ccd15679953ae0d5fa716af78b58c0bfdc69a0534bfe9ea423abd1eaaf527b" -dependencies = [ - "ahash 0.8.9", - "anyhow", - "browserslist-rs 0.15.0", - "dashmap", - "from_variant", - "once_cell", - "semver 1.0.23", - "serde", - "st-map", - "tracing", -] - [[package]] name = "preset_env_base" version = "0.5.0" @@ -5873,7 +5833,7 @@ checksum = "1ecfcd4aefde8c1ed1ac4f1118ca5021763a717ba87f5508db7785e864dac1d8" dependencies = [ "ahash 0.8.9", "anyhow", - "browserslist-rs 0.16.0", + "browserslist-rs", "dashmap", "from_variant", "once_cell", @@ -7528,32 +7488,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9557cb6521e8d009c51a8666f09356f4b817ba9ba0981a305bd86aee47bd35c" -[[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", - "phf_shared 0.10.0", - "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 0.10.0", - "phf_shared 0.10.0", - "proc-macro2", - "quote", -] - [[package]] name = "string_enum" version = "0.4.4" @@ -7649,14 +7583,14 @@ dependencies = [ [[package]] name = "styled_jsx" -version = "0.73.24" +version = "0.73.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bce718faf2b675889e7d7b00b108348bb6006eed72dbf4ca4134b130f61a3bb6" +checksum = "e9518da8ffdf78718b9545ddbf8237a901957b465603b98e1ffcc46006365ade" dependencies = [ "anyhow", "lightningcss", "parcel_selectors", - "preset_env_base 0.4.13", + "preset_env_base", "serde", "swc_common", "swc_css_ast", @@ -7878,9 +7812,9 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.34.2" +version = "0.34.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add6efe3f1a2fe9108b27fb6ba94998ab5bfd8696d590033003987c82452b8f9" +checksum = "2b0d7bcbd9faf61cec1a552cbdaec57faefbb10be7cc5f959613c6f91b5a9254" dependencies = [ "ahash 0.8.9", "anyhow", @@ -8109,12 +8043,12 @@ dependencies = [ [[package]] name = "swc_css_prefixer" -version = "0.154.0" +version = "0.155.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90be51bf58aaff6d4682ada46bd44506d53b8aec8d1b0cebdc5bfe05b163f853" +checksum = "cc9930655060121c32d829e13fe4fa11294c03e71eb84c22e039703c929dcdf7" dependencies = [ "once_cell", - "preset_env_base 0.4.13", + "preset_env_base", "serde", "serde_json", "swc_atoms", @@ -8520,7 +8454,7 @@ dependencies = [ "dashmap", "indexmap 2.2.6", "once_cell", - "preset_env_base 0.5.0", + "preset_env_base", "rustc-hash", "semver 1.0.23", "serde", @@ -10607,7 +10541,7 @@ dependencies = [ "async-recursion", "async-trait", "auto-hash-map", - "browserslist-rs 0.16.0", + "browserslist-rs", "futures", "indexmap 1.9.3", "lazy_static", From f525a06cc86437d86a723594bd641c029289a6a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Wed, 3 Jul 2024 13:45:32 +0900 Subject: [PATCH 10/16] Update crates --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e8fcdb7bacec9..cdba1e050e25e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -113,8 +113,8 @@ miette = { version = "5.10.0", features = ["fancy"] } mdxjs = "0.2.5" modularize_imports = { version = "0.68.7" } styled_components = { version = "0.96.6" } -styled_jsx = { version = "0.73.26" } -swc_core = { version = "0.96.0", features = [ +styled_jsx = { version = "0.73.10" } +swc_core = { version = "0.96.1", features = [ "ecma_loader_lru", "ecma_loader_parking_lot", ] } From c6a7f4446dacd7effed5566278b51c1e41764c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Wed, 3 Jul 2024 13:45:37 +0900 Subject: [PATCH 11/16] cargo lockfile --- Cargo.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 793ec72df8c4c..1af697d0fc8c9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4706,9 +4706,9 @@ dependencies = [ [[package]] name = "modularize_imports" -version = "0.68.16" +version = "0.68.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d691538a2cc5dfe1ebc8a26d8cf381d904929d8b699613aef6ad848090dcfd0e" +checksum = "8831538b7fde064ae1e450f5821e6cc621b9deae6e86120c1b4b65d8221bceb4" dependencies = [ "convert_case 0.6.0", "handlebars", @@ -7565,9 +7565,9 @@ dependencies = [ [[package]] name = "styled_components" -version = "0.96.17" +version = "0.96.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10db3c4936218e6eb938962069d935aaf1bec7d7901e767329e4b646d1f9a63b" +checksum = "dd42d48e5ec761a8cea4562a336a74f8606fca5c50ec03cbc1650c3931d19d51" dependencies = [ "Inflector", "once_cell", @@ -8800,9 +8800,9 @@ dependencies = [ [[package]] name = "swc_emotion" -version = "0.72.15" +version = "0.72.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "987726fc4d2f08751b00d691cc56e21a90489810504181da00defe236fd7f262" +checksum = "5c77a41e3908561af55baec3d0a7911270822a17f173bab8fb2d3e30ed241128" dependencies = [ "base64 0.22.1", "byteorder", @@ -8969,9 +8969,9 @@ dependencies = [ [[package]] name = "swc_relay" -version = "0.44.16" +version = "0.44.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53f264a2f199c875993ec5cf5444bf9f74ec6a43d5b1fbf1d3eb0fda718d9cac" +checksum = "35d0b3ed1b7dcb73c4e70bc7d64f661af792cbe483f0aef8dd007187e266c144" dependencies = [ "once_cell", "regex", @@ -11546,7 +11546,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", - "rand 0.8.5", + "rand 0.4.6", "static_assertions", ] From fc7f9729b60810cdf7176cdd23c4d5bff08f1ebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Thu, 4 Jul 2024 11:11:11 +0900 Subject: [PATCH 12/16] collect2.exe error --- .cargo/config.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.cargo/config.toml b/.cargo/config.toml index 6ff8f1c41f2cd..76b9ecba1f6ec 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -15,6 +15,9 @@ rustdocflags = ["-Znormalize-docs"] [target.x86_64-pc-windows-msvc] linker = "rust-lld" +[target.x86_64-pc-windows-gnu] +linker = "rust-lld" + [target.aarch64-pc-windows-msvc] linker = "rust-lld" From 078a0e4ee38324a90c34b690b4f63cd541b2c7a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Thu, 4 Jul 2024 12:47:41 +0900 Subject: [PATCH 13/16] Revert --- .cargo/config.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 76b9ecba1f6ec..6ff8f1c41f2cd 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -15,9 +15,6 @@ rustdocflags = ["-Znormalize-docs"] [target.x86_64-pc-windows-msvc] linker = "rust-lld" -[target.x86_64-pc-windows-gnu] -linker = "rust-lld" - [target.aarch64-pc-windows-msvc] linker = "rust-lld" From d5c994639dbae4a248e52b7a6b16c10408734be4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Sat, 6 Jul 2024 08:17:59 +0900 Subject: [PATCH 14/16] Update crates --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index cdba1e050e25e..a17618e31cdaf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -114,7 +114,7 @@ mdxjs = "0.2.5" modularize_imports = { version = "0.68.7" } styled_components = { version = "0.96.6" } styled_jsx = { version = "0.73.10" } -swc_core = { version = "0.96.1", features = [ +swc_core = { version = "0.96.5", features = [ "ecma_loader_lru", "ecma_loader_parking_lot", ] } From db3383e6ed736597a6ed311142812b03ef778416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Sat, 6 Jul 2024 08:18:17 +0900 Subject: [PATCH 15/16] cargo lockfile --- Cargo.lock | 179 +++++++++++++++++++++++------------------------------ 1 file changed, 78 insertions(+), 101 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1af697d0fc8c9..942328bfc24bf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -156,12 +156,12 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -1067,7 +1067,7 @@ dependencies = [ "derive_more", "pipe-trait", "serde", - "serde_yaml 0.9.27", + "serde_yaml 0.9.29", "text-block-macros", ] @@ -3497,7 +3497,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.4", + "socket2 0.5.6", "tokio", "tower-service", "tracing", @@ -4570,18 +4570,19 @@ dependencies = [ [[package]] name = "miette" -version = "4.7.1" +version = "5.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c90329e44f9208b55f45711f9558cec15d7ef8295cc65ecd6d4188ae8edc58c" +checksum = "59bb584eaeeab6bd0226ccf3509a69d7936d148cf3d036ad350abe35e8c6856e" dependencies = [ - "atty", "backtrace", - "miette-derive 4.7.1", + "backtrace-ext", + "is-terminal", + "miette-derive 5.10.0", "once_cell", - "owo-colors", - "supports-color 1.3.1", - "supports-hyperlinks 1.2.0", - "supports-unicode 1.0.2", + "owo-colors 3.5.0", + "supports-color", + "supports-hyperlinks", + "supports-unicode", "terminal_size 0.1.17", "textwrap 0.15.2", "thiserror", @@ -4590,41 +4591,34 @@ dependencies = [ [[package]] name = "miette" -version = "5.10.0" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59bb584eaeeab6bd0226ccf3509a69d7936d148cf3d036ad350abe35e8c6856e" +checksum = "4edc8853320c2a0dab800fbda86253c8938f6ea88510dc92c5f1ed20e794afc1" dependencies = [ - "backtrace", - "backtrace-ext", - "is-terminal", - "miette-derive 5.10.0", - "once_cell", - "owo-colors", - "supports-color 2.1.0", - "supports-hyperlinks 2.1.0", - "supports-unicode 2.0.0", - "terminal_size 0.1.17", - "textwrap 0.15.2", + "cfg-if", + "miette-derive 7.2.0", + "owo-colors 4.0.0", + "textwrap 0.16.0", "thiserror", "unicode-width", ] [[package]] name = "miette-derive" -version = "4.7.1" +version = "5.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b5bc45b761bcf1b5e6e6c4128cd93b84c218721a8d9b894aa0aff4ed180174c" +checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.58", ] [[package]] name = "miette-derive" -version = "5.10.0" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" +checksum = "dcf09caffaac8068c346b6df2a7fc27a177fd20b39421a39ce0a211bde679a6c" dependencies = [ "proc-macro2", "quote", @@ -5255,6 +5249,12 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" +[[package]] +name = "owo-colors" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caff54706df99d2a78a5a4e3455ff45448d81ef1bb63c22cd14052ca0e993a3f" + [[package]] name = "oxc_resolver" version = "1.5.4" @@ -7069,9 +7069,9 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.27" +version = "0.9.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cc7a1570e38322cfe4154732e5110f887ea57e22b76f4bfd32b5bdd3368666c" +checksum = "a15e0ef66bf939a7c890a0bf6d5a733c70202225f9888a89ed5c62298b019129" dependencies = [ "indexmap 2.2.6", "itoa", @@ -7350,12 +7350,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.4" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -7615,16 +7615,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" -[[package]] -name = "supports-color" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ba6faf2ca7ee42fdd458f4347ae0a9bd6bcc445ad7cb57ad82b383f18870d6f" -dependencies = [ - "atty", - "is_ci", -] - [[package]] name = "supports-color" version = "2.1.0" @@ -7635,15 +7625,6 @@ dependencies = [ "is_ci", ] -[[package]] -name = "supports-hyperlinks" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "590b34f7c5f01ecc9d78dba4b3f445f31df750a67621cf31626f3b7441ce6406" -dependencies = [ - "atty", -] - [[package]] name = "supports-hyperlinks" version = "2.1.0" @@ -7653,15 +7634,6 @@ dependencies = [ "is-terminal", ] -[[package]] -name = "supports-unicode" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8b945e45b417b125a8ec51f1b7df2f8df7920367700d1f98aedd21e5735f8b2" -dependencies = [ - "atty", -] - [[package]] name = "supports-unicode" version = "2.0.0" @@ -7686,9 +7658,9 @@ dependencies = [ [[package]] name = "swc" -version = "0.279.0" +version = "0.279.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267d1595c1992901ff8d9b0b299b000c38c1f4bcc117c7a60652acaaac77e356" +checksum = "e360f7055c05d58acf732bac714094f46556ee0d271f58fcd9f3683853d05e1a" dependencies = [ "anyhow", "base64 0.21.4", @@ -7745,7 +7717,7 @@ version = "0.1.0" dependencies = [ "anyhow", "clap 4.5.2", - "owo-colors", + "owo-colors 3.5.0", "regex", "swc_core", ] @@ -7899,9 +7871,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.96.1" +version = "0.96.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e6580d304e9780be6027527eb3a7108731948cf1f29d598685be10bc8f05209" +checksum = "dd2c20bf289bbc4b6eb2ab21623b4db8ea5d269438fe34aff2df5223dbf562c8" dependencies = [ "binding_macros", "swc", @@ -8367,9 +8339,9 @@ dependencies = [ [[package]] name = "swc_ecma_loader" -version = "0.46.0" +version = "0.46.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de65ea1e3f6fe8d62121eb5889ef98ca41b04425df85cd1a3b81637057a2b035" +checksum = "5a9febebf047d1286e7b723fa2758f3229da2c103834f3eaee69833f46692612" dependencies = [ "anyhow", "dashmap", @@ -8389,9 +8361,9 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.197.2" +version = "0.197.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f9852fc8849b5e0d442bd59b6054f908d03b1af4229a9adcf6aae9db2d366b7" +checksum = "adde00302d7ddb37f312ee6d07078c7f3c7ede36c0f81c5050bae1d4c3fe501c" dependencies = [ "arrayvec 0.7.4", "indexmap 2.2.6", @@ -8424,9 +8396,9 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.146.8" +version = "0.146.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cb0661386d67b828093fe7e87381c0808298595ba38cd00101973e70ab66dd6" +checksum = "95d2128fee5628aa6a205de62d38c7a3f1b901f4483ba3dfd73da29168c1b9ac" dependencies = [ "either", "new_debug_unreachable", @@ -8521,9 +8493,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" -version = "0.140.1" +version = "0.140.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4341c6272c4feaaf22cc8104f65ebcadac8ad2098dfacb6eb62e8c053698a40d" +checksum = "d37dc505c92af56d0f77cf6f31a6ccd37ac40cad1e01ff77277e0b1c70e8f8ff" dependencies = [ "better_scoped_tls", "bitflags 2.5.0", @@ -8660,9 +8632,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_proposal" -version = "0.174.2" +version = "0.174.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779a6d7db3524ab63f44ebc7944c96fd2b845475fef1411d1b211719f93980bf" +checksum = "6df8aa6752cc2fcf3d78ac67827542fb666e52283f2b26802aa058906bb750d3" dependencies = [ "either", "rustc-hash", @@ -8731,9 +8703,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_typescript" -version = "0.191.1" +version = "0.191.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a27f93ecb3e04591302628407878fca336a676829309d53bb3f7cd1b708cd7" +checksum = "f1ce8af2865449e714ae56dacb6b54b3f6dc4cc25074da4e39b878bd93c5e39c" dependencies = [ "ryu-js", "serde", @@ -8765,9 +8737,9 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.130.2" +version = "0.130.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "612fea1ef92ca438eebdd60c7969e6ee6191eb2e4306018584b9e82390c5e093" +checksum = "13e62b199454a576c5fdbd7e1bef8ab88a395427456d8a713d994b7d469833aa" dependencies = [ "indexmap 2.2.6", "num_cpus", @@ -8835,12 +8807,12 @@ dependencies = [ [[package]] name = "swc_error_reporters" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd8f9a90efb59dc5d918b4470e5d152f34cac2f8733bfba141a96440cab3eff" +checksum = "4689d9bb6092b5e6a0b79c0152336a8bd7f0acaf70dcf4133f86deb01775baa0" dependencies = [ "anyhow", - "miette 4.7.1", + "miette 7.2.0", "once_cell", "parking_lot", "swc_common", @@ -9389,6 +9361,11 @@ name = "textwrap" version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" +dependencies = [ + "smawk", + "unicode-linebreak", + "unicode-width", +] [[package]] name = "thiserror" @@ -9528,7 +9505,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.4", + "socket2 0.5.6", "tokio-macros", "tracing", "windows-sys 0.48.0", @@ -10386,7 +10363,7 @@ dependencies = [ "futures", "nix 0.26.2", "once_cell", - "owo-colors", + "owo-colors 3.5.0", "parking_lot", "portpicker", "rand 0.8.5", @@ -10487,7 +10464,7 @@ dependencies = [ "dunce", "futures", "mime", - "owo-colors", + "owo-colors 3.5.0", "regex", "serde", "tokio", @@ -10524,7 +10501,7 @@ dependencies = [ "anyhow", "clap 4.5.2", "crossterm 0.26.1", - "owo-colors", + "owo-colors 3.5.0", "serde", "turbo-tasks", "turbo-tasks-build", @@ -10800,7 +10777,7 @@ dependencies = [ "indoc", "mime", "once_cell", - "owo-colors", + "owo-colors 3.5.0", "parking_lot", "regex", "serde", @@ -11251,7 +11228,7 @@ dependencies = [ "nix 0.26.2", "notify", "num_cpus", - "owo-colors", + "owo-colors 3.5.0", "path-clean 1.0.1", "petgraph", "pidlock", @@ -11268,7 +11245,7 @@ dependencies = [ "semver 1.0.23", "serde", "serde_json", - "serde_yaml 0.9.27", + "serde_yaml 0.9.29", "sha2", "shared_child", "struct_iterable", @@ -11335,7 +11312,7 @@ dependencies = [ "semver 1.0.23", "serde", "serde_json", - "serde_yaml 0.9.27", + "serde_yaml 0.9.29", "test-case", "thiserror", "tracing", @@ -11395,7 +11372,7 @@ dependencies = [ "rust-ini", "serde", "serde_json", - "serde_yaml 0.9.27", + "serde_yaml 0.9.29", "tempfile", "test-case", "thiserror", @@ -11690,9 +11667,9 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" @@ -11702,9 +11679,9 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "unsafe-libyaml" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1865806a559042e51ab5414598446a5871b561d21b6764f2eabb0dd481d880a6" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" [[package]] name = "unsize" @@ -12306,7 +12283,7 @@ dependencies = [ "serde", "serde_cbor", "serde_json", - "serde_yaml 0.9.27", + "serde_yaml 0.9.29", "thiserror", "toml 0.8.14", ] @@ -13007,7 +12984,7 @@ dependencies = [ "indexmap 1.9.3", "inquire", "num-format", - "owo-colors", + "owo-colors 3.5.0", "plotters", "semver 1.0.23", "serde", From 5e713208969908bdf04b986695c7c28849b428d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Sat, 6 Jul 2024 08:21:01 +0900 Subject: [PATCH 16/16] Fix relay --- .../turbopack-ecmascript-plugins/src/transform/relay.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/turbopack-ecmascript-plugins/src/transform/relay.rs b/crates/turbopack-ecmascript-plugins/src/transform/relay.rs index 60dd609fb3bde..3baf3cc58a74b 100644 --- a/crates/turbopack-ecmascript-plugins/src/transform/relay.rs +++ b/crates/turbopack-ecmascript-plugins/src/transform/relay.rs @@ -1,4 +1,4 @@ -use std::path::PathBuf; +use std::{path::PathBuf, sync::Arc}; use anyhow::{Context, Result}; use async_trait::async_trait; @@ -33,7 +33,7 @@ pub enum RelayLanguage { #[derive(Debug)] pub struct RelayTransformer { - config: swc_relay::Config, + config: Arc, project_path: FileSystemPath, } @@ -53,7 +53,7 @@ impl RelayTransformer { }; Self { - config: options, + config: options.into(), project_path: project_path.clone(), } } @@ -75,7 +75,7 @@ impl CustomTransformer for RelayTransformer { let p = std::mem::replace(program, Program::Module(Module::dummy())); *program = p.fold_with(&mut swc_relay::relay( - &self.config, + self.config.clone(), FileName::Real(PathBuf::from(ctx.file_name_str)), path_to_proj, // [TODO]: pages_dir comes through next-swc-loader