From 74e336f64f6b005f1c3fcc3161ed562db3efbb4c 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, 18 Jul 2024 09:41:45 +0900 Subject: [PATCH 01/30] Update swc_core --- packages/emotion/Cargo.toml | 12 +++---- packages/emotion/transform/Cargo.toml | 18 +++++----- packages/jest/Cargo.toml | 10 +++--- packages/loadable-components/Cargo.toml | 14 ++++---- packages/noop/Cargo.toml | 10 +++--- packages/prefresh/Cargo.toml | 4 +-- packages/prefresh/transform/Cargo.toml | 16 ++++----- packages/react-remove-properties/Cargo.toml | 10 +++--- .../transform/Cargo.toml | 14 ++++---- packages/relay/Cargo.toml | 10 +++--- packages/relay/transform/Cargo.toml | 12 +++---- packages/remove-console/Cargo.toml | 10 +++--- packages/remove-console/transform/Cargo.toml | 14 ++++---- packages/styled-components/Cargo.toml | 10 +++--- .../styled-components/transform/Cargo.toml | 16 ++++----- packages/styled-jsx/Cargo.toml | 18 +++++----- packages/styled-jsx/transform/Cargo.toml | 34 +++++++++---------- packages/swc-confidential/Cargo.toml | 2 +- .../swc-confidential/transform/Cargo.toml | 16 ++++----- packages/swc-magic/Cargo.toml | 2 +- packages/swc-magic/transform/Cargo.toml | 16 ++++----- packages/transform-imports/Cargo.toml | 10 +++--- .../transform-imports/transform/Cargo.toml | 12 +++---- 23 files changed, 145 insertions(+), 145 deletions(-) diff --git a/packages/emotion/Cargo.toml b/packages/emotion/Cargo.toml index ecbcf20eb..b5ff8fd80 100644 --- a/packages/emotion/Cargo.toml +++ b/packages/emotion/Cargo.toml @@ -17,12 +17,12 @@ crate-type = ["cdylib", "rlib"] [dependencies] serde = "1" serde_json = "1.0.117" -swc_common = { version = "0.34.3", features = ["concurrent"] } -swc_core = { version = "0.96.0", features = ["ecma_plugin_transform"] } -swc_ecma_ast = "0.115.1" -swc_ecma_utils = "0.130.1" -swc_ecma_visit = "0.101.0" +swc_common = { version = "0.36.0", features = ["concurrent"] } +swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } +swc_ecma_ast = "0.117.0" +swc_ecma_utils = "0.133.0" +swc_ecma_visit = "0.103.0" swc_emotion = { path = "./transform" } swc_plugin_macro = "0.9.16" -swc_plugin_proxy = "0.44.0" +swc_plugin_proxy = "0.46.0" tracing = { version = "0.1.40", features = ["release_max_level_off"] } diff --git a/packages/emotion/transform/Cargo.toml b/packages/emotion/transform/Cargo.toml index b1b5b87b5..eb748775a 100644 --- a/packages/emotion/transform/Cargo.toml +++ b/packages/emotion/transform/Cargo.toml @@ -22,17 +22,17 @@ regex = "1.10" serde = "1" sourcemap = "8.0.1" swc_atoms = "0.6.7" -swc_common = "0.34.3" -swc_ecma_ast = "0.115.1" -swc_ecma_codegen = "0.151.1" -swc_ecma_utils = "0.130.1" -swc_ecma_visit = "0.101.0" +swc_common = "0.36.0" +swc_ecma_ast = "0.117.0" +swc_ecma_codegen = "0.154.0" +swc_ecma_utils = "0.133.0" +swc_ecma_visit = "0.103.0" swc_trace_macro = "0.1.3" tracing = { version = "0.1.40" } [dev-dependencies] serde_json = "1" -swc_ecma_parser = "0.146.7" -swc_ecma_transforms_react = "0.186.2" -swc_ecma_transforms_testing = "0.143.1" -testing = "0.36.0" +swc_ecma_parser = "0.148.0" +swc_ecma_transforms_react = "0.189.0" +swc_ecma_transforms_testing = "0.146.0" +testing = "0.38.0" diff --git a/packages/jest/Cargo.toml b/packages/jest/Cargo.toml index 4ed41d133..d3c2ca762 100644 --- a/packages/jest/Cargo.toml +++ b/packages/jest/Cargo.toml @@ -17,10 +17,10 @@ crate-type = ["cdylib", "rlib"] [dependencies] phf = { version = "0.11.2", features = ["macros"] } serde = { version = "1.0.201", features = ["derive"] } -swc_common = { version = "0.34.3", features = ["concurrent"] } -swc_core = { version = "0.96.0", features = ["ecma_plugin_transform"] } -swc_ecma_ast = "0.115.1" -swc_ecma_utils = "0.130.1" -swc_ecma_visit = "0.101.0" +swc_common = { version = "0.36.0", features = ["concurrent"] } +swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } +swc_ecma_ast = "0.117.0" +swc_ecma_utils = "0.133.0" +swc_ecma_visit = "0.103.0" swc_plugin_macro = "0.9.16" tracing = { version = "0.1.40", features = ["release_max_level_off"] } diff --git a/packages/loadable-components/Cargo.toml b/packages/loadable-components/Cargo.toml index d9d38e854..2b84b728d 100644 --- a/packages/loadable-components/Cargo.toml +++ b/packages/loadable-components/Cargo.toml @@ -20,17 +20,17 @@ once_cell = "1.19.0" regex = "1.10.4" serde = { version = "1.0.203", features = ["derive"] } serde_json = "1.0.117" -swc_common = { version = "0.34.3", features = ["concurrent"] } -swc_core = { version = "0.96.0", features = [ +swc_common = { version = "0.36.0", features = ["concurrent"] } +swc_core = { version = "0.99.0", features = [ "ecma_quote", "ecma_plugin_transform", ] } -swc_ecma_ast = "0.115.1" -swc_ecma_utils = "0.130.1" -swc_ecma_visit = "0.101.0" +swc_ecma_ast = "0.117.0" +swc_ecma_utils = "0.133.0" +swc_ecma_visit = "0.103.0" swc_plugin_macro = "0.9.16" -swc_plugin_proxy = "0.44.0" +swc_plugin_proxy = "0.46.0" tracing = { version = "0.1.40", features = ["release_max_level_off"] } [dev-dependencies] -testing = "0.36.0" +testing = "0.38.0" diff --git a/packages/noop/Cargo.toml b/packages/noop/Cargo.toml index cc642f546..a3f3f99e3 100644 --- a/packages/noop/Cargo.toml +++ b/packages/noop/Cargo.toml @@ -18,10 +18,10 @@ version = "0.18.4" crate-type = ["cdylib", "rlib"] [dependencies] -swc_common = { version = "0.34.3", features = ["concurrent"] } -swc_core = { version = "0.96.0", features = ["ecma_plugin_transform"] } -swc_ecma_ast = "0.115.1" -swc_ecma_utils = "0.130.1" -swc_ecma_visit = "0.101.0" +swc_common = { version = "0.36.0", features = ["concurrent"] } +swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } +swc_ecma_ast = "0.117.0" +swc_ecma_utils = "0.133.0" +swc_ecma_visit = "0.103.0" swc_plugin_macro = "0.9.16" tracing = { version = "0.1.40", features = ["release_max_level_off"] } diff --git a/packages/prefresh/Cargo.toml b/packages/prefresh/Cargo.toml index c545fa934..1bb4d9519 100644 --- a/packages/prefresh/Cargo.toml +++ b/packages/prefresh/Cargo.toml @@ -19,7 +19,7 @@ crate-type = ["cdylib", "rlib"] [dependencies] serde_json = "1.0.117" -swc_common = { version = "0.34.3" } -swc_core = { version = "0.96.0", features = ["ecma_plugin_transform"] } +swc_common = { version = "0.36.0" } +swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } swc_prefresh = { path = "./transform" } diff --git a/packages/prefresh/transform/Cargo.toml b/packages/prefresh/transform/Cargo.toml index 68ef62f77..d8b2101a9 100644 --- a/packages/prefresh/transform/Cargo.toml +++ b/packages/prefresh/transform/Cargo.toml @@ -15,13 +15,13 @@ version = "0.1.1" [dependencies] serde = { version = "1", features = ["derive"] } swc_atoms = "0.6.7" -swc_common = "0.34.3" -swc_core = { version = "0.96.0", features = ["ecma_quote"] } -swc_ecma_ast = "0.115.1" -swc_ecma_visit = "0.101.0" +swc_common = "0.36.0" +swc_core = { version = "0.99.0", features = ["ecma_quote"] } +swc_ecma_ast = "0.117.0" +swc_ecma_visit = "0.103.0" [dev-dependencies] -swc_ecma_parser = "0.146.7" -swc_ecma_transforms_base = "0.140.1" -swc_ecma_transforms_testing = "0.143.1" -testing = "0.36.0" +swc_ecma_parser = "0.148.0" +swc_ecma_transforms_base = "0.143.0" +swc_ecma_transforms_testing = "0.146.0" +testing = "0.38.0" diff --git a/packages/react-remove-properties/Cargo.toml b/packages/react-remove-properties/Cargo.toml index d6e33273f..765b7a591 100644 --- a/packages/react-remove-properties/Cargo.toml +++ b/packages/react-remove-properties/Cargo.toml @@ -21,10 +21,10 @@ crate-type = ["cdylib", "rlib"] react_remove_properties = { path = "./transform" } serde_json = "1.0.117" swc_cached = "0.3.20" -swc_common = { version = "0.34.3", features = ["concurrent"] } -swc_core = { version = "0.96.0", features = ["ecma_plugin_transform"] } -swc_ecma_ast = "0.115.1" -swc_ecma_utils = "0.130.1" -swc_ecma_visit = "0.101.0" +swc_common = { version = "0.36.0", features = ["concurrent"] } +swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } +swc_ecma_ast = "0.117.0" +swc_ecma_utils = "0.133.0" +swc_ecma_visit = "0.103.0" swc_plugin_macro = "0.9.16" tracing = { version = "0.1.40", features = ["release_max_level_off"] } diff --git a/packages/react-remove-properties/transform/Cargo.toml b/packages/react-remove-properties/transform/Cargo.toml index 1593c4533..67800920d 100644 --- a/packages/react-remove-properties/transform/Cargo.toml +++ b/packages/react-remove-properties/transform/Cargo.toml @@ -20,12 +20,12 @@ version = "0.24.15" serde = { version = "1", features = ["derive"] } swc_atoms = "0.6.7" swc_cached = "0.3.20" -swc_common = "0.34.3" -swc_ecma_ast = "0.115.1" -swc_ecma_visit = "0.101.0" +swc_common = "0.36.0" +swc_ecma_ast = "0.117.0" +swc_ecma_visit = "0.103.0" [dev-dependencies] -swc_ecma_parser = "0.146.7" -swc_ecma_transforms_base = "0.140.1" -swc_ecma_transforms_testing = "0.143.1" -testing = "0.36.0" +swc_ecma_parser = "0.148.0" +swc_ecma_transforms_base = "0.143.0" +swc_ecma_transforms_testing = "0.146.0" +testing = "0.38.0" diff --git a/packages/relay/Cargo.toml b/packages/relay/Cargo.toml index d13dbe6d8..9d200328d 100644 --- a/packages/relay/Cargo.toml +++ b/packages/relay/Cargo.toml @@ -19,11 +19,11 @@ once_cell = "1.19.0" regex = "1.10" serde = "1" serde_json = "1" -swc_common = { version = "0.34.3", features = ["concurrent"] } -swc_core = { version = "0.96.0", features = ["ecma_plugin_transform"] } -swc_ecma_ast = "0.115.1" -swc_ecma_utils = "0.130.1" -swc_ecma_visit = "0.101.0" +swc_common = { version = "0.36.0", features = ["concurrent"] } +swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } +swc_ecma_ast = "0.117.0" +swc_ecma_utils = "0.133.0" +swc_ecma_visit = "0.103.0" swc_plugin_macro = "0.9.16" swc_relay = { path = "./transform" } tracing = { version = "0.1.40", features = ["release_max_level_off"] } diff --git a/packages/relay/transform/Cargo.toml b/packages/relay/transform/Cargo.toml index 55ceba5bd..598978835 100644 --- a/packages/relay/transform/Cargo.toml +++ b/packages/relay/transform/Cargo.toml @@ -22,12 +22,12 @@ regex = "1.10" serde = "1" serde_json = "1" swc_atoms = "0.6.7" -swc_common = { version = "0.34.3", features = ["concurrent"] } -swc_ecma_ast = "0.115.1" -swc_ecma_utils = "0.130.1" -swc_ecma_visit = "0.101.0" +swc_common = { version = "0.36.0", features = ["concurrent"] } +swc_ecma_ast = "0.117.0" +swc_ecma_utils = "0.133.0" +swc_ecma_visit = "0.103.0" tracing = { version = "0.1.40" } [dev-dependencies] -swc_ecma_transforms_testing = "0.143.1" -testing = "0.36.0" +swc_ecma_transforms_testing = "0.146.0" +testing = "0.38.0" diff --git a/packages/remove-console/Cargo.toml b/packages/remove-console/Cargo.toml index 2afe226b2..e056b4519 100644 --- a/packages/remove-console/Cargo.toml +++ b/packages/remove-console/Cargo.toml @@ -20,10 +20,10 @@ crate-type = ["cdylib", "rlib"] [dependencies] remove_console = { path = "./transform" } serde_json = "1.0.117" -swc_common = { version = "0.34.3", features = ["concurrent"] } -swc_core = { version = "0.96.0", features = ["ecma_plugin_transform"] } -swc_ecma_ast = "0.115.1" -swc_ecma_utils = "0.130.1" -swc_ecma_visit = "0.101.0" +swc_common = { version = "0.36.0", features = ["concurrent"] } +swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } +swc_ecma_ast = "0.117.0" +swc_ecma_utils = "0.133.0" +swc_ecma_visit = "0.103.0" swc_plugin_macro = "0.9.16" tracing = { version = "0.1.40", features = ["release_max_level_off"] } diff --git a/packages/remove-console/transform/Cargo.toml b/packages/remove-console/transform/Cargo.toml index 15444a870..2c384f06e 100644 --- a/packages/remove-console/transform/Cargo.toml +++ b/packages/remove-console/transform/Cargo.toml @@ -20,12 +20,12 @@ version = "0.25.15" serde = { version = "1", features = ["derive"] } swc_atoms = "0.6.7" swc_cached = "0.3.20" -swc_common = "0.34.3" -swc_ecma_ast = "0.115.1" -swc_ecma_visit = "0.101.0" +swc_common = "0.36.0" +swc_ecma_ast = "0.117.0" +swc_ecma_visit = "0.103.0" [dev-dependencies] -swc_ecma_parser = "0.146.7" -swc_ecma_transforms_base = "0.140.1" -swc_ecma_transforms_testing = "0.143.1" -testing = "0.36.0" +swc_ecma_parser = "0.148.0" +swc_ecma_transforms_base = "0.143.0" +swc_ecma_transforms_testing = "0.146.0" +testing = "0.38.0" diff --git a/packages/styled-components/Cargo.toml b/packages/styled-components/Cargo.toml index 584a40b38..00be274a2 100644 --- a/packages/styled-components/Cargo.toml +++ b/packages/styled-components/Cargo.toml @@ -22,10 +22,10 @@ serde = { version = "1.0.201", features = ["derive"] } serde_json = "1.0.117" styled_components = { path = "./transform" } swc_atoms = "0.6.7" -swc_common = { version = "0.34.3", features = ["concurrent"] } -swc_core = { version = "0.96.0", features = ["ecma_plugin_transform"] } -swc_ecma_ast = "0.115.1" -swc_ecma_utils = "0.130.1" -swc_ecma_visit = "0.101.0" +swc_common = { version = "0.36.0", features = ["concurrent"] } +swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } +swc_ecma_ast = "0.117.0" +swc_ecma_utils = "0.133.0" +swc_ecma_visit = "0.103.0" swc_plugin_macro = "0.9.16" tracing = { version = "0.1.40", features = ["release_max_level_off"] } diff --git a/packages/styled-components/transform/Cargo.toml b/packages/styled-components/transform/Cargo.toml index d8d4ff6d7..8d9479285 100644 --- a/packages/styled-components/transform/Cargo.toml +++ b/packages/styled-components/transform/Cargo.toml @@ -26,15 +26,15 @@ regex = { version = "1.10.4", features = [ ], default-features = false } serde = { version = "1.0.201", features = ["derive"] } swc_atoms = "0.6.7" -swc_common = "0.34.3" -swc_ecma_ast = "0.115.1" -swc_ecma_utils = "0.130.1" -swc_ecma_visit = "0.101.0" +swc_common = "0.36.0" +swc_ecma_ast = "0.117.0" +swc_ecma_utils = "0.133.0" +swc_ecma_visit = "0.103.0" tracing = "0.1.40" [dev-dependencies] serde_json = "1" -swc_ecma_parser = "0.146.7" -swc_ecma_transforms = "0.232.1" -swc_ecma_transforms_testing = "0.143.1" -testing = "0.36.0" +swc_ecma_parser = "0.148.0" +swc_ecma_transforms = "0.235.0" +swc_ecma_transforms_testing = "0.146.0" +testing = "0.38.0" diff --git a/packages/styled-jsx/Cargo.toml b/packages/styled-jsx/Cargo.toml index b0a8ceac0..2bc4490e2 100644 --- a/packages/styled-jsx/Cargo.toml +++ b/packages/styled-jsx/Cargo.toml @@ -25,16 +25,16 @@ anyhow = "1" serde_json = "1" styled_jsx = { path = "./transform" } swc_atoms = "0.6.7" -swc_common = "0.34.3" -swc_core = { version = "0.96.0", features = ["ecma_plugin_transform"] } -swc_ecma_ast = "0.115.1" -swc_ecma_minifier = "0.197.1" -swc_ecma_parser = "0.146.7" -swc_ecma_utils = "0.130.1" -swc_ecma_visit = "0.101.0" +swc_common = "0.36.0" +swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } +swc_ecma_ast = "0.117.0" +swc_ecma_minifier = "0.200.0" +swc_ecma_parser = "0.148.0" +swc_ecma_utils = "0.133.0" +swc_ecma_visit = "0.103.0" swc_plugin_macro = "0.9.16" tracing = { version = "0.1.40", features = ["release_max_level_off"] } [dev-dependencies] -swc_ecma_transforms_testing = "0.143.1" -testing = "0.36.0" +swc_ecma_transforms_testing = "0.146.0" +testing = "0.38.0" diff --git a/packages/styled-jsx/transform/Cargo.toml b/packages/styled-jsx/transform/Cargo.toml index 486d46d03..961c350f4 100644 --- a/packages/styled-jsx/transform/Cargo.toml +++ b/packages/styled-jsx/transform/Cargo.toml @@ -26,23 +26,23 @@ parcel_selectors = "0.26.4" serde = { version = "1", features = ["derive"] } tracing = "0.1.40" -preset_env_base = "0.5.0" -swc_common = "0.34.3" -swc_css_ast = "0.141.0" -swc_css_codegen = "0.152.0" -swc_css_compat = "0.28.0" -swc_css_minifier = "0.117.1" -swc_css_parser = "0.151.0" -swc_css_prefixer = "0.155.0" -swc_css_visit = "0.140.0" -swc_ecma_ast = "0.115.1" -swc_ecma_minifier = "0.197.1" -swc_ecma_parser = "0.146.7" -swc_ecma_utils = "0.130.1" -swc_ecma_visit = "0.101.0" +preset_env_base = "0.5.1" +swc_common = "0.36.0" +swc_css_ast = "0.143.0" +swc_css_codegen = "0.154.0" +swc_css_compat = "0.30.0" +swc_css_minifier = "0.119.0" +swc_css_parser = "0.153.0" +swc_css_prefixer = "0.157.0" +swc_css_visit = "0.142.0" +swc_ecma_ast = "0.117.0" +swc_ecma_minifier = "0.200.0" +swc_ecma_parser = "0.148.0" +swc_ecma_utils = "0.133.0" +swc_ecma_visit = "0.103.0" swc_plugin_macro = "0.9.16" [dev-dependencies] -swc_ecma_transforms = "0.232.1" -swc_ecma_transforms_testing = "0.143.1" -testing = "0.36.0" +swc_ecma_transforms = "0.235.0" +swc_ecma_transforms_testing = "0.146.0" +testing = "0.38.0" diff --git a/packages/swc-confidential/Cargo.toml b/packages/swc-confidential/Cargo.toml index 5125629db..5dad2f8dc 100644 --- a/packages/swc-confidential/Cargo.toml +++ b/packages/swc-confidential/Cargo.toml @@ -19,7 +19,7 @@ crate-type = ["cdylib", "rlib"] [dependencies] serde_json = "1.0.117" -swc_core = { version = "0.96.0", features = ["ecma_plugin_transform"] } +swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } swc_confidential = { path = "./transform" } diff --git a/packages/swc-confidential/transform/Cargo.toml b/packages/swc-confidential/transform/Cargo.toml index 5ff3ae934..d50a56a8a 100644 --- a/packages/swc-confidential/transform/Cargo.toml +++ b/packages/swc-confidential/transform/Cargo.toml @@ -19,13 +19,13 @@ hex = "0.4.3" magic-crypt = "3.1.13" serde = { version = "1.0.201", features = ["derive"] } swc_atoms = "0.6.7" -swc_common = "0.34.3" -swc_ecma_ast = "0.115.1" -swc_ecma_utils = "0.130.1" -swc_ecma_visit = "0.101.0" +swc_common = "0.36.0" +swc_ecma_ast = "0.117.0" +swc_ecma_utils = "0.133.0" +swc_ecma_visit = "0.103.0" [dev-dependencies] -swc_ecma_parser = "0.146.7" -swc_ecma_transforms_base = "0.140.1" -swc_ecma_transforms_testing = "0.143.1" -testing = "0.36.0" +swc_ecma_parser = "0.148.0" +swc_ecma_transforms_base = "0.143.0" +swc_ecma_transforms_testing = "0.146.0" +testing = "0.38.0" diff --git a/packages/swc-magic/Cargo.toml b/packages/swc-magic/Cargo.toml index 3c1f04d40..0b2624fca 100644 --- a/packages/swc-magic/Cargo.toml +++ b/packages/swc-magic/Cargo.toml @@ -19,7 +19,7 @@ crate-type = ["cdylib", "rlib"] [dependencies] serde_json = "1.0.117" -swc_core = { version = "0.96.0", features = ["ecma_plugin_transform"] } +swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } swc_magic = { path = "./transform" } diff --git a/packages/swc-magic/transform/Cargo.toml b/packages/swc-magic/transform/Cargo.toml index 58de6076b..250f08468 100644 --- a/packages/swc-magic/transform/Cargo.toml +++ b/packages/swc-magic/transform/Cargo.toml @@ -16,13 +16,13 @@ version = "0.19.15" [dependencies] serde = { version = "1.0.201", features = ["derive"] } swc_atoms = "0.6.7" -swc_common = "0.34.3" -swc_ecma_ast = "0.115.1" -swc_ecma_utils = "0.130.1" -swc_ecma_visit = "0.101.0" +swc_common = "0.36.0" +swc_ecma_ast = "0.117.0" +swc_ecma_utils = "0.133.0" +swc_ecma_visit = "0.103.0" [dev-dependencies] -swc_ecma_parser = "0.146.7" -swc_ecma_transforms_base = "0.140.1" -swc_ecma_transforms_testing = "0.143.1" -testing = "0.36.0" +swc_ecma_parser = "0.148.0" +swc_ecma_transforms_base = "0.143.0" +swc_ecma_transforms_testing = "0.146.0" +testing = "0.38.0" diff --git a/packages/transform-imports/Cargo.toml b/packages/transform-imports/Cargo.toml index eb18e1d89..c8620e05e 100644 --- a/packages/transform-imports/Cargo.toml +++ b/packages/transform-imports/Cargo.toml @@ -20,10 +20,10 @@ crate-type = ["cdylib", "rlib"] [dependencies] modularize_imports = { path = "./transform" } serde_json = "1.0.117" -swc_common = { version = "0.34.3", features = ["concurrent"] } -swc_core = { version = "0.96.0", features = ["ecma_plugin_transform"] } -swc_ecma_ast = "0.115.1" -swc_ecma_utils = "0.130.1" -swc_ecma_visit = "0.101.0" +swc_common = { version = "0.36.0", features = ["concurrent"] } +swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } +swc_ecma_ast = "0.117.0" +swc_ecma_utils = "0.133.0" +swc_ecma_visit = "0.103.0" swc_plugin_macro = "0.9.16" tracing = { version = "0.1.40", features = ["release_max_level_off"] } diff --git a/packages/transform-imports/transform/Cargo.toml b/packages/transform-imports/transform/Cargo.toml index 006c0ae32..28ce3fde2 100644 --- a/packages/transform-imports/transform/Cargo.toml +++ b/packages/transform-imports/transform/Cargo.toml @@ -23,11 +23,11 @@ regex = "1.10" serde = "1" swc_atoms = "0.6.7" swc_cached = "0.3.20" -swc_common = "0.34.3" -swc_ecma_ast = "0.115.1" -swc_ecma_visit = "0.101.0" +swc_common = "0.36.0" +swc_ecma_ast = "0.117.0" +swc_ecma_visit = "0.103.0" [dev-dependencies] -swc_ecma_parser = "0.146.7" -swc_ecma_transforms_testing = "0.143.1" -testing = "0.36.0" +swc_ecma_parser = "0.148.0" +swc_ecma_transforms_testing = "0.146.0" +testing = "0.38.0" From 4f65b3858947956366390e092ae7f20398692983 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, 18 Jul 2024 09:41:50 +0900 Subject: [PATCH 02/30] cargo lockfile --- Cargo.lock | 301 ++++++++++++++++++----------------------------------- 1 file changed, 102 insertions(+), 199 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3f850199f..018606d32 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12,21 +12,6 @@ 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 = "aes" version = "0.7.5" @@ -73,6 +58,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +dependencies = [ + "serde", +] + [[package]] name = "android-tzdata" version = "0.1.1" @@ -198,21 +192,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" -[[package]] -name = "backtrace" -version = "0.3.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - [[package]] name = "base64" version = "0.21.7" @@ -319,6 +298,9 @@ name = "bumpalo" version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +dependencies = [ + "allocator-api2", +] [[package]] name = "bytecheck" @@ -372,20 +354,6 @@ dependencies = [ "serde", ] -[[package]] -name = "cargo_metadata" -version = "0.15.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" -dependencies = [ - "camino", - "cargo-platform", - "semver 1.0.23", - "serde", - "serde_json", - "thiserror", -] - [[package]] name = "cargo_metadata" version = "0.18.1" @@ -800,12 +768,6 @@ dependencies = [ "wasi", ] -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - [[package]] name = "glob" version = "0.3.1" @@ -953,12 +915,6 @@ dependencies = [ "syn 2.0.61", ] -[[package]] -name = "is_ci" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45" - [[package]] name = "is_terminal_polyfill" version = "1.70.0" @@ -1194,19 +1150,13 @@ checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "miette" -version = "4.7.1" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c90329e44f9208b55f45711f9558cec15d7ef8295cc65ecd6d4188ae8edc58c" +checksum = "4edc8853320c2a0dab800fbda86253c8938f6ea88510dc92c5f1ed20e794afc1" dependencies = [ - "atty", - "backtrace", + "cfg-if", "miette-derive", - "once_cell", "owo-colors", - "supports-color", - "supports-hyperlinks", - "supports-unicode", - "terminal_size", "textwrap", "thiserror", "unicode-width", @@ -1214,13 +1164,13 @@ dependencies = [ [[package]] name = "miette-derive" -version = "4.7.1" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b5bc45b761bcf1b5e6e6c4128cd93b84c218721a8d9b894aa0aff4ed180174c" +checksum = "dcf09caffaac8068c346b6df2a7fc27a177fd20b39421a39ce0a211bde679a6c" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.61", ] [[package]] @@ -1229,15 +1179,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" -dependencies = [ - "adler", -] - [[package]] name = "modularize_imports" version = "0.68.19" @@ -1322,15 +1263,6 @@ dependencies = [ "libc", ] -[[package]] -name = "object" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -dependencies = [ - "memchr", -] - [[package]] name = "once_cell" version = "1.19.0" @@ -1357,9 +1289,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "owo-colors" -version = "3.5.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" +checksum = "caff54706df99d2a78a5a4e3455ff45448d81ef1bb63c22cd14052ca0e993a3f" [[package]] name = "parcel_selectors" @@ -1588,9 +1520,9 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "preset_env_base" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ecfcd4aefde8c1ed1ac4f1118ca5021763a717ba87f5508db7785e864dac1d8" +checksum = "1b30eab18be480c194938e433e269d5298a279f6410f02fbc73f3576a325c110" dependencies = [ "ahash 0.8.11", "anyhow", @@ -1852,12 +1784,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - [[package]] name = "rustc-hash" version = "1.1.0" @@ -2220,31 +2146,15 @@ dependencies = [ ] [[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-hyperlinks" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "590b34f7c5f01ecc9d78dba4b3f445f31df750a67621cf31626f3b7441ce6406" -dependencies = [ - "atty", -] - -[[package]] -name = "supports-unicode" -version = "1.0.2" +name = "swc_allocator" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8b945e45b417b125a8ec51f1b7df2f8df7920367700d1f98aedd21e5735f8b2" +checksum = "dae2f696639ba1834a7edb1765a5ea0a7ef57de52ac1403135929bd006748731" dependencies = [ - "atty", + "allocator-api2", + "bumpalo", + "ptr_meta", + "triomphe", ] [[package]] @@ -2277,9 +2187,9 @@ dependencies = [ [[package]] name = "swc_common" -version = "0.34.3" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b0d7bcbd9faf61cec1a552cbdaec57faefbb10be7cc5f959613c6f91b5a9254" +checksum = "df5ed098e191c0cb289aa89eeae8a5312993cf0997e7c83e011e0a7dd1f6ce7b" dependencies = [ "anyhow", "ast_node", @@ -2298,6 +2208,7 @@ dependencies = [ "serde", "siphasher", "sourcemap", + "swc_allocator", "swc_atoms", "swc_eq_ignore_macros", "swc_visit", @@ -2355,11 +2266,12 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.96.0" +version = "0.99.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397aa4b60ac7eed394d0c1f9634ff0cf9dd5841bf1cd4ed2ef7f45955a40cb99" +checksum = "9c71c1838f46553835f609b5e14aabf57d5e93e87fd050129fc78d6b6c41f3bc" dependencies = [ "once_cell", + "swc_allocator", "swc_atoms", "swc_common", "swc_ecma_ast", @@ -2375,9 +2287,9 @@ dependencies = [ [[package]] name = "swc_css_ast" -version = "0.141.0" +version = "0.143.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89a5f28ff625a89de2a269bde3ed3b99be74bb9d3dc78dea6f3b071991b2cbf4" +checksum = "bd74b0674c9ab8eebfaada987afc2c1da9bb83519851d253e6c55fe81a7b5d50" dependencies = [ "is-macro", "string_enum", @@ -2387,9 +2299,9 @@ dependencies = [ [[package]] name = "swc_css_codegen" -version = "0.152.0" +version = "0.154.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "894275a04a693db249903c29b31dfc71fae0bde68c49d4c4a935243f9eeba691" +checksum = "248bc5dd4b0cbd6ea6756c2f8ab8ebe120656c46e641ffb9e224ee7d24852a81" dependencies = [ "auto_impl", "bitflags", @@ -2416,9 +2328,9 @@ dependencies = [ [[package]] name = "swc_css_compat" -version = "0.28.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c87f674685c3ad0c94a1ad85cd605352f97ae92ad4a3993745578d6fe0d4c54" +checksum = "f0f4e646c376b40eeda3bb84bcc65f5ce58f21ceb7db6a351b4ede2492090c07" dependencies = [ "bitflags", "once_cell", @@ -2433,9 +2345,9 @@ dependencies = [ [[package]] name = "swc_css_minifier" -version = "0.117.1" +version = "0.119.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3018ef38941e9b5681af7651047cd42af8bcb1635ba1d99eee182aafd84bb3" +checksum = "1c86b7e31102ee0592cffbca17f6ca205aacd07fd9c7d2ff032fd0d90f2f4cd1" dependencies = [ "serde", "swc_atoms", @@ -2447,9 +2359,9 @@ dependencies = [ [[package]] name = "swc_css_parser" -version = "0.151.0" +version = "0.153.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee5dbaaea0df38195d137bcfc68149906bba9c9dffebf5e846234e286f82992" +checksum = "e32cc048c02012857c5e9ceb5105018647a543e4f189e398e6944707c972484e" dependencies = [ "lexical", "serde", @@ -2460,9 +2372,9 @@ dependencies = [ [[package]] name = "swc_css_prefixer" -version = "0.155.0" +version = "0.157.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc9930655060121c32d829e13fe4fa11294c03e71eb84c22e039703c929dcdf7" +checksum = "bba3432b5aa419493e0c609d0915d5f14c74a5c14bb89ac6146498974a027c1c" dependencies = [ "once_cell", "preset_env_base", @@ -2477,9 +2389,9 @@ dependencies = [ [[package]] name = "swc_css_utils" -version = "0.138.0" +version = "0.140.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b135df778449825f38d54664bb179c839b3285f9a553ec10dd3cc3eafb751599" +checksum = "47ab39714e7f531b892385aeb562e326f525efe738c3294d0d7f16c25fbca982" dependencies = [ "once_cell", "serde", @@ -2492,9 +2404,9 @@ dependencies = [ [[package]] name = "swc_css_visit" -version = "0.140.0" +version = "0.142.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c97dceaa18c8ae7f5a4c991e15efc5c333e5880b58ee6d61e42fd1365748ff05" +checksum = "e46be9a8ef2f97903a49df3092f8846b4d631784bc64f2d9b2f39769660517aa" dependencies = [ "serde", "swc_atoms", @@ -2505,9 +2417,9 @@ dependencies = [ [[package]] name = "swc_ecma_ast" -version = "0.115.1" +version = "0.117.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be1306930c235435a892104c00c2b5e16231043c085d5a10bd3e7537b15659b" +checksum = "536e973cd624cada731c22ad9ba3aa7a6432a5c1b6e002ec4f12809a8718da5d" dependencies = [ "bitflags", "bytecheck", @@ -2525,9 +2437,9 @@ dependencies = [ [[package]] name = "swc_ecma_codegen" -version = "0.151.1" +version = "0.154.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5141a8cb4eb69e090e6aea5d49061b46919be5210f3d084f9d9ad63d30f5cff" +checksum = "6ca6056bb7016fdeaee8e3d792e3242a8cfa6f2a81a2010e7f6c5cb961719a17" dependencies = [ "memchr", "num-bigint", @@ -2556,9 +2468,9 @@ dependencies = [ [[package]] name = "swc_ecma_minifier" -version = "0.197.1" +version = "0.200.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42abacd1c2682fd238c682209a616ebfee96abe2b9583aba273e7f1532b62bfc" +checksum = "b1b099da2ebb7ea933dacc7448d68466dbeb6b54e5833cf725abd9ec38960d0a" dependencies = [ "arrayvec", "indexmap", @@ -2566,6 +2478,7 @@ dependencies = [ "num_cpus", "once_cell", "parking_lot", + "phf 0.11.2", "radix_fmt", "regex", "rustc-hash", @@ -2589,12 +2502,11 @@ dependencies = [ [[package]] name = "swc_ecma_parser" -version = "0.146.7" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "417d95a184c1872bc4e4db82c721c20c38bdf01214a65ee512c37b9985b78c01" +checksum = "59627c3704453c1bcb283c51ee161a5acf9988c80f80ef0250743fede0406602" dependencies = [ "either", - "memchr", "new_debug_unreachable", "num-bigint", "num-traits", @@ -2612,9 +2524,9 @@ dependencies = [ [[package]] name = "swc_ecma_quote_macros" -version = "0.57.1" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9537bc1a7daca42be1922137f4e59458bd72dd330cf9c96877e191e632bc2a8a" +checksum = "58c2bfa61baf34b971fbc594da376bd5bae014cc56a5c386745b1af4d05872b8" dependencies = [ "anyhow", "proc-macro2", @@ -2629,9 +2541,9 @@ dependencies = [ [[package]] name = "swc_ecma_testing" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f495dae76f1ef3f5be46993b050c3c7f9bf534bcdacf1e40789d32255040776" +checksum = "60432dde66f551adda7014459d28b43f361170a20029b47d163905c6dcfa33cd" dependencies = [ "anyhow", "hex", @@ -2642,9 +2554,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms" -version = "0.232.1" +version = "0.235.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6845e7a7001aa2793225568e0661b55f57352a2103fa28934dd9cbc0d41cd933" +checksum = "bae99435503b117b96ffe1030976270c6ec6bdb6f5c62fcb2ce63674b48b1465" dependencies = [ "swc_atoms", "swc_common", @@ -2656,9 +2568,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" -version = "0.140.1" +version = "0.143.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4341c6272c4feaaf22cc8104f65ebcadac8ad2098dfacb6eb62e8c053698a40d" +checksum = "e7e17b90e275ff25dd0c2a4bf86f5f919dfedcba9ad92041dece26e538715dfd" dependencies = [ "better_scoped_tls", "bitflags", @@ -2691,9 +2603,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_optimization" -version = "0.201.1" +version = "0.204.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f7845e59b50f8f6bf37a4067f6e91aad0c10fd5d2beb18df68b7ea7ee1ea09" +checksum = "3d9951c5bd4c0ab6931505b1e069efce35c3ab7186afdbff9d32fdee74afadc6" dependencies = [ "dashmap", "indexmap", @@ -2715,9 +2627,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_react" -version = "0.186.2" +version = "0.189.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "446da32cac8299973aaf1d37496562bfd0c1e4f3c3ab5d0af6f07f42e8184102" +checksum = "8284a266850bd85c10dbe24ecb792cdc3342e6b1910358771d233be0ce2abe0b" dependencies = [ "base64 0.21.7", "dashmap", @@ -2739,9 +2651,9 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_testing" -version = "0.143.1" +version = "0.146.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774e9741d3377635e9b48b8f118722d758f42e51743789c0852f4b1524b7c428" +checksum = "366434f6d636c0d8590572e6dc479549d50a3451f7176c615781e1c0cee000ef" dependencies = [ "ansi_term", "anyhow", @@ -2765,9 +2677,9 @@ dependencies = [ [[package]] name = "swc_ecma_usage_analyzer" -version = "0.26.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146562ac3515c8de0fa9d479c43ae673cf9df9ece814f8b8130686080a7251ac" +checksum = "d5c353f912a16e3b79001463eb0eabc8d05c5cc2b60ed7c667132274f0f98fa7" dependencies = [ "indexmap", "rustc-hash", @@ -2782,9 +2694,9 @@ dependencies = [ [[package]] name = "swc_ecma_utils" -version = "0.130.1" +version = "0.133.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6a7f430bd83e14f3bf39f01e25806a5c403af73ff2cf94b647132594ddd63c" +checksum = "7d0f4925d0bf2d657d0e9a22efc6e9251ace1cc7f56501a9ef3187d90bf38591" dependencies = [ "indexmap", "num_cpus", @@ -2801,10 +2713,11 @@ dependencies = [ [[package]] name = "swc_ecma_visit" -version = "0.101.0" +version = "0.103.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce0d997f0c9b4e181225f603d161f6757c2a97022258170982cfe005ec69ec92" +checksum = "3fb946e4184f37372ce98b42a576292545ca9f1ae46b62e62e460420fd8992e2" dependencies = [ + "new_debug_unreachable", "num-bigint", "swc_atoms", "swc_common", @@ -2853,9 +2766,9 @@ dependencies = [ [[package]] name = "swc_error_reporters" -version = "0.18.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd8f9a90efb59dc5d918b4470e5d152f34cac2f8733bfba141a96440cab3eff" +checksum = "e02c81943772dc4fb0a6228360552d353fedc1a368ee6d80a5172ecb376b1796" dependencies = [ "anyhow", "miette", @@ -2866,9 +2779,9 @@ dependencies = [ [[package]] name = "swc_fast_graph" -version = "0.22.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00cf5c1687e9858fb9de1ffa90a3e21369095406e97ace870a389320d105b0a" +checksum = "d78cdaedc56703bb852a84434aae862ead825fbcfb65e83bc53d50b91d6405b5" dependencies = [ "indexmap", "petgraph", @@ -2999,9 +2912,9 @@ dependencies = [ [[package]] name = "swc_plugin_proxy" -version = "0.44.0" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98740e5a1ac82ad0de823bcf4aea97a76dce77c1ccff167d148e8a114b2932c0" +checksum = "19712a471479078252c013a33f24a6b9215630a1a75973a0c1532d7235f8abd2" dependencies = [ "better_scoped_tls", "rkyv", @@ -3167,9 +3080,9 @@ dependencies = [ [[package]] name = "swc_timer" -version = "0.22.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f2460de9f00f2af53f65b787c771a6ba90c719d600adb3c71cbb87219646ab4" +checksum = "78cf01b1f8a318614f566145b0016b2a0e84ac66d78c1374cdc3438e06c27740" dependencies = [ "tracing", ] @@ -3187,9 +3100,9 @@ dependencies = [ [[package]] name = "swc_visit" -version = "0.5.14" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043d11fe683dcb934583ead49405c0896a5af5face522e4682c16971ef7871b9" +checksum = "52e2acde04c355dc8ffd62c56f263ba61a94b5c6d21ce2cdeaf857b5d74451a6" dependencies = [ "either", "swc_visit_macros", @@ -3257,24 +3170,14 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "terminal_size" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "testing" -version = "0.36.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27d395aa823f3ad1ad845ed74b96188f493b469794cfbe9ef82f03196064086f" +checksum = "4ab10ecb9cf00ddccd7216451bd3fa5842969ce85c1139e8ddf7c14924a799e2" dependencies = [ "ansi_term", - "cargo_metadata 0.15.4", + "cargo_metadata", "difference", "once_cell", "pretty_assertions", @@ -3306,9 +3209,9 @@ dependencies = [ [[package]] name = "textwrap" -version = "0.15.2" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b3e525a49ec206798b40326a44121291b530c963cfb01018f63e135bac543d" +checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" dependencies = [ "smawk", "unicode-linebreak", @@ -3434,9 +3337,9 @@ dependencies = [ [[package]] name = "triomphe" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859eb650cfee7434994602c3a68b25d77ad9e68c8a6cd491616ef86661382eb3" +checksum = "e6631e42e10b40c0690bf92f404ebcfe6e1fdb480391d15f17cc8e96eeed5369" dependencies = [ "serde", "stable_deref_trait", @@ -3474,9 +3377,9 @@ checksum = "b1b6def86329695390197b82c1e244a54a131ceb66c996f2088a3876e2ae083f" [[package]] name = "unicode-id-start" -version = "1.0.4" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02aebfa694eccbbbffdd92922c7de136b9fe764396d2f10e21bce1681477cfc1" +checksum = "bc3882f69607a2ac8cc4de3ee7993d8f68bb06f2974271195065b3bd07f2edea" [[package]] name = "unicode-ident" @@ -3547,7 +3450,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e27d6bdd219887a9eadd19e1c34f32e47fa332301184935c6d9bca26f3cca525" dependencies = [ "anyhow", - "cargo_metadata 0.18.1", + "cargo_metadata", "regex", "rustversion", ] @@ -3751,7 +3654,7 @@ name = "xtask" version = "0.1.0" dependencies = [ "anyhow", - "cargo_metadata 0.18.1", + "cargo_metadata", "clap", ] From 1e752937c389ae3b6acf092727056d4e8ca9d858 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, 18 Jul 2024 09:42:42 +0900 Subject: [PATCH 03/30] Update --- packages/remove-console/transform/src/lib.rs | 2 +- packages/styled-components/transform/src/utils/analyzer.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/remove-console/transform/src/lib.rs b/packages/remove-console/transform/src/lib.rs index 0db6c7f04..1ab7bcfb6 100644 --- a/packages/remove-console/transform/src/lib.rs +++ b/packages/remove-console/transform/src/lib.rs @@ -33,7 +33,7 @@ struct RemoveConsole { impl RemoveConsole { fn is_global_console(&self, ident: &Ident) -> bool { - &ident.sym == "console" && ident.span.ctxt == self.unresolved_ctxt + &ident.sym == "console" && ident.ctxt == self.unresolved_ctxt } fn should_remove_call(&mut self, n: &CallExpr) -> bool { diff --git a/packages/styled-components/transform/src/utils/analyzer.rs b/packages/styled-components/transform/src/utils/analyzer.rs index 373019f98..4b85055ca 100644 --- a/packages/styled-components/transform/src/utils/analyzer.rs +++ b/packages/styled-components/transform/src/utils/analyzer.rs @@ -84,7 +84,7 @@ impl Visit for Analyzer<'_> { if is_styled { self.state.styled_required = Some(name.id.to_id()); - self.state.unresolved_ctxt = Some(callee.span.ctxt); + self.state.unresolved_ctxt = Some(callee.ctxt); } } } From 0b19c487f3e9271e5ce78978cda151a060834adc 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, 18 Jul 2024 09:43:47 +0900 Subject: [PATCH 04/30] Updagte --- packages/emotion/transform/src/lib.rs | 18 +++++++++--------- .../transform/src/utils/mod.rs | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/emotion/transform/src/lib.rs b/packages/emotion/transform/src/lib.rs index 50bf65a1c..389dbb81f 100644 --- a/packages/emotion/transform/src/lib.rs +++ b/packages/emotion/transform/src/lib.rs @@ -15,10 +15,10 @@ use swc_atoms::JsWord; use swc_common::{comments::Comments, util::take::Take, BytePos, SourceMapperDyn, DUMMY_SP}; use swc_ecma_ast::{ ArrayLit, CallExpr, Callee, ClassDecl, ClassMethod, ClassProp, Expr, ExprOrSpread, FnDecl, Id, - Ident, ImportDecl, ImportSpecifier, JSXAttr, JSXAttrName, JSXAttrOrSpread, JSXAttrValue, - JSXElement, JSXElementName, JSXExpr, JSXExprContainer, JSXObject, KeyValueProp, MemberProp, - MethodProp, ModuleExportName, ObjectLit, Pat, Prop, PropName, PropOrSpread, SourceMapperExt, - SpreadElement, Tpl, VarDeclarator, + Ident, IdentName, ImportDecl, ImportSpecifier, JSXAttr, JSXAttrName, JSXAttrOrSpread, + JSXAttrValue, JSXElement, JSXElementName, JSXExpr, JSXExprContainer, JSXObject, KeyValueProp, + MemberProp, MethodProp, ModuleExportName, ObjectLit, Pat, Prop, PropName, PropOrSpread, + SourceMapperExt, SpreadElement, Tpl, VarDeclarator, }; use swc_ecma_utils::ExprFactory; use swc_ecma_visit::{Fold, FoldWith}; @@ -350,7 +350,7 @@ impl EmotionTransformer { ); self.emotion_target_class_name_count += 1; PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp { - key: PropName::Ident(Ident::new(key.into(), DUMMY_SP)), + key: PropName::Ident(IdentName::new(key.into(), DUMMY_SP)), value: stable_class_name.into(), }))) } @@ -494,7 +494,7 @@ impl Fold for EmotionTransformer { if self.options.auto_label.unwrap_or(false) { args_props.push(PropOrSpread::Prop(Box::new( Prop::KeyValue(KeyValueProp { - key: PropName::Ident(Ident::new( + key: PropName::Ident(IdentName::new( "label".into(), DUMMY_SP, )), @@ -563,7 +563,7 @@ impl Fold for EmotionTransformer { if self.options.auto_label.unwrap_or(false) { args_props.push(PropOrSpread::Prop(Box::new( Prop::KeyValue(KeyValueProp { - key: PropName::Ident(Ident::new( + key: PropName::Ident(IdentName::new( "label".into(), DUMMY_SP, )), @@ -585,14 +585,14 @@ impl Fold for EmotionTransformer { } return CallExpr { span: expr.span, - type_args: expr.type_args, args: expr.args, callee: CallExpr { span: DUMMY_SP, type_args: None, - callee: Ident::new(i.sym.clone(), i.span) + callee: Ident::new(i.sym.clone(), i.span, i.ctxt) .as_callee(), args, + ..Default::default() } .as_callee(), }; diff --git a/packages/styled-components/transform/src/utils/mod.rs b/packages/styled-components/transform/src/utils/mod.rs index 88b04e176..ba81abf8a 100644 --- a/packages/styled-components/transform/src/utils/mod.rs +++ b/packages/styled-components/transform/src/utils/mod.rs @@ -21,7 +21,7 @@ pub(crate) fn get_prop_key_as_expr(p: &Prop) -> Cow { pub(crate) fn prop_name_to_expr(p: &PropName) -> Cow { match p { - PropName::Ident(p) => Cow::Owned(Expr::Ident(p.clone())), + PropName::Ident(p) => Cow::Owned(Expr::Ident(p.clone().into())), PropName::Str(p) => Cow::Owned(Expr::Lit(Lit::Str(p.clone()))), PropName::Num(p) => Cow::Owned(Expr::Lit(Lit::Num(p.clone()))), PropName::BigInt(p) => Cow::Owned(Expr::Lit(Lit::BigInt(p.clone()))), @@ -42,9 +42,9 @@ pub(crate) fn get_prop_name(p: &Prop) -> Option<&PropName> { pub(crate) fn get_prop_name2(p: &Prop) -> PropName { match p { - Prop::Shorthand(ident) => PropName::Ident(ident.clone()), + Prop::Shorthand(ident) => PropName::Ident(ident.clone().into()), Prop::KeyValue(p) => p.key.clone(), - Prop::Assign(x) => PropName::Ident(x.key.clone()), + Prop::Assign(x) => PropName::Ident(x.key.clone().into()), Prop::Getter(p) => p.key.clone(), Prop::Setter(p) => p.key.clone(), Prop::Method(p) => p.key.clone(), From ed52c8ffef20631ed42eebe2487c0c941fe906ea 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, 18 Jul 2024 09:45:49 +0900 Subject: [PATCH 05/30] Updagte --- packages/emotion/transform/src/lib.rs | 20 ++++++++------------ packages/jest/src/lib.rs | 12 ++++++------ packages/loadable-components/src/lib.rs | 12 +++--------- 3 files changed, 17 insertions(+), 27 deletions(-) diff --git a/packages/emotion/transform/src/lib.rs b/packages/emotion/transform/src/lib.rs index 389dbb81f..d2294d0c9 100644 --- a/packages/emotion/transform/src/lib.rs +++ b/packages/emotion/transform/src/lib.rs @@ -588,13 +588,13 @@ impl Fold for EmotionTransformer { args: expr.args, callee: CallExpr { span: DUMMY_SP, - type_args: None, callee: Ident::new(i.sym.clone(), i.span, i.ctxt) .as_callee(), args, ..Default::default() } .as_callee(), + ..Default::default() }; } } @@ -671,7 +671,7 @@ impl Fold for EmotionTransformer { if self.options.auto_label.unwrap_or(false) { object_props.push(PropOrSpread::Prop(Box::new( Prop::KeyValue(KeyValueProp { - key: PropName::Ident(Ident::new( + key: PropName::Ident(IdentName::new( "label".into(), DUMMY_SP, )), @@ -732,7 +732,7 @@ impl Fold for EmotionTransformer { } args }, - type_args: None, + ..Default::default() }); } } @@ -754,10 +754,9 @@ impl Fold for EmotionTransformer { } } return Expr::Call(CallExpr { - span: DUMMY_SP, callee: i.take().as_callee(), args, - type_args: None, + ..Default::default() }); } } @@ -774,7 +773,7 @@ impl Fold for EmotionTransformer { if self.options.auto_label.unwrap_or(false) { object_props.push(PropOrSpread::Prop(Box::new( Prop::KeyValue(KeyValueProp { - key: PropName::Ident(Ident::new( + key: PropName::Ident(IdentName::new( "label".into(), DUMMY_SP, )), @@ -793,11 +792,7 @@ impl Fold for EmotionTransformer { self.comments.add_pure_comment(member_expr.span.lo()); return Expr::Call(CallExpr { - span: DUMMY_SP, - type_args: None, callee: CallExpr { - type_args: None, - span: DUMMY_SP, callee: i.take().as_callee(), args: vec![ prop.take().sym.as_arg(), @@ -807,9 +802,11 @@ impl Fold for EmotionTransformer { }) .as_arg(), ], + ..Default::default() } .as_callee(), args, + ..Default::default() }); } } @@ -820,7 +817,6 @@ impl Fold for EmotionTransformer { { self.comments.add_pure_comment(member_expr.span.lo()); return Expr::Call(CallExpr { - span: DUMMY_SP, callee: member_expr.take().as_callee(), args: { let mut args = self.create_args_from_tagged_tpl( @@ -836,7 +832,7 @@ impl Fold for EmotionTransformer { } args }, - type_args: None, + ..Default::default() }); } } diff --git a/packages/jest/src/lib.rs b/packages/jest/src/lib.rs index 7202bade0..5e3028656 100644 --- a/packages/jest/src/lib.rs +++ b/packages/jest/src/lib.rs @@ -59,18 +59,18 @@ impl Jest { ) => match &*callee.obj { Expr::Ident(i) if i.sym == *"jest" => match prop { _ if HOIST_METHODS.contains(&*prop.sym) => { - hoisted.push(T::from_stmt(stmt)); + hoisted.push(T::from(stmt)); } - _ => new.push(T::from_stmt(stmt)), + _ => new.push(T::from(stmt)), }, - _ => new.push(T::from_stmt(stmt)), + _ => new.push(T::from(stmt)), }, - _ => new.push(T::from_stmt(stmt)), + _ => new.push(T::from(stmt)), }, - _ => new.push(T::from_stmt(stmt)), + _ => new.push(T::from(stmt)), }, - _ => new.push(T::from_stmt(stmt)), + _ => new.push(T::from(stmt)), }, Err(node) => new.push(node), }; diff --git a/packages/loadable-components/src/lib.rs b/packages/loadable-components/src/lib.rs index bb67be2d8..0cdac7249 100644 --- a/packages/loadable-components/src/lib.rs +++ b/packages/loadable-components/src/lib.rs @@ -321,19 +321,16 @@ where key: PropName::Ident(quote_ident!("chunkName")), function: Box::new(Function { params: clone_params(func), - decorators: Default::default(), - span: DUMMY_SP, body: Some(BlockStmt { - span: DUMMY_SP, stmts: vec![Stmt::Return(ReturnStmt { span: DUMMY_SP, arg: Some(Box::new(self.replace_chunk_name(import))), })], + ..Default::default() }), is_generator: false, is_async: false, - type_params: Default::default(), - return_type: Default::default(), + ..Default::default() }), } } @@ -347,8 +344,6 @@ where decorators: Default::default(), pat: Pat::Ident(quote_ident!("props").into()), }], - decorators: Default::default(), - span: DUMMY_SP, body: Some( quote!( " @@ -370,8 +365,7 @@ where ), is_generator: false, is_async: false, - type_params: Default::default(), - return_type: Default::default(), + ..Default::default() }), } } From 05a3f5d2553a7ce0d08757711c5f2d0bf759857b 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, 18 Jul 2024 09:48:07 +0900 Subject: [PATCH 06/30] Update --- packages/loadable-components/src/lib.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/loadable-components/src/lib.rs b/packages/loadable-components/src/lib.rs index 0cdac7249..394be0aae 100644 --- a/packages/loadable-components/src/lib.rs +++ b/packages/loadable-components/src/lib.rs @@ -386,8 +386,6 @@ where decorators: Default::default(), pat: Pat::Ident(quote_ident!("props").into()), }], - decorators: Default::default(), - span: DUMMY_SP, body: Some( quote!( " @@ -405,8 +403,7 @@ where ), is_generator: false, is_async: false, - type_params: Default::default(), - return_type: Default::default(), + ..Default::default() }), } } @@ -420,8 +417,6 @@ where decorators: Default::default(), pat: Pat::Ident(quote_ident!("props").into()), }], - decorators: Default::default(), - span: DUMMY_SP, body: Some( quote!( " @@ -440,8 +435,7 @@ where ), is_generator: false, is_async: false, - type_params: Default::default(), - return_type: Default::default(), + ..Default::default() }), } } From 63b8e58b1b8a6e7c6ec9118ef5dcec963250adcc 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, 18 Jul 2024 09:48:49 +0900 Subject: [PATCH 07/30] Update --- packages/relay/transform/src/lib.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/relay/transform/src/lib.rs b/packages/relay/transform/src/lib.rs index 1e7c0c0b1..004d5f82f 100644 --- a/packages/relay/transform/src/lib.rs +++ b/packages/relay/transform/src/lib.rs @@ -12,7 +12,7 @@ use once_cell::sync::Lazy; use regex::Regex; use serde::Deserialize; use swc_atoms::JsWord; -use swc_common::{FileName, Mark, DUMMY_SP}; +use swc_common::{FileName, Mark, SyntaxContext, DUMMY_SP}; use swc_ecma_ast::*; use swc_ecma_utils::{prepend_stmts, quote_ident, ExprFactory}; use swc_ecma_visit::{Fold, FoldWith}; @@ -86,10 +86,11 @@ impl RelayImport { specifiers: vec![ImportSpecifier::Default(ImportDefaultSpecifier { span: Default::default(), local: Ident { - span: self + ctxt: self .unresolved_mark - .map(|m| DUMMY_SP.apply_mark(m)) + .map(|m| SyntaxContext::empty().apply_mark(m)) .unwrap_or_default(), + span: DUMMY_SP, sym: self.item.clone(), optional: false, }, From e9f3a01ddad6da8cfc07ead5e25abc95ceeabc46 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, 18 Jul 2024 09:49:07 +0900 Subject: [PATCH 08/30] Update --- packages/styled-jsx/transform/src/transform_css_swc.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/styled-jsx/transform/src/transform_css_swc.rs b/packages/styled-jsx/transform/src/transform_css_swc.rs index e3319fd33..e0d9530b0 100644 --- a/packages/styled-jsx/transform/src/transform_css_swc.rs +++ b/packages/styled-jsx/transform/src/transform_css_swc.rs @@ -2,8 +2,8 @@ use std::{panic, sync::Arc}; use anyhow::{bail, Error}; use swc_common::{ - errors::HANDLER, source_map::Pos, util::take::Take, BytePos, SourceMap, Span, Spanned, - SyntaxContext, DUMMY_SP, + errors::HANDLER, source_map::SmallPos, util::take::Take, BytePos, SourceMap, Span, Spanned, + DUMMY_SP, }; use swc_css_ast::{ ClassSelector, Combinator, CombinatorValue, ComplexSelector, ComplexSelectorChildren, @@ -366,7 +366,6 @@ fn get_front_selector_tokens(selector_tokens: &Tokens) -> Vec { span: Span { lo: BytePos(start_pos), hi: BytePos(start_pos + 1), - ctxt: SyntaxContext::empty(), }, token: Token::Ident { raw: "a".into(), @@ -377,7 +376,6 @@ fn get_front_selector_tokens(selector_tokens: &Tokens) -> Vec { span: Span { lo: BytePos(start_pos + 1), hi: BytePos(start_pos + 2), - ctxt: SyntaxContext::empty(), }, token: Token::WhiteSpace { value: " ".into() }, }, From 7ea34f029ce9865c53f28df453217c18cd8e1a26 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, 18 Jul 2024 09:50:42 +0900 Subject: [PATCH 09/30] Update --- packages/styled-jsx/transform/src/utils.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/styled-jsx/transform/src/utils.rs b/packages/styled-jsx/transform/src/utils.rs index 42b16dc2e..58fe9ba42 100644 --- a/packages/styled-jsx/transform/src/utils.rs +++ b/packages/styled-jsx/transform/src/utils.rs @@ -216,10 +216,9 @@ pub fn make_local_styled_jsx_el( _ => style_info.hash.clone(), }; let mut attrs = vec![JSXAttrOrSpread::JSXAttr(JSXAttr { - name: JSXAttrName::Ident(Ident { + name: JSXAttrName::Ident(IdentName { sym: "id".into(), - span: DUMMY_SP, - optional: false, + ..Default::default() }), value: Some(JSXAttrValue::JSXExprContainer(JSXExprContainer { expr: JSXExpr::Expr(Box::new(string_literal_expr( @@ -232,10 +231,9 @@ pub fn make_local_styled_jsx_el( if style_info.is_dynamic { attrs.push(JSXAttrOrSpread::JSXAttr(JSXAttr { - name: JSXAttrName::Ident(Ident { + name: JSXAttrName::Ident(IdentName { sym: "dynamic".into(), span: DUMMY_SP, - optional: false, }), value: Some(JSXAttrValue::JSXExprContainer(JSXExprContainer { expr: JSXExpr::Expr(Box::new(Expr::Array(ArrayLit { From 88ba224997c4a387e52802ef88e82b51ffa99eb4 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, 18 Jul 2024 09:57:13 +0900 Subject: [PATCH 10/30] Update --- packages/relay/transform/src/lib.rs | 2 +- .../src/visitors/transpile_css_prop/transpile.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/relay/transform/src/lib.rs b/packages/relay/transform/src/lib.rs index 004d5f82f..990406723 100644 --- a/packages/relay/transform/src/lib.rs +++ b/packages/relay/transform/src/lib.rs @@ -183,7 +183,7 @@ fn build_require_expr_from_path(path: &str, mark: Option) -> Expr { raw: None, }) .as_arg()], - type_args: None, + ..Default::default() }) } diff --git a/packages/styled-components/transform/src/visitors/transpile_css_prop/transpile.rs b/packages/styled-components/transform/src/visitors/transpile_css_prop/transpile.rs index f49064ee9..3508d4f4c 100644 --- a/packages/styled-components/transform/src/visitors/transpile_css_prop/transpile.rs +++ b/packages/styled-components/transform/src/visitors/transpile_css_prop/transpile.rs @@ -296,13 +296,13 @@ impl VisitMut for TranspileCssProp { span: DUMMY_SP, callee: styled.as_callee(), args: vec![css.as_arg()], - type_args: Default::default(), + ..Default::default() })), _ => Box::new(Expr::TaggedTpl(TaggedTpl { span: DUMMY_SP, tag: Box::new(styled), - type_params: Default::default(), tpl: Box::new(css.expect_tpl()), + ..Default::default() })), }), definite: false, @@ -589,10 +589,10 @@ fn set_key_of_prop(prop: &mut Prop, key: Box) { }); } -fn get_local_identifier(idx: &mut usize, expr: &Expr) -> Ident { +fn get_local_identifier(idx: &mut usize, expr: &Expr) -> IdentName { *idx += 1; - let identifier = quote_ident!(expr.span(), append_if_gt_one("$_css", *idx)); + let identifier = IdentName::new(append_if_gt_one("$_css", *idx).into(), expr.span()); // TODO: Unique identifier From 9c06feffc7c57a46dd5c77c35d5fcfb3dece5304 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, 18 Jul 2024 09:58:05 +0900 Subject: [PATCH 11/30] Update --- packages/loadable-components/src/lib.rs | 5 +---- .../transform/src/visitors/template_literals.rs | 2 +- packages/styled-jsx/transform/src/visitor.rs | 3 ++- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/loadable-components/src/lib.rs b/packages/loadable-components/src/lib.rs index 394be0aae..f73c909ed 100644 --- a/packages/loadable-components/src/lib.rs +++ b/packages/loadable-components/src/lib.rs @@ -451,8 +451,6 @@ where key: PropName::Ident(quote_ident!("resolve")), function: Box::new(Function { params: clone_params(func), - decorators: Default::default(), - span: DUMMY_SP, body: Some( quote!( " @@ -470,8 +468,7 @@ where ), is_generator: false, is_async: false, - type_params: Default::default(), - return_type: Default::default(), + ..Default::default() }), } } diff --git a/packages/styled-components/transform/src/visitors/template_literals.rs b/packages/styled-components/transform/src/visitors/template_literals.rs index 61f7f309d..520d8ee1c 100644 --- a/packages/styled-components/transform/src/visitors/template_literals.rs +++ b/packages/styled-components/transform/src/visitors/template_literals.rs @@ -63,7 +63,7 @@ impl VisitMut for TemplateLiterals { span: tagged.span, callee: tagged.tag.into(), args, - type_args: tagged.type_params, + ..Default::default() }) }); } diff --git a/packages/styled-jsx/transform/src/visitor.rs b/packages/styled-jsx/transform/src/visitor.rs index c0bc81ea5..196389fc8 100644 --- a/packages/styled-jsx/transform/src/visitor.rs +++ b/packages/styled-jsx/transform/src/visitor.rs @@ -349,7 +349,8 @@ impl Fold for StyledJSXTransformer<'_> { name: Pat::Ident(BindingIdent { id: Ident { sym: default_ident.0.clone(), - span: DUMMY_SP.with_ctxt(default_ident.1), + ctxt: default_ident.1, + span: DUMMY_SP, optional: false, }, type_ann: None, From d25b0ee8ecaeadf0be2d546bd13700baf05a78ec 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, 18 Jul 2024 09:58:49 +0900 Subject: [PATCH 12/30] Update --- packages/styled-jsx/transform/src/utils.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/styled-jsx/transform/src/utils.rs b/packages/styled-jsx/transform/src/utils.rs index 58fe9ba42..3084f8cba 100644 --- a/packages/styled-jsx/transform/src/utils.rs +++ b/packages/styled-jsx/transform/src/utils.rs @@ -163,8 +163,7 @@ pub fn make_external_styled_jsx_el(style: &ExternalStyle, style_import_name: &st let attrs = vec![JSXAttrOrSpread::JSXAttr(JSXAttr { name: JSXAttrName::Ident(Ident { sym: "id".into(), - span: DUMMY_SP, - optional: false, + ..Default::default() }), value: Some(JSXAttrValue::JSXExprContainer(JSXExprContainer { expr: JSXExpr::Expr(Box::new(style.expr.clone())), @@ -175,8 +174,7 @@ pub fn make_external_styled_jsx_el(style: &ExternalStyle, style_import_name: &st let opening = JSXOpeningElement { name: JSXElementName::Ident(Ident { sym: style_import_name.into(), - span: DUMMY_SP, - optional: false, + ..Default::default() }), attrs, span: DUMMY_SP, From 3279a331d8628df347f6768f5cadab900027693b 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, 18 Jul 2024 09:59:38 +0900 Subject: [PATCH 13/30] Update --- packages/styled-jsx/transform/src/utils.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/packages/styled-jsx/transform/src/utils.rs b/packages/styled-jsx/transform/src/utils.rs index 3084f8cba..b55997cab 100644 --- a/packages/styled-jsx/transform/src/utils.rs +++ b/packages/styled-jsx/transform/src/utils.rs @@ -66,13 +66,11 @@ pub fn compute_class_names( callee: Callee::Expr(Box::new(Expr::Member(MemberExpr { obj: Box::new(Expr::Ident(Ident { sym: style_import_name.into(), - span: DUMMY_SP, - optional: false, + ..Default::default() })), - prop: MemberProp::Ident(Ident { + prop: MemberProp::Ident(IdentName { sym: "dynamic".into(), span: DUMMY_SP, - optional: false, }), span: DUMMY_SP, }))), @@ -121,8 +119,7 @@ pub fn compute_class_names( })), spread: None, }], - span: DUMMY_SP, - type_args: None, + ..Default::default() })), }; @@ -161,7 +158,7 @@ pub fn compute_class_names( pub fn make_external_styled_jsx_el(style: &ExternalStyle, style_import_name: &str) -> JSXElement { let attrs = vec![JSXAttrOrSpread::JSXAttr(JSXAttr { - name: JSXAttrName::Ident(Ident { + name: JSXAttrName::Ident(IdentName { sym: "id".into(), ..Default::default() }), @@ -185,8 +182,7 @@ pub fn make_external_styled_jsx_el(style: &ExternalStyle, style_import_name: &st let closing = Some(JSXClosingElement { name: JSXElementName::Ident(Ident { sym: style_import_name.into(), - span: DUMMY_SP, - optional: false, + ..Default::default() }), span: DUMMY_SP, }); From 43bd72a14dfa664f85c02af7250ea9710328c658 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, 18 Jul 2024 10:04:27 +0900 Subject: [PATCH 14/30] Update --- .../transform/src/transform_css_lightningcss.rs | 2 +- packages/styled-jsx/transform/src/utils.rs | 6 ++---- packages/styled-jsx/transform/src/visitor.rs | 10 ++++------ 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/packages/styled-jsx/transform/src/transform_css_lightningcss.rs b/packages/styled-jsx/transform/src/transform_css_lightningcss.rs index 3c430a470..f27b72d44 100644 --- a/packages/styled-jsx/transform/src/transform_css_lightningcss.rs +++ b/packages/styled-jsx/transform/src/transform_css_lightningcss.rs @@ -61,7 +61,7 @@ fn report( let mut db = DiagnosticBuilder::new(handler, level, &err.kind.to_string()); if let Some(lo) = lo { - db.set_span(Span::new(lo, lo, Default::default())); + db.set_span(Span::new(lo, lo)); } db.emit(); diff --git a/packages/styled-jsx/transform/src/utils.rs b/packages/styled-jsx/transform/src/utils.rs index b55997cab..4af9f19bf 100644 --- a/packages/styled-jsx/transform/src/utils.rs +++ b/packages/styled-jsx/transform/src/utils.rs @@ -252,8 +252,7 @@ pub fn make_local_styled_jsx_el( let opening = JSXOpeningElement { name: JSXElementName::Ident(Ident { sym: style_import_name.into(), - span: DUMMY_SP, - optional: false, + ..Default::default() }), attrs, span: DUMMY_SP, @@ -264,8 +263,7 @@ pub fn make_local_styled_jsx_el( let closing = Some(JSXClosingElement { name: JSXElementName::Ident(Ident { sym: style_import_name.into(), - span: DUMMY_SP, - optional: false, + ..Default::default() }), span: DUMMY_SP, }); diff --git a/packages/styled-jsx/transform/src/visitor.rs b/packages/styled-jsx/transform/src/visitor.rs index 196389fc8..5472052f1 100644 --- a/packages/styled-jsx/transform/src/visitor.rs +++ b/packages/styled-jsx/transform/src/visitor.rs @@ -702,10 +702,9 @@ impl StyledJSXTransformer<'_> { return Ok(Expr::Object(ObjectLit { props: vec![ PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp { - key: PropName::Ident(Ident { + key: PropName::Ident(IdentName { sym: "styles".into(), - span: DUMMY_SP, - optional: false, + ..Default::default() }), value: Box::new(Expr::JSXElement(Box::new(make_local_styled_jsx_el( style, @@ -715,10 +714,9 @@ impl StyledJSXTransformer<'_> { )))), }))), PropOrSpread::Prop(Box::new(Prop::KeyValue(KeyValueProp { - key: PropName::Ident(Ident { + key: PropName::Ident(IdentName { sym: "className".into(), - span: DUMMY_SP, - optional: false, + ..Default::default() }), value: Box::new(class_name.unwrap()), }))), From 123fec448d36e90cf627b0e2024c726ab15f4041 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, 18 Jul 2024 10:25:42 +0900 Subject: [PATCH 15/30] Update swc_core --- packages/emotion/Cargo.toml | 2 +- packages/jest/Cargo.toml | 2 +- packages/loadable-components/Cargo.toml | 2 +- packages/noop/Cargo.toml | 2 +- packages/prefresh/Cargo.toml | 2 +- packages/prefresh/transform/Cargo.toml | 2 +- packages/react-remove-properties/Cargo.toml | 2 +- packages/relay/Cargo.toml | 2 +- packages/remove-console/Cargo.toml | 2 +- packages/styled-components/Cargo.toml | 2 +- packages/styled-jsx/Cargo.toml | 2 +- packages/swc-confidential/Cargo.toml | 2 +- packages/swc-magic/Cargo.toml | 2 +- packages/transform-imports/Cargo.toml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/emotion/Cargo.toml b/packages/emotion/Cargo.toml index b5ff8fd80..c45bd70fa 100644 --- a/packages/emotion/Cargo.toml +++ b/packages/emotion/Cargo.toml @@ -18,7 +18,7 @@ crate-type = ["cdylib", "rlib"] serde = "1" serde_json = "1.0.117" swc_common = { version = "0.36.0", features = ["concurrent"] } -swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } +swc_core = { version = "0.99.1", features = ["ecma_plugin_transform"] } swc_ecma_ast = "0.117.0" swc_ecma_utils = "0.133.0" swc_ecma_visit = "0.103.0" diff --git a/packages/jest/Cargo.toml b/packages/jest/Cargo.toml index d3c2ca762..502e4d4cd 100644 --- a/packages/jest/Cargo.toml +++ b/packages/jest/Cargo.toml @@ -18,7 +18,7 @@ crate-type = ["cdylib", "rlib"] phf = { version = "0.11.2", features = ["macros"] } serde = { version = "1.0.201", features = ["derive"] } swc_common = { version = "0.36.0", features = ["concurrent"] } -swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } +swc_core = { version = "0.99.1", features = ["ecma_plugin_transform"] } swc_ecma_ast = "0.117.0" swc_ecma_utils = "0.133.0" swc_ecma_visit = "0.103.0" diff --git a/packages/loadable-components/Cargo.toml b/packages/loadable-components/Cargo.toml index 2b84b728d..f16fd750a 100644 --- a/packages/loadable-components/Cargo.toml +++ b/packages/loadable-components/Cargo.toml @@ -21,7 +21,7 @@ regex = "1.10.4" serde = { version = "1.0.203", features = ["derive"] } serde_json = "1.0.117" swc_common = { version = "0.36.0", features = ["concurrent"] } -swc_core = { version = "0.99.0", features = [ +swc_core = { version = "0.99.1", features = [ "ecma_quote", "ecma_plugin_transform", ] } diff --git a/packages/noop/Cargo.toml b/packages/noop/Cargo.toml index a3f3f99e3..2a561f061 100644 --- a/packages/noop/Cargo.toml +++ b/packages/noop/Cargo.toml @@ -19,7 +19,7 @@ crate-type = ["cdylib", "rlib"] [dependencies] swc_common = { version = "0.36.0", features = ["concurrent"] } -swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } +swc_core = { version = "0.99.1", features = ["ecma_plugin_transform"] } swc_ecma_ast = "0.117.0" swc_ecma_utils = "0.133.0" swc_ecma_visit = "0.103.0" diff --git a/packages/prefresh/Cargo.toml b/packages/prefresh/Cargo.toml index 1bb4d9519..5158b7652 100644 --- a/packages/prefresh/Cargo.toml +++ b/packages/prefresh/Cargo.toml @@ -20,6 +20,6 @@ crate-type = ["cdylib", "rlib"] [dependencies] serde_json = "1.0.117" swc_common = { version = "0.36.0" } -swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } +swc_core = { version = "0.99.1", features = ["ecma_plugin_transform"] } swc_prefresh = { path = "./transform" } diff --git a/packages/prefresh/transform/Cargo.toml b/packages/prefresh/transform/Cargo.toml index d8b2101a9..a7f65fa17 100644 --- a/packages/prefresh/transform/Cargo.toml +++ b/packages/prefresh/transform/Cargo.toml @@ -16,7 +16,7 @@ version = "0.1.1" serde = { version = "1", features = ["derive"] } swc_atoms = "0.6.7" swc_common = "0.36.0" -swc_core = { version = "0.99.0", features = ["ecma_quote"] } +swc_core = { version = "0.99.1", features = ["ecma_quote"] } swc_ecma_ast = "0.117.0" swc_ecma_visit = "0.103.0" diff --git a/packages/react-remove-properties/Cargo.toml b/packages/react-remove-properties/Cargo.toml index 765b7a591..f5361a9f9 100644 --- a/packages/react-remove-properties/Cargo.toml +++ b/packages/react-remove-properties/Cargo.toml @@ -22,7 +22,7 @@ react_remove_properties = { path = "./transform" } serde_json = "1.0.117" swc_cached = "0.3.20" swc_common = { version = "0.36.0", features = ["concurrent"] } -swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } +swc_core = { version = "0.99.1", features = ["ecma_plugin_transform"] } swc_ecma_ast = "0.117.0" swc_ecma_utils = "0.133.0" swc_ecma_visit = "0.103.0" diff --git a/packages/relay/Cargo.toml b/packages/relay/Cargo.toml index 9d200328d..3453cc7ff 100644 --- a/packages/relay/Cargo.toml +++ b/packages/relay/Cargo.toml @@ -20,7 +20,7 @@ regex = "1.10" serde = "1" serde_json = "1" swc_common = { version = "0.36.0", features = ["concurrent"] } -swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } +swc_core = { version = "0.99.1", features = ["ecma_plugin_transform"] } swc_ecma_ast = "0.117.0" swc_ecma_utils = "0.133.0" swc_ecma_visit = "0.103.0" diff --git a/packages/remove-console/Cargo.toml b/packages/remove-console/Cargo.toml index e056b4519..276b69ffd 100644 --- a/packages/remove-console/Cargo.toml +++ b/packages/remove-console/Cargo.toml @@ -21,7 +21,7 @@ crate-type = ["cdylib", "rlib"] remove_console = { path = "./transform" } serde_json = "1.0.117" swc_common = { version = "0.36.0", features = ["concurrent"] } -swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } +swc_core = { version = "0.99.1", features = ["ecma_plugin_transform"] } swc_ecma_ast = "0.117.0" swc_ecma_utils = "0.133.0" swc_ecma_visit = "0.103.0" diff --git a/packages/styled-components/Cargo.toml b/packages/styled-components/Cargo.toml index 00be274a2..700f0ff57 100644 --- a/packages/styled-components/Cargo.toml +++ b/packages/styled-components/Cargo.toml @@ -23,7 +23,7 @@ serde_json = "1.0.117" styled_components = { path = "./transform" } swc_atoms = "0.6.7" swc_common = { version = "0.36.0", features = ["concurrent"] } -swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } +swc_core = { version = "0.99.1", features = ["ecma_plugin_transform"] } swc_ecma_ast = "0.117.0" swc_ecma_utils = "0.133.0" swc_ecma_visit = "0.103.0" diff --git a/packages/styled-jsx/Cargo.toml b/packages/styled-jsx/Cargo.toml index 2bc4490e2..45d76c658 100644 --- a/packages/styled-jsx/Cargo.toml +++ b/packages/styled-jsx/Cargo.toml @@ -26,7 +26,7 @@ serde_json = "1" styled_jsx = { path = "./transform" } swc_atoms = "0.6.7" swc_common = "0.36.0" -swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } +swc_core = { version = "0.99.1", features = ["ecma_plugin_transform"] } swc_ecma_ast = "0.117.0" swc_ecma_minifier = "0.200.0" swc_ecma_parser = "0.148.0" diff --git a/packages/swc-confidential/Cargo.toml b/packages/swc-confidential/Cargo.toml index 5dad2f8dc..13067c094 100644 --- a/packages/swc-confidential/Cargo.toml +++ b/packages/swc-confidential/Cargo.toml @@ -19,7 +19,7 @@ crate-type = ["cdylib", "rlib"] [dependencies] serde_json = "1.0.117" -swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } +swc_core = { version = "0.99.1", features = ["ecma_plugin_transform"] } swc_confidential = { path = "./transform" } diff --git a/packages/swc-magic/Cargo.toml b/packages/swc-magic/Cargo.toml index 0b2624fca..e71b5f1c5 100644 --- a/packages/swc-magic/Cargo.toml +++ b/packages/swc-magic/Cargo.toml @@ -19,7 +19,7 @@ crate-type = ["cdylib", "rlib"] [dependencies] serde_json = "1.0.117" -swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } +swc_core = { version = "0.99.1", features = ["ecma_plugin_transform"] } swc_magic = { path = "./transform" } diff --git a/packages/transform-imports/Cargo.toml b/packages/transform-imports/Cargo.toml index c8620e05e..8a4638734 100644 --- a/packages/transform-imports/Cargo.toml +++ b/packages/transform-imports/Cargo.toml @@ -21,7 +21,7 @@ crate-type = ["cdylib", "rlib"] modularize_imports = { path = "./transform" } serde_json = "1.0.117" swc_common = { version = "0.36.0", features = ["concurrent"] } -swc_core = { version = "0.99.0", features = ["ecma_plugin_transform"] } +swc_core = { version = "0.99.1", features = ["ecma_plugin_transform"] } swc_ecma_ast = "0.117.0" swc_ecma_utils = "0.133.0" swc_ecma_visit = "0.103.0" From 5bab4636b0eb38b7a29b2f58c85ae1e0273eff52 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, 18 Jul 2024 10:25:47 +0900 Subject: [PATCH 16/30] cargo lockfile --- Cargo.lock | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 018606d32..329f20542 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -554,7 +554,7 @@ dependencies = [ "cssparser-macros", "dtoa-short", "itoa", - "phf 0.11.2", + "phf 0.10.1", "smallvec", ] @@ -1426,7 +1426,9 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" dependencies = [ + "phf_macros 0.10.0", "phf_shared 0.10.0", + "proc-macro-hack", ] [[package]] @@ -1435,7 +1437,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ - "phf_macros", + "phf_macros 0.11.2", "phf_shared 0.11.2", ] @@ -1469,6 +1471,20 @@ dependencies = [ "rand", ] +[[package]] +name = "phf_macros" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0" +dependencies = [ + "phf_generator 0.10.0", + "phf_shared 0.10.0", + "proc-macro-hack", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "phf_macros" version = "0.11.2" @@ -1546,6 +1562,12 @@ dependencies = [ "yansi", ] +[[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.82" @@ -2266,9 +2288,9 @@ dependencies = [ [[package]] name = "swc_core" -version = "0.99.0" +version = "0.99.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c71c1838f46553835f609b5e14aabf57d5e93e87fd050129fc78d6b6c41f3bc" +checksum = "8340368a00090b7befd8f26aa376aa109bcc4fd1aa1970840e63cc988e14b980" dependencies = [ "once_cell", "swc_allocator", @@ -2524,9 +2546,9 @@ dependencies = [ [[package]] name = "swc_ecma_quote_macros" -version = "0.59.0" +version = "0.59.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58c2bfa61baf34b971fbc594da376bd5bae014cc56a5c386745b1af4d05872b8" +checksum = "743fb9ee2dd1b4557c80018eb8f37f0028dc4098c474838a1fea63b357fadfd5" dependencies = [ "anyhow", "proc-macro2", From a0b56e2563ea5c2198ece0c614d21eae69ced48f 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, 18 Jul 2024 10:26:54 +0900 Subject: [PATCH 17/30] Fix more --- packages/loadable-components/src/lib.rs | 2 +- packages/prefresh/transform/src/lib.rs | 3 +-- packages/relay/transform/src/lib.rs | 9 +++++---- packages/styled-components/transform/src/utils/mod.rs | 2 +- .../transform/src/visitors/display_name_and_id.rs | 2 +- .../src/visitors/transpile_css_prop/transpile.rs | 4 +--- 6 files changed, 10 insertions(+), 12 deletions(-) diff --git a/packages/loadable-components/src/lib.rs b/packages/loadable-components/src/lib.rs index f73c909ed..efdfc8bc7 100644 --- a/packages/loadable-components/src/lib.rs +++ b/packages/loadable-components/src/lib.rs @@ -549,7 +549,7 @@ where .as_arg(), "-".as_arg(), ], - type_args: Default::default(), + ..Default::default() }) } diff --git a/packages/prefresh/transform/src/lib.rs b/packages/prefresh/transform/src/lib.rs index 08fced709..7c166bf17 100644 --- a/packages/prefresh/transform/src/lib.rs +++ b/packages/prefresh/transform/src/lib.rs @@ -155,9 +155,8 @@ impl VisitMut for PrefreshPlugin { .skip(1) .map(|s| { Box::new(Expr::Ident(Ident { - span: DUMMY_SP, sym: Atom::from(s.replace('}', "").to_string()), - optional: false, + ..Default::default() })) }) .collect::>(); diff --git a/packages/relay/transform/src/lib.rs b/packages/relay/transform/src/lib.rs index 990406723..8a0287f64 100644 --- a/packages/relay/transform/src/lib.rs +++ b/packages/relay/transform/src/lib.rs @@ -173,7 +173,8 @@ fn build_require_expr_from_path(path: &str, mark: Option) -> Expr { Expr::Call(CallExpr { span: Default::default(), callee: quote_ident!( - mark.map(|m| DUMMY_SP.apply_mark(m)).unwrap_or(DUMMY_SP), + mark.map(|m| SyntaxContext::empty().apply_mark(m)) + .unwrap_or_default(), "require" ) .as_callee(), @@ -317,12 +318,12 @@ impl Relay { unresolved_mark: self.unresolved_mark, }); let operation_ident = Ident { - span: self + ctxt: self .unresolved_mark - .map(|m| DUMMY_SP.apply_mark(m)) + .map(|m| SyntaxContext::empty().apply_mark(m)) .unwrap_or_default(), sym: ident_name, - optional: false, + ..Default::default() }; Some(Expr::Ident(operation_ident)) } else { diff --git a/packages/styled-components/transform/src/utils/mod.rs b/packages/styled-components/transform/src/utils/mod.rs index ba81abf8a..31a8ca4b1 100644 --- a/packages/styled-components/transform/src/utils/mod.rs +++ b/packages/styled-components/transform/src/utils/mod.rs @@ -93,7 +93,7 @@ impl State { }) => { if let Expr::Ident(obj) = &**obj { if Some(obj.to_id()) == self.import_local_name("default", Some(obj)) - && !self.is_helper(&Expr::Ident(prop.clone())) + && !self.is_helper(&Expr::Ident(prop.clone().into())) { return true; } diff --git a/packages/styled-components/transform/src/visitors/display_name_and_id.rs b/packages/styled-components/transform/src/visitors/display_name_and_id.rs index 9f22fb03a..c4c0c6d68 100644 --- a/packages/styled-components/transform/src/visitors/display_name_and_id.rs +++ b/packages/styled-components/transform/src/visitors/display_name_and_id.rs @@ -222,7 +222,7 @@ impl DisplayNameAndId { props: with_config_props, } .as_arg()], - type_args: Default::default(), + ..Default::default() })); return; } diff --git a/packages/styled-components/transform/src/visitors/transpile_css_prop/transpile.rs b/packages/styled-components/transform/src/visitors/transpile_css_prop/transpile.rs index 3508d4f4c..ccbd6450c 100644 --- a/packages/styled-components/transform/src/visitors/transpile_css_prop/transpile.rs +++ b/packages/styled-components/transform/src/visitors/transpile_css_prop/transpile.rs @@ -228,13 +228,11 @@ impl VisitMut for TranspileCssProp { if reducer.replace_object_with_prop_function { css = Expr::Arrow(ArrowExpr { - span: DUMMY_SP, params: vec![Pat::Ident(p.clone().into())], body: Box::new(BlockStmtOrExpr::Expr(Box::new(css.take()))), is_async: false, is_generator: false, - type_params: Default::default(), - return_type: Default::default(), + ..Default::default() }); } } else { From a311c137798232a2e0ccdd4787884c1b086594f3 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, 18 Jul 2024 10:28:04 +0900 Subject: [PATCH 18/30] Fix more --- .../transform/src/visitors/display_name_and_id.rs | 3 +-- .../src/visitors/transpile_css_prop/transpile.rs | 15 +++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/packages/styled-components/transform/src/visitors/display_name_and_id.rs b/packages/styled-components/transform/src/visitors/display_name_and_id.rs index c4c0c6d68..3f95ca5da 100644 --- a/packages/styled-components/transform/src/visitors/display_name_and_id.rs +++ b/packages/styled-components/transform/src/visitors/display_name_and_id.rs @@ -190,7 +190,6 @@ impl DisplayNameAndId { if let Expr::TaggedTpl(e) = e { e.tag = Box::new(Expr::Call(CallExpr { - span: DUMMY_SP, callee: e .tag .take() @@ -201,7 +200,7 @@ impl DisplayNameAndId { props: with_config_props, } .as_arg()], - type_args: Default::default(), + ..Default::default() })); return; } diff --git a/packages/styled-components/transform/src/visitors/transpile_css_prop/transpile.rs b/packages/styled-components/transform/src/visitors/transpile_css_prop/transpile.rs index ccbd6450c..d71b4b0ab 100644 --- a/packages/styled-components/transform/src/visitors/transpile_css_prop/transpile.rs +++ b/packages/styled-components/transform/src/visitors/transpile_css_prop/transpile.rs @@ -9,7 +9,7 @@ use swc_atoms::JsWord; use swc_common::{ collections::{AHashMap, AHashSet}, util::take::Take, - Spanned, DUMMY_SP, + Spanned, SyntaxContext, DUMMY_SP, }; use swc_ecma_ast::*; use swc_ecma_utils::{prepend_stmt, private_ident, quote_ident, ExprFactory}; @@ -97,6 +97,7 @@ impl VisitMut for TranspileCssProp { let id_sym = JsWord::from(id_sym); let styled_idx = self.next_styled_idx(id_sym.clone()); let id = quote_ident!( + SyntaxContext::empty(), elem.opening.name.span(), append_if_gt_one(&format!("_Styled{}", id_sym), styled_idx) ); @@ -112,7 +113,7 @@ impl VisitMut for TranspileCssProp { raw: None, }) .as_arg()], - type_args: Default::default(), + ..Default::default() })), None::, ) @@ -124,7 +125,7 @@ impl VisitMut for TranspileCssProp { span: DUMMY_SP, callee: import_name.as_callee(), args: vec![name_expr.as_arg()], - type_args: Default::default(), + ..Default::default() }), if self.is_top_level_ident(&name) { Some(name) @@ -210,7 +211,7 @@ impl VisitMut for TranspileCssProp { let p = quote_ident!("p"); let mut reducer = PropertyReducer { - p: p.clone(), + p: p.clone().into(), replace_object_with_prop_function: false, extra_attrs: Default::default(), identifier_idx: &mut self.identifier_idx, @@ -269,15 +270,13 @@ impl VisitMut for TranspileCssProp { })); acc.push(Box::new(Expr::Arrow(ArrowExpr { - span: DUMMY_SP, params: vec![Pat::Ident(p.clone().into())], body: Box::new(BlockStmtOrExpr::Expr( p.make_member(identifier).into(), )), is_async: false, is_generator: false, - type_params: Default::default(), - return_type: Default::default(), + ..Default::default() }))); acc @@ -306,10 +305,10 @@ impl VisitMut for TranspileCssProp { definite: false, }; let stmt = Stmt::Decl(Decl::Var(Box::new(VarDecl { - span: DUMMY_SP, kind: VarDeclKind::Var, declare: false, decls: vec![var], + ..Default::default() }))); match inject_after { Some(injector) => { From 08db4ff47713545b01b8c0a69e491c8e847d9ab5 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, 18 Jul 2024 10:28:56 +0900 Subject: [PATCH 19/30] Fix more --- .../src/visitors/transpile_css_prop/transpile.rs | 2 +- .../styled-jsx/transform/src/transform_css_swc.rs | 2 +- packages/styled-jsx/transform/src/visitor.rs | 11 ++++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/styled-components/transform/src/visitors/transpile_css_prop/transpile.rs b/packages/styled-components/transform/src/visitors/transpile_css_prop/transpile.rs index d71b4b0ab..df1d6af8e 100644 --- a/packages/styled-components/transform/src/visitors/transpile_css_prop/transpile.rs +++ b/packages/styled-components/transform/src/visitors/transpile_css_prop/transpile.rs @@ -610,7 +610,7 @@ fn get_name_ident(el: &JSXElementName) -> Ident { JSXElementName::JSXMemberExpr(e) => Ident { sym: format!("{}_{}", get_name_of_jsx_obj(&e.obj), e.prop.sym).into(), span: e.prop.span, - optional: false, + ..Default::default() }, _ => { unimplemented!("get_name_ident for namespaced jsx element") diff --git a/packages/styled-jsx/transform/src/transform_css_swc.rs b/packages/styled-jsx/transform/src/transform_css_swc.rs index e0d9530b0..28decd9da 100644 --- a/packages/styled-jsx/transform/src/transform_css_swc.rs +++ b/packages/styled-jsx/transform/src/transform_css_swc.rs @@ -243,7 +243,7 @@ impl Namespacer { let hi = tokens.last().map(|v| v.span_hi()).unwrap_or(BytePos(0)); Tokens { - span: Span::new(lo, hi, Default::default()), + span: Span::new(lo, hi), tokens, } }; diff --git a/packages/styled-jsx/transform/src/visitor.rs b/packages/styled-jsx/transform/src/visitor.rs index 5472052f1..71e8bae11 100644 --- a/packages/styled-jsx/transform/src/visitor.rs +++ b/packages/styled-jsx/transform/src/visitor.rs @@ -193,13 +193,14 @@ impl Fold for StyledJSXTransformer<'_> { el.attrs = el.attrs.fold_with(self); - if let JSXElementName::Ident(Ident { sym, span, .. }) = &el.name { + if let JSXElementName::Ident(Ident { + sym, span, ctxt, .. + }) = &el.name + { if sym != "style" && sym != self.style_import_name.as_ref().unwrap() && (!is_capitalized(sym) - || self - .nearest_scope_bindings - .contains(&(sym.clone(), span.ctxt))) + || self.nearest_scope_bindings.contains(&(sym.clone(), *ctxt))) { let (existing_class_name, existing_index, existing_spread_index) = get_existing_class_name(&el); @@ -871,7 +872,7 @@ fn get_existing_class_name(el: &JSXOpeningElement) -> (Option, Option { From 7cefffd180c8f7c62c16af5a1f5893e28f3e3d64 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, 18 Jul 2024 10:29:52 +0900 Subject: [PATCH 20/30] Fix more --- .../src/visitors/transpile_css_prop/transpile.rs | 4 ++-- packages/styled-jsx/transform/src/utils.rs | 10 ++++------ packages/styled-jsx/transform/src/visitor.rs | 5 ++--- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/packages/styled-components/transform/src/visitors/transpile_css_prop/transpile.rs b/packages/styled-components/transform/src/visitors/transpile_css_prop/transpile.rs index df1d6af8e..c8b0630b8 100644 --- a/packages/styled-components/transform/src/visitors/transpile_css_prop/transpile.rs +++ b/packages/styled-components/transform/src/visitors/transpile_css_prop/transpile.rs @@ -331,7 +331,7 @@ impl VisitMut for TranspileCssProp { match attr { JSXAttrOrSpread::JSXAttr(attr) => { if match &attr.name { - JSXAttrName::Ident(Ident { sym, .. }) => sym.is_empty(), + JSXAttrName::Ident(IdentName { sym, .. }) => sym.is_empty(), _ => false, } { return false; @@ -549,7 +549,7 @@ fn set_value_of_prop(prop: &mut Prop, value: Box) { match prop { Prop::Shorthand(p) => { *prop = Prop::KeyValue(KeyValueProp { - key: PropName::Ident(p.clone()), + key: PropName::Ident(p.clone().into()), value, }); } diff --git a/packages/styled-jsx/transform/src/utils.rs b/packages/styled-jsx/transform/src/utils.rs index 4af9f19bf..d953b66c1 100644 --- a/packages/styled-jsx/transform/src/utils.rs +++ b/packages/styled-jsx/transform/src/utils.rs @@ -293,8 +293,7 @@ pub fn styled_jsx_import_decl(style_import_name: &str) -> ModuleItem { specifiers: vec![ImportSpecifier::Default(ImportDefaultSpecifier { local: Ident { sym: style_import_name.into(), - span: DUMMY_SP, - optional: false, + ..Default::default() }, span: DUMMY_SP, })], @@ -319,11 +318,10 @@ pub fn string_literal_expr(s: &str) -> Expr { s.replace("\\`", "`").into() } -pub fn ident(s: &str) -> Ident { - Ident { +pub fn ident(s: &str) -> IdentName { + IdentName { sym: s.into(), - span: DUMMY_SP, - optional: false, + ..Default::default() } } diff --git a/packages/styled-jsx/transform/src/visitor.rs b/packages/styled-jsx/transform/src/visitor.rs index 71e8bae11..a06581f9b 100644 --- a/packages/styled-jsx/transform/src/visitor.rs +++ b/packages/styled-jsx/transform/src/visitor.rs @@ -566,10 +566,9 @@ impl StyledJSXTransformer<'_> { return JSXStyle::External(ExternalStyle { expr: Expr::Member(MemberExpr { obj: Box::new(Expr::Ident(ident.clone())), - prop: MemberProp::Ident(Ident { + prop: MemberProp::Ident(IdentName { sym: "__hash".into(), - span: DUMMY_SP, - optional: false, + ..Default::default() }), span: DUMMY_SP, }), From 4b08fad685d837e3976716c0e7cbf4eb3d620993 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, 18 Jul 2024 10:31:10 +0900 Subject: [PATCH 21/30] Fix more --- packages/styled-components/src/lib.rs | 12 ++++++++---- packages/styled-components/transform/src/lib.rs | 4 ++-- .../transform/src/visitors/display_name_and_id.rs | 8 ++++---- .../styled-components/transform/tests/fixture.rs | 7 +------ packages/styled-jsx/transform/src/visitor.rs | 7 +++---- 5 files changed, 18 insertions(+), 20 deletions(-) diff --git a/packages/styled-components/src/lib.rs b/packages/styled-components/src/lib.rs index d4b873088..44d8d4bc0 100644 --- a/packages/styled-components/src/lib.rs +++ b/packages/styled-components/src/lib.rs @@ -1,5 +1,7 @@ #![allow(clippy::not_unsafe_ptr_arg_deref)] +use std::sync::Arc; + use styled_components::Config; use swc_common::{SourceMapper, Spanned}; use swc_core::{ @@ -21,10 +23,12 @@ fn styled_components(mut program: Program, data: TransformPluginProgramMetadata) ) .expect("invalid config for styled-components"); - let file_name = match data.get_context(&TransformPluginMetadataContextKind::Filename) { - Some(s) => FileName::Real(s.into()), - None => FileName::Anon, - }; + let file_name = Arc::new( + match data.get_context(&TransformPluginMetadataContextKind::Filename) { + Some(s) => FileName::Real(s.into()), + None => FileName::Anon, + }, + ); let pos = data.source_map.lookup_char_pos(program.span().lo); let hash = pos.file.src_hash; diff --git a/packages/styled-components/transform/src/lib.rs b/packages/styled-components/transform/src/lib.rs index e52bdf719..1ddcdfb46 100644 --- a/packages/styled-components/transform/src/lib.rs +++ b/packages/styled-components/transform/src/lib.rs @@ -1,6 +1,6 @@ #![deny(unused)] -use std::{cell::RefCell, rc::Rc}; +use std::{cell::RefCell, rc::Rc, sync::Arc}; use serde::Deserialize; use swc_atoms::JsWord; @@ -72,7 +72,7 @@ impl Config { } pub fn styled_components( - file_name: FileName, + file_name: Arc, src_file_hash: u128, config: Config, comments: C, diff --git a/packages/styled-components/transform/src/visitors/display_name_and_id.rs b/packages/styled-components/transform/src/visitors/display_name_and_id.rs index 3f95ca5da..4bd44870a 100644 --- a/packages/styled-components/transform/src/visitors/display_name_and_id.rs +++ b/packages/styled-components/transform/src/visitors/display_name_and_id.rs @@ -1,4 +1,4 @@ -use std::{cell::RefCell, convert::TryInto, path::Path, rc::Rc}; +use std::{cell::RefCell, convert::TryInto, path::Path, rc::Rc, sync::Arc}; use once_cell::sync::Lazy; use regex::Regex; @@ -15,7 +15,7 @@ use crate::{ }; pub fn display_name_and_id( - file_name: FileName, + file_name: Arc, src_file_hash: u128, config: Rc, state: Rc>, @@ -36,7 +36,7 @@ static DISPLAY_NAME_REGEX: Lazy = #[derive(Debug)] struct DisplayNameAndId { - file_name: FileName, + file_name: Arc, src_file_hash: u128, config: Rc, @@ -69,7 +69,7 @@ impl DisplayNameAndId { fn get_display_name(&mut self, _: &Expr) -> JsWord { let component_name = self.cur_display_name.clone().unwrap_or(js_word!("")); - match &self.file_name { + match &*self.file_name { FileName::Real(f) if self.config.file_name => { let block_name = self.get_block_name(f); diff --git a/packages/styled-components/transform/tests/fixture.rs b/packages/styled-components/transform/tests/fixture.rs index 30f55a3cb..76392e88d 100644 --- a/packages/styled-components/transform/tests/fixture.rs +++ b/packages/styled-components/transform/tests/fixture.rs @@ -26,12 +26,7 @@ fn fixture(input: PathBuf) { chain!( resolver(Mark::new(), Mark::new(), false), - styled_components( - fm.name.clone(), - fm.src_hash, - config.clone(), - t.comments.clone() - ) + styled_components(fm.name, fm.src_hash, config.clone(), t.comments.clone()) ) }, &input, diff --git a/packages/styled-jsx/transform/src/visitor.rs b/packages/styled-jsx/transform/src/visitor.rs index a06581f9b..ad57ff315 100644 --- a/packages/styled-jsx/transform/src/visitor.rs +++ b/packages/styled-jsx/transform/src/visitor.rs @@ -989,13 +989,12 @@ fn add_hash_statement((id, hash): (Id, String)) -> Stmt { left: MemberExpr { obj: Box::new(Expr::Ident(Ident { sym: id.0, - span: DUMMY_SP.with_ctxt(id.1), - optional: false, + ctxt: id.1, + ..Default::default() })), - prop: MemberProp::Ident(Ident { + prop: MemberProp::Ident(IdentName { sym: "__hash".into(), span: DUMMY_SP, - optional: false, }), span: DUMMY_SP, } From 58b42f4a9959961d7df1802677391dcfccd06696 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, 18 Jul 2024 10:32:36 +0900 Subject: [PATCH 22/30] Fix build --- .../transform/tests/fixture.rs | 7 +++++- packages/styled-jsx/transform/src/visitor.rs | 24 +++++++++---------- .../transform-imports/transform/src/lib.rs | 6 ++++- 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/packages/styled-components/transform/tests/fixture.rs b/packages/styled-components/transform/tests/fixture.rs index 76392e88d..30f55a3cb 100644 --- a/packages/styled-components/transform/tests/fixture.rs +++ b/packages/styled-components/transform/tests/fixture.rs @@ -26,7 +26,12 @@ fn fixture(input: PathBuf) { chain!( resolver(Mark::new(), Mark::new(), false), - styled_components(fm.name, fm.src_hash, config.clone(), t.comments.clone()) + styled_components( + fm.name.clone(), + fm.src_hash, + config.clone(), + t.comments.clone() + ) ) }, &input, diff --git a/packages/styled-jsx/transform/src/visitor.rs b/packages/styled-jsx/transform/src/visitor.rs index ad57ff315..3a9cff7fa 100644 --- a/packages/styled-jsx/transform/src/visitor.rs +++ b/packages/styled-jsx/transform/src/visitor.rs @@ -301,11 +301,13 @@ impl Fold for StyledJSXTransformer<'_> { let declarator = declarator.fold_children_with(self); if let Some(external_hash) = &self.external_hash.take() { if let Pat::Ident(BindingIdent { - id: Ident { span, sym, .. }, + id: Ident { + span, ctxt, sym, .. + }, .. }) = &declarator.name { - self.add_hash = Some(((sym.clone(), span.ctxt), external_hash.clone())); + self.add_hash = Some(((sym.clone(), *ctxt), external_hash.clone())); } } declarator @@ -360,7 +362,7 @@ impl Fold for StyledJSXTransformer<'_> { definite: false, span: DUMMY_SP, }], - span: DUMMY_SP, + ..Default::default() }))))); self.add_default_decl = None; if let Some(add_hash) = self.add_hash.take() { @@ -598,7 +600,7 @@ impl StyledJSXTransformer<'_> { let is_global = el.opening.attrs.iter().any(|attr| { if let JSXAttrOrSpread::JSXAttr(JSXAttr { - name: JSXAttrName::Ident(Ident { sym, .. }), + name: JSXAttrName::Ident(IdentName { sym, .. }), .. }) = &attr { @@ -665,7 +667,7 @@ impl StyledJSXTransformer<'_> { let tag = match &*tagged_tpl.tag { Expr::Ident(Ident { sym, .. }) => sym.to_string(), Expr::Member(MemberExpr { - prop: MemberProp::Ident(Ident { sym, .. }), + prop: MemberProp::Ident(IdentName { sym, .. }), .. }) => sym.to_string(), _ => String::from("not_styled_jsx_tag"), @@ -727,15 +729,13 @@ impl StyledJSXTransformer<'_> { Ok(Expr::New(NewExpr { callee: Box::new(Expr::Ident(Ident { sym: "String".into(), - span: DUMMY_SP, - optional: false, + ..Default::default() })), args: Some(vec![ExprOrSpread { expr: Box::new(css), spread: None, }]), - span: DUMMY_SP, - type_args: None, + ..Default::default() })) } @@ -767,7 +767,7 @@ fn is_styled_jsx(el: &JSXElement) -> bool { el.opening.attrs.iter().any(|attr| { if let JSXAttrOrSpread::JSXAttr(JSXAttr { - name: JSXAttrName::Ident(Ident { sym, .. }), + name: JSXAttrName::Ident(IdentName { sym, .. }), .. }) = &attr { @@ -788,7 +788,7 @@ fn is_global(el: &JSXElement) -> bool { el.opening.attrs.iter().any(|attr| { if let JSXAttrOrSpread::JSXAttr(JSXAttr { - name: JSXAttrName::Ident(Ident { sym, .. }), + name: JSXAttrName::Ident(IdentName { sym, .. }), .. }) = &attr { @@ -896,7 +896,7 @@ fn get_existing_class_name(el: &JSXOpeningElement) -> (Option, Option Rewriter<'a> { } else { ExportSpecifier::Named(ExportNamedSpecifier { span: named_spec.span, - orig: ModuleExportName::Ident(Ident::new("default".into(), DUMMY_SP)), + orig: ModuleExportName::Ident(Ident::new( + "default".into(), + DUMMY_SP, + Default::default(), + )), exported: Some( named_spec .exported From 5e55403b180bc990f1ce8a72fd2d5d1910a5a736 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, 18 Jul 2024 10:35:04 +0900 Subject: [PATCH 23/30] Update test refs --- .../output-lightningcss.stderr | 9 +++----- .../nested-style-tags/output-swc.stderr | 9 +++----- .../no-child/output-lightningcss.stderr | 3 +-- .../tests/errors/no-child/output-swc.stderr | 3 +-- .../output-lightningcss.stderr | 1 - .../ts-with-css-resolve/output-swc.stderr | 1 - .../two-children/output-lightningcss.stderr | 3 +-- .../errors/two-children/output-swc.stderr | 3 +-- .../output-lightningcss.stderr | 3 +-- .../errors/wrong-child-type/output-swc.stderr | 3 +-- .../output-lightningcss.stderr | 3 +-- .../output-swc.stderr | 3 +-- .../next-65066/output.lightningcss.stderr | 3 +-- .../fixture/next-65066/output.swc.stderr | 3 +-- .../fixture/pack-2714/output.lightningcss.js | 4 ++-- .../tests/fixture/pack-2714/output.swc.js | 4 ++-- .../fixture/styles/output.lightningcss.js | 22 +++++++++---------- .../tests/fixture/styles/output.swc.js | 22 +++++++++---------- 18 files changed, 42 insertions(+), 60 deletions(-) diff --git a/packages/styled-jsx/transform/tests/errors/nested-style-tags/output-lightningcss.stderr b/packages/styled-jsx/transform/tests/errors/nested-style-tags/output-lightningcss.stderr index c6fa377bc..0f74c1e2c 100644 --- a/packages/styled-jsx/transform/tests/errors/nested-style-tags/output-lightningcss.stderr +++ b/packages/styled-jsx/transform/tests/errors/nested-style-tags/output-lightningcss.stderr @@ -1,25 +1,22 @@ - x Detected nested styled-jsx tag. | Read more: https://nextjs.org/docs/messages/nested-styled-jsx-tags - ,-[input.js:14:1] + ,-[input.js:15:1] 14 | Welcome! 15 | : ^^^^^^^^^^^^^^^^^^^^^^^ 16 | `---- - x Detected nested styled-jsx tag. | Read more: https://nextjs.org/docs/messages/nested-styled-jsx-tags - ,-[input.js:22:1] + ,-[input.js:23:1] 22 | Hello world! 23 | : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 24 | `---- - x Detected nested styled-jsx tag. | Read more: https://nextjs.org/docs/messages/nested-styled-jsx-tags - ,-[input.js:27:1] + ,-[input.js:28:1] 27 | <> 28 | : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/packages/styled-jsx/transform/tests/errors/nested-style-tags/output-swc.stderr b/packages/styled-jsx/transform/tests/errors/nested-style-tags/output-swc.stderr index c6fa377bc..0f74c1e2c 100644 --- a/packages/styled-jsx/transform/tests/errors/nested-style-tags/output-swc.stderr +++ b/packages/styled-jsx/transform/tests/errors/nested-style-tags/output-swc.stderr @@ -1,25 +1,22 @@ - x Detected nested styled-jsx tag. | Read more: https://nextjs.org/docs/messages/nested-styled-jsx-tags - ,-[input.js:14:1] + ,-[input.js:15:1] 14 | Welcome! 15 | : ^^^^^^^^^^^^^^^^^^^^^^^ 16 | `---- - x Detected nested styled-jsx tag. | Read more: https://nextjs.org/docs/messages/nested-styled-jsx-tags - ,-[input.js:22:1] + ,-[input.js:23:1] 22 | Hello world! 23 | : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 24 | `---- - x Detected nested styled-jsx tag. | Read more: https://nextjs.org/docs/messages/nested-styled-jsx-tags - ,-[input.js:27:1] + ,-[input.js:28:1] 27 | <> 28 | : ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/packages/styled-jsx/transform/tests/errors/no-child/output-lightningcss.stderr b/packages/styled-jsx/transform/tests/errors/no-child/output-lightningcss.stderr index bc9b26f12..8536708b9 100644 --- a/packages/styled-jsx/transform/tests/errors/no-child/output-lightningcss.stderr +++ b/packages/styled-jsx/transform/tests/errors/no-child/output-lightningcss.stderr @@ -1,7 +1,6 @@ - x Expected one child under JSX style tag, but got 0. | Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children - ,-[input.js:2:1] + ,-[input.js:3:1] 2 |
3 | : ^^^^^^^^^^^^^^^^^^^ diff --git a/packages/styled-jsx/transform/tests/errors/no-child/output-swc.stderr b/packages/styled-jsx/transform/tests/errors/no-child/output-swc.stderr index bc9b26f12..8536708b9 100644 --- a/packages/styled-jsx/transform/tests/errors/no-child/output-swc.stderr +++ b/packages/styled-jsx/transform/tests/errors/no-child/output-swc.stderr @@ -1,7 +1,6 @@ - x Expected one child under JSX style tag, but got 0. | Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children - ,-[input.js:2:1] + ,-[input.js:3:1] 2 |
3 | : ^^^^^^^^^^^^^^^^^^^ diff --git a/packages/styled-jsx/transform/tests/errors/ts-with-css-resolve/output-lightningcss.stderr b/packages/styled-jsx/transform/tests/errors/ts-with-css-resolve/output-lightningcss.stderr index ad7185a0b..5f86a57a7 100644 --- a/packages/styled-jsx/transform/tests/errors/ts-with-css-resolve/output-lightningcss.stderr +++ b/packages/styled-jsx/transform/tests/errors/ts-with-css-resolve/output-lightningcss.stderr @@ -1,2 +1 @@ - x /some-project/src/some-file.ts uses `css.resolve`, but ends with `.ts`. The file extension needs to be `.tsx` so that the jsx injected by `css.resolve` will be transformed. diff --git a/packages/styled-jsx/transform/tests/errors/ts-with-css-resolve/output-swc.stderr b/packages/styled-jsx/transform/tests/errors/ts-with-css-resolve/output-swc.stderr index ad7185a0b..5f86a57a7 100644 --- a/packages/styled-jsx/transform/tests/errors/ts-with-css-resolve/output-swc.stderr +++ b/packages/styled-jsx/transform/tests/errors/ts-with-css-resolve/output-swc.stderr @@ -1,2 +1 @@ - x /some-project/src/some-file.ts uses `css.resolve`, but ends with `.ts`. The file extension needs to be `.tsx` so that the jsx injected by `css.resolve` will be transformed. diff --git a/packages/styled-jsx/transform/tests/errors/two-children/output-lightningcss.stderr b/packages/styled-jsx/transform/tests/errors/two-children/output-lightningcss.stderr index 0a36017dc..e458fbb6f 100644 --- a/packages/styled-jsx/transform/tests/errors/two-children/output-lightningcss.stderr +++ b/packages/styled-jsx/transform/tests/errors/two-children/output-lightningcss.stderr @@ -1,7 +1,6 @@ - x Expected one child under JSX style tag, but got 2. | Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children - ,-[input.js:2:1] + ,-[input.js:3:1] 2 |
3 | ,-> : ^^^^^^^^^^^^^^^^^^^^^ diff --git a/packages/styled-jsx/transform/tests/errors/wrong-child-type/output-swc.stderr b/packages/styled-jsx/transform/tests/errors/wrong-child-type/output-swc.stderr index 5e556b0f8..9223357cb 100644 --- a/packages/styled-jsx/transform/tests/errors/wrong-child-type/output-swc.stderr +++ b/packages/styled-jsx/transform/tests/errors/wrong-child-type/output-swc.stderr @@ -1,7 +1,6 @@ - x Expected a single child of type JSXExpressionContainer under JSX Style tag. | Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children - ,-[input.js:2:1] + ,-[input.js:3:1] 2 |
3 | : ^^^^^^^^^^^^^^^^^^^^^ diff --git a/packages/styled-jsx/transform/tests/errors/wrong-jsx-expression-type/output-lightningcss.stderr b/packages/styled-jsx/transform/tests/errors/wrong-jsx-expression-type/output-lightningcss.stderr index eb28a30a7..903b10df9 100644 --- a/packages/styled-jsx/transform/tests/errors/wrong-jsx-expression-type/output-lightningcss.stderr +++ b/packages/styled-jsx/transform/tests/errors/wrong-jsx-expression-type/output-lightningcss.stderr @@ -1,7 +1,6 @@ - x Expected a template literal, string or identifier inside the JSXExpressionContainer. | Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children - ,-[input.js:2:1] + ,-[input.js:3:1] 2 |
3 | : ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/packages/styled-jsx/transform/tests/errors/wrong-jsx-expression-type/output-swc.stderr b/packages/styled-jsx/transform/tests/errors/wrong-jsx-expression-type/output-swc.stderr index eb28a30a7..903b10df9 100644 --- a/packages/styled-jsx/transform/tests/errors/wrong-jsx-expression-type/output-swc.stderr +++ b/packages/styled-jsx/transform/tests/errors/wrong-jsx-expression-type/output-swc.stderr @@ -1,7 +1,6 @@ - x Expected a template literal, string or identifier inside the JSXExpressionContainer. | Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children - ,-[input.js:2:1] + ,-[input.js:3:1] 2 |
3 | : ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/packages/styled-jsx/transform/tests/fixture/next-65066/output.lightningcss.stderr b/packages/styled-jsx/transform/tests/fixture/next-65066/output.lightningcss.stderr index 0a05a19f2..2dfe189ea 100644 --- a/packages/styled-jsx/transform/tests/fixture/next-65066/output.lightningcss.stderr +++ b/packages/styled-jsx/transform/tests/fixture/next-65066/output.lightningcss.stderr @@ -1,7 +1,6 @@ - x Detected nested styled-jsx tag. | Read more: https://nextjs.org/docs/messages/nested-styled-jsx-tags - ,-[input.js:21:1] + ,-[input.js:22:1] 21 | 22 | ,->