Unverified Commit 082b2dd1 authored by Donny/강동윤's avatar Donny/강동윤 Committed by GitHub

build: Update `swc_core` to `v21.0.1` (#77918)

### What?

Update swc_core to the latest version. ChangeLog: https://github.com/swc-project/swc/compare/swc_core%40v19.0.0...swc_core%40v21.0.1

### Why?

To keep in sync & apply https://github.com/swc-project/swc/pull/10314

### How?

Closes NDX-967
parent 2383b58a
...@@ -750,9 +750,9 @@ dependencies = [ ...@@ -750,9 +750,9 @@ dependencies = [
[[package]] [[package]]
name = "binding_macros" name = "binding_macros"
version = "18.0.0" version = "20.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ef3b68f224012421461b216cfba80d6971e62abddb9e221ccce9c79e3a2a03d" checksum = "3e75fa4ddc354a7e46572bc5e745d19245fc1a4c980cd8a6a82debffdca13f39"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"console_error_panic_hook", "console_error_panic_hook",
...@@ -2962,7 +2962,7 @@ dependencies = [ ...@@ -2962,7 +2962,7 @@ dependencies = [
"httpdate", "httpdate",
"itoa", "itoa",
"pin-project-lite", "pin-project-lite",
"socket2 0.5.8", "socket2 0.4.9",
"tokio", "tokio",
"tower-service", "tower-service",
"tracing", "tracing",
...@@ -4082,8 +4082,7 @@ dependencies = [ ...@@ -4082,8 +4082,7 @@ dependencies = [
[[package]] [[package]]
name = "mdxjs" name = "mdxjs"
version = "0.3.3" version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://github.com/kdy1/mdxjs-rs?branch=swc-core-21#477c41dd9cb462fa31f91359c9930b14fa920d67"
checksum = "1f93363d4ecc5209500f27b94a6fe801f0d3eecf7fa685a4563bdd3ea8c917a8"
dependencies = [ dependencies = [
"markdown", "markdown",
"rustc-hash 2.1.0", "rustc-hash 2.1.0",
...@@ -6982,7 +6981,7 @@ dependencies = [ ...@@ -6982,7 +6981,7 @@ dependencies = [
"swc_css_prefixer", "swc_css_prefixer",
"swc_css_visit", "swc_css_visit",
"swc_ecma_ast", "swc_ecma_ast",
"swc_ecma_minifier", "swc_ecma_minifier 14.0.0",
"swc_ecma_parser", "swc_ecma_parser",
"swc_ecma_transforms_base", "swc_ecma_transforms_base",
"swc_ecma_utils", "swc_ecma_utils",
...@@ -7005,9 +7004,9 @@ checksum = "804f44ed3c63152de6a9f90acbea1a110441de43006ea51bcce8f436196a288b" ...@@ -7005,9 +7004,9 @@ checksum = "804f44ed3c63152de6a9f90acbea1a110441de43006ea51bcce8f436196a288b"
[[package]] [[package]]
name = "swc" name = "swc"
version = "18.0.0" version = "20.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ccfeff9af7ffb8fb7243dc698c598e00963486ef5cdeff449abf1cccacef417" checksum = "1311db8bbe20ad5374dd10a92d2dba3bf5ac59ade06292bdd381d1897c74664a"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"base64 0.22.1", "base64 0.22.1",
...@@ -7034,11 +7033,11 @@ dependencies = [ ...@@ -7034,11 +7033,11 @@ dependencies = [
"swc_compiler_base", "swc_compiler_base",
"swc_config", "swc_config",
"swc_ecma_ast", "swc_ecma_ast",
"swc_ecma_codegen", "swc_ecma_codegen 10.0.0",
"swc_ecma_ext_transforms", "swc_ecma_ext_transforms",
"swc_ecma_lints", "swc_ecma_lints",
"swc_ecma_loader", "swc_ecma_loader",
"swc_ecma_minifier", "swc_ecma_minifier 16.0.0",
"swc_ecma_parser", "swc_ecma_parser",
"swc_ecma_preset_env", "swc_ecma_preset_env",
"swc_ecma_transforms", "swc_ecma_transforms",
...@@ -7103,9 +7102,9 @@ dependencies = [ ...@@ -7103,9 +7102,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_bundler" name = "swc_bundler"
version = "13.0.0" version = "15.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be673e200f78a320003930fc9f27ee600f913188fa8804bf7fafc1ea70f420c7" checksum = "900a8dba7470ecf731cba5d733e06134108142b1309147c25d32fab1f6846ac2"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"crc", "crc",
...@@ -7122,7 +7121,7 @@ dependencies = [ ...@@ -7122,7 +7121,7 @@ dependencies = [
"swc_atoms", "swc_atoms",
"swc_common", "swc_common",
"swc_ecma_ast", "swc_ecma_ast",
"swc_ecma_codegen", "swc_ecma_codegen 10.0.0",
"swc_ecma_loader", "swc_ecma_loader",
"swc_ecma_parser", "swc_ecma_parser",
"swc_ecma_transforms_base", "swc_ecma_transforms_base",
...@@ -7183,9 +7182,9 @@ dependencies = [ ...@@ -7183,9 +7182,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_compiler_base" name = "swc_compiler_base"
version = "15.0.0" version = "17.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "806774262e8cc665d986364c109bdaa91eeadebf71402df6894c7c3c2be92795" checksum = "dc96c4a212a3120deeefbc180bd7a4fed3d076af87d452d0b5773cc98b3934f6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"base64 0.22.1", "base64 0.22.1",
...@@ -7202,8 +7201,8 @@ dependencies = [ ...@@ -7202,8 +7201,8 @@ dependencies = [
"swc_common", "swc_common",
"swc_config", "swc_config",
"swc_ecma_ast", "swc_ecma_ast",
"swc_ecma_codegen", "swc_ecma_codegen 10.0.0",
"swc_ecma_minifier", "swc_ecma_minifier 16.0.0",
"swc_ecma_parser", "swc_ecma_parser",
"swc_ecma_visit", "swc_ecma_visit",
"swc_timer", "swc_timer",
...@@ -7238,9 +7237,9 @@ dependencies = [ ...@@ -7238,9 +7237,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_core" name = "swc_core"
version = "19.0.0" version = "21.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "daca62565e1ae2a6b840f624e7d4613a1b2feb8790c5b9ac3df0b3cd442e167d" checksum = "c89e035b38b98cbfa1950ca38f7cae673e3377ce80ed4e1dc58242a0f81dd8b8"
dependencies = [ dependencies = [
"binding_macros", "binding_macros",
"swc", "swc",
...@@ -7250,10 +7249,10 @@ dependencies = [ ...@@ -7250,10 +7249,10 @@ dependencies = [
"swc_cached", "swc_cached",
"swc_common", "swc_common",
"swc_ecma_ast", "swc_ecma_ast",
"swc_ecma_codegen", "swc_ecma_codegen 10.0.0",
"swc_ecma_lints", "swc_ecma_lints",
"swc_ecma_loader", "swc_ecma_loader",
"swc_ecma_minifier", "swc_ecma_minifier 16.0.0",
"swc_ecma_parser", "swc_ecma_parser",
"swc_ecma_preset_env", "swc_ecma_preset_env",
"swc_ecma_quote_macros", "swc_ecma_quote_macros",
...@@ -7448,7 +7447,30 @@ dependencies = [ ...@@ -7448,7 +7447,30 @@ dependencies = [
"swc_atoms", "swc_atoms",
"swc_common", "swc_common",
"swc_ecma_ast", "swc_ecma_ast",
"swc_ecma_codegen_macros", "swc_ecma_codegen_macros 1.0.1",
"tracing",
]
[[package]]
name = "swc_ecma_codegen"
version = "10.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b85453d346d0642f296c2b3aa204886a6ae2b9652262c3468d6f4556c1ed020d"
dependencies = [
"ascii",
"compact_str",
"memchr",
"num-bigint",
"once_cell",
"regex",
"rustc-hash 2.1.0",
"serde",
"sourcemap",
"swc_allocator",
"swc_atoms",
"swc_common",
"swc_ecma_ast",
"swc_ecma_codegen_macros 2.0.0",
"tracing", "tracing",
] ]
...@@ -7464,6 +7486,18 @@ dependencies = [ ...@@ -7464,6 +7486,18 @@ dependencies = [
"syn 2.0.95", "syn 2.0.95",
] ]
[[package]]
name = "swc_ecma_codegen_macros"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e99e1931669a67c83e2c2b4375674f6901d1480994a76aa75b23f1389e6c5076"
dependencies = [
"proc-macro2",
"quote",
"swc_macros_common",
"syn 2.0.95",
]
[[package]] [[package]]
name = "swc_ecma_compat_bugfixes" name = "swc_ecma_compat_bugfixes"
version = "12.0.0" version = "12.0.0"
...@@ -7745,7 +7779,44 @@ dependencies = [ ...@@ -7745,7 +7779,44 @@ dependencies = [
"swc_common", "swc_common",
"swc_config", "swc_config",
"swc_ecma_ast", "swc_ecma_ast",
"swc_ecma_codegen", "swc_ecma_codegen 8.1.0",
"swc_ecma_parser",
"swc_ecma_transforms_base",
"swc_ecma_transforms_optimization",
"swc_ecma_usage_analyzer",
"swc_ecma_utils",
"swc_ecma_visit",
"swc_timer",
"tracing",
]
[[package]]
name = "swc_ecma_minifier"
version = "16.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96929d4669712d21609fbd1ba24461c964d93ed23702bd87cc530f4b307ecc34"
dependencies = [
"arrayvec 0.7.4",
"indexmap 2.7.1",
"num-bigint",
"num_cpus",
"once_cell",
"par-core",
"par-iter",
"parking_lot",
"phf",
"radix_fmt",
"regex",
"rustc-hash 2.1.0",
"ryu-js",
"serde",
"serde_json",
"swc_allocator",
"swc_atoms",
"swc_common",
"swc_config",
"swc_ecma_ast",
"swc_ecma_codegen 10.0.0",
"swc_ecma_parser", "swc_ecma_parser",
"swc_ecma_transforms_base", "swc_ecma_transforms_base",
"swc_ecma_transforms_optimization", "swc_ecma_transforms_optimization",
...@@ -8047,9 +8118,9 @@ dependencies = [ ...@@ -8047,9 +8118,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_ecma_transforms_testing" name = "swc_ecma_transforms_testing"
version = "12.0.0" version = "14.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9e812e5d5c89ac4559a2bb8bc7dcff2d09de7f7d4fc77a53293b93cb1bf9554" checksum = "001e32bba70b2456a495dc7394673b233a19f76cdb46d7b0ce52ef1af8ecc573"
dependencies = [ dependencies = [
"ansi_term", "ansi_term",
"anyhow", "anyhow",
...@@ -8062,7 +8133,7 @@ dependencies = [ ...@@ -8062,7 +8133,7 @@ dependencies = [
"swc_allocator", "swc_allocator",
"swc_common", "swc_common",
"swc_ecma_ast", "swc_ecma_ast",
"swc_ecma_codegen", "swc_ecma_codegen 10.0.0",
"swc_ecma_parser", "swc_ecma_parser",
"swc_ecma_testing", "swc_ecma_testing",
"swc_ecma_transforms_base", "swc_ecma_transforms_base",
...@@ -8163,7 +8234,7 @@ dependencies = [ ...@@ -8163,7 +8234,7 @@ dependencies = [
"swc_atoms", "swc_atoms",
"swc_common", "swc_common",
"swc_ecma_ast", "swc_ecma_ast",
"swc_ecma_codegen", "swc_ecma_codegen 8.1.0",
"swc_ecma_transforms", "swc_ecma_transforms",
"swc_ecma_utils", "swc_ecma_utils",
"swc_ecma_visit", "swc_ecma_visit",
...@@ -8184,9 +8255,9 @@ dependencies = [ ...@@ -8184,9 +8255,9 @@ dependencies = [
[[package]] [[package]]
name = "swc_error_reporters" name = "swc_error_reporters"
version = "9.1.1" version = "9.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7938665a5561d6c3e2b796b5b2d0bc9a961d461db960cb5139f12e82b45bb471" checksum = "cc812b793a12b737b6cb949a6e8c87dfcd006c07d9490a5c4529d61e890003dc"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"miette", "miette",
...@@ -8358,10 +8429,11 @@ dependencies = [ ...@@ -8358,10 +8429,11 @@ dependencies = [
[[package]] [[package]]
name = "swc_typescript" name = "swc_typescript"
version = "11.0.0" version = "11.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b8f660e0ab0e92551747a41335ab6a0c7b685885da37f4e8e79ac5737bc4e04" checksum = "e8538a8b2e8d8a3ebbf58fe7f933d7b4bb01a291fbd7356352ea255cc15bbc70"
dependencies = [ dependencies = [
"bitflags 2.5.0",
"petgraph 0.7.1", "petgraph 0.7.1",
"rustc-hash 2.1.0", "rustc-hash 2.1.0",
"swc_atoms", "swc_atoms",
......
...@@ -296,7 +296,7 @@ turbopack-trace-utils = { path = "turbopack/crates/turbopack-trace-utils" } ...@@ -296,7 +296,7 @@ turbopack-trace-utils = { path = "turbopack/crates/turbopack-trace-utils" }
turbopack-wasm = { path = "turbopack/crates/turbopack-wasm" } turbopack-wasm = { path = "turbopack/crates/turbopack-wasm" }
# SWC crates # SWC crates
swc_core = { version = "19.0.0", features = [ swc_core = { version = "21.0.1", features = [
"ecma_loader_lru", "ecma_loader_lru",
"ecma_loader_parking_lot", "ecma_loader_parking_lot",
] } ] }
...@@ -432,3 +432,5 @@ wasmer = { git = "https://github.com/kdy1/wasmer", branch = "build-deps" } ...@@ -432,3 +432,5 @@ wasmer = { git = "https://github.com/kdy1/wasmer", branch = "build-deps" }
wasmer-cache = { git = "https://github.com/kdy1/wasmer", branch = "build-deps" } wasmer-cache = { git = "https://github.com/kdy1/wasmer", branch = "build-deps" }
wasmer-compiler-cranelift = { git = "https://github.com/kdy1/wasmer", branch = "build-deps" } wasmer-compiler-cranelift = { git = "https://github.com/kdy1/wasmer", branch = "build-deps" }
wasmer-wasix = { git = "https://github.com/kdy1/wasmer", branch = "build-deps" } wasmer-wasix = { git = "https://github.com/kdy1/wasmer", branch = "build-deps" }
mdxjs = { git = "https://github.com/kdy1/mdxjs-rs", branch = "swc-core-21" }
...@@ -54,7 +54,6 @@ describe('ReactRefreshLogBox app', () => { ...@@ -54,7 +54,6 @@ describe('ReactRefreshLogBox app', () => {
"label": "Build Error", "label": "Build Error",
"source": "./app/page.js "source": "./app/page.js
Error: x "getStaticProps" is not supported in app/. Read more: https://nextjs.org/docs/app/building-your-application/data-fetching Error: x "getStaticProps" is not supported in app/. Read more: https://nextjs.org/docs/app/building-your-application/data-fetching
|
| |
,-[3:1] ,-[3:1]
1 | 'use client' 1 | 'use client'
......
...@@ -89,10 +89,9 @@ describe('Error Overlay for server components compiler errors in pages', () => { ...@@ -89,10 +89,9 @@ describe('Error Overlay for server components compiler errors in pages', () => {
expect(next.normalizeTestDirContent(await session.getRedboxSource())) expect(next.normalizeTestDirContent(await session.getRedboxSource()))
.toMatchInlineSnapshot(` .toMatchInlineSnapshot(`
"./components/Comp.js "./components/Comp.js
Error: x You're importing a component that needs "next/headers". That only works in a Server Component which is not supported in the pages/ directory. Read more: https://nextjs.org/docs/app/building- Error: x You're importing a component that needs "next/headers". That only works in a Server Component which is not supported in the pages/ directory. Read more: https://nextjs.org/docs/app/building-your-application/rendering/server-components
| your-application/rendering/server-components
|
| |
,-[1:1] ,-[1:1]
1 | import { cookies } from 'next/headers' 1 | import { cookies } from 'next/headers'
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...@@ -170,10 +169,9 @@ describe('Error Overlay for server components compiler errors in pages', () => { ...@@ -170,10 +169,9 @@ describe('Error Overlay for server components compiler errors in pages', () => {
) )
).toMatchInlineSnapshot(` ).toMatchInlineSnapshot(`
"./components/Comp.js "./components/Comp.js
Error: x You're importing a component that needs "server-only". That only works in a Server Component which is not supported in the pages/ directory. Read more: https://nextjs.org/docs/app/building-your- Error: x You're importing a component that needs "server-only". That only works in a Server Component which is not supported in the pages/ directory. Read more: https://nextjs.org/docs/app/building-your-application/rendering/server-components
| application/rendering/server-components
|
| |
,-[1:1] ,-[1:1]
1 | import 'server-only' 1 | import 'server-only'
: ^^^^^^^^^^^^^^^^^^^^ : ^^^^^^^^^^^^^^^^^^^^
...@@ -249,10 +247,9 @@ describe('Error Overlay for server components compiler errors in pages', () => { ...@@ -249,10 +247,9 @@ describe('Error Overlay for server components compiler errors in pages', () => {
) )
).toMatchInlineSnapshot(` ).toMatchInlineSnapshot(`
"./components/Comp.js "./components/Comp.js
Error: x You're importing a component that needs "after". That only works in a Server Component which is not supported in the pages/ directory. Read more: https://nextjs.org/docs/app/building-your- Error: x You're importing a component that needs "after". That only works in a Server Component which is not supported in the pages/ directory. Read more: https://nextjs.org/docs/app/building-your-application/rendering/server-components
| application/rendering/server-components
|
| |
,-[1:1] ,-[1:1]
1 | import { after } from 'next/server' 1 | import { after } from 'next/server'
: ^^^^^ : ^^^^^
......
...@@ -41,9 +41,8 @@ describe('app-dir - error-on-next-codemod-comment', () => { ...@@ -41,9 +41,8 @@ describe('app-dir - error-on-next-codemod-comment', () => {
expect(await getRedboxSource(browser)).toMatchInlineSnapshot(` expect(await getRedboxSource(browser)).toMatchInlineSnapshot(`
"./app/page.tsx "./app/page.tsx
Error: x You have an unresolved @next/codemod comment "remove jsx of next line" that needs review. Error: x You have an unresolved @next/codemod comment "remove jsx of next line" that needs review.
| After review, either remove the comment if you made the necessary changes or replace "@next-codemod-error" with "@next-codemod-ignore" to bypass the build error if no action at this line can | After review, either remove the comment if you made the necessary changes or replace "@next-codemod-error" with "@next-codemod-ignore" to bypass the build error if no action at this line can be taken.
| be taken.
|
,-[2:1] ,-[2:1]
1 | export default function Page() { 1 | export default function Page() {
2 | // @next-codemod-error remove jsx of next line 2 | // @next-codemod-error remove jsx of next line
......
...@@ -86,7 +86,7 @@ describe('use-cache-unknown-cache-kind', () => { ...@@ -86,7 +86,7 @@ describe('use-cache-unknown-cache-kind', () => {
" "
./app/page.tsx ./app/page.tsx
Error: x Unknown cache kind "custom". Please configure a cache handler for this kind in the "experimental.cacheHandlers" object in your Next.js config. Error: x Unknown cache kind "custom". Please configure a cache handler for this kind in the "experimental.cacheHandlers" object in your Next.js config.
|
,-[1:1] ,-[1:1]
1 | 'use cache: custom' 1 | 'use cache: custom'
: ^^^^^^^^^^^^^^^^^^^ : ^^^^^^^^^^^^^^^^^^^
...@@ -169,7 +169,7 @@ describe('use-cache-unknown-cache-kind', () => { ...@@ -169,7 +169,7 @@ describe('use-cache-unknown-cache-kind', () => {
expect(errorSource).toMatchInlineSnapshot(` expect(errorSource).toMatchInlineSnapshot(`
"./app/page.tsx "./app/page.tsx
Error: x Unknown cache kind "custom". Please configure a cache handler for this kind in the "experimental.cacheHandlers" object in your Next.js config. Error: x Unknown cache kind "custom". Please configure a cache handler for this kind in the "experimental.cacheHandlers" object in your Next.js config.
|
,-[1:1] ,-[1:1]
1 | 'use cache: custom' 1 | 'use cache: custom'
: ^^^^^^^^^^^^^^^^^^^ : ^^^^^^^^^^^^^^^^^^^
......
...@@ -56,7 +56,7 @@ describe('use-cache-without-experimental-flag', () => { ...@@ -56,7 +56,7 @@ describe('use-cache-without-experimental-flag', () => {
Error: x To use "use cache", please enable the experimental feature flag "useCache" in your Next.js config. Error: x To use "use cache", please enable the experimental feature flag "useCache" in your Next.js config.
| |
| Read more: https://nextjs.org/docs/canary/app/api-reference/directives/use-cache#usage | Read more: https://nextjs.org/docs/canary/app/api-reference/directives/use-cache#usage
|
,-[1:1] ,-[1:1]
1 | 'use cache' 1 | 'use cache'
: ^^^^^^^^^^^ : ^^^^^^^^^^^
...@@ -113,7 +113,7 @@ describe('use-cache-without-experimental-flag', () => { ...@@ -113,7 +113,7 @@ describe('use-cache-without-experimental-flag', () => {
Error: x To use "use cache", please enable the experimental feature flag "useCache" in your Next.js config. Error: x To use "use cache", please enable the experimental feature flag "useCache" in your Next.js config.
| |
| Read more: https://nextjs.org/docs/canary/app/api-reference/directives/use-cache#usage | Read more: https://nextjs.org/docs/canary/app/api-reference/directives/use-cache#usage
|
,-[1:1] ,-[1:1]
1 | 'use cache' 1 | 'use cache'
: ^^^^^^^^^^^ : ^^^^^^^^^^^
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment