Unverified Commit 7b9d90bc authored by Donny/강동윤's avatar Donny/강동윤 Committed by GitHub

Update `swc_core` to `v0.89.x` (#61086)

## Turbopack

* https://github.com/vercel/turbo/pull/7092 <!-- Donny/강동윤 - Update `swc_core` to `v0.89.x` -->


### What?

Update SWC crates

### Why?

To fix some issues

### How?

Fixes #59805
Fixes #56144


Closes PACK-2222
Closes PACK-2285
parent b7cc5b9b
This diff is collapsed.
...@@ -30,18 +30,18 @@ next-core = { path = "packages/next-swc/crates/next-core" } ...@@ -30,18 +30,18 @@ next-core = { path = "packages/next-swc/crates/next-core" }
next-custom-transforms = { path = "packages/next-swc/crates/next-custom-transforms" } next-custom-transforms = { path = "packages/next-swc/crates/next-custom-transforms" }
# SWC crates # SWC crates
swc_core = { version = "0.87.28", features = [ swc_core = { version = "0.89.1", features = [
"ecma_loader_lru", "ecma_loader_lru",
"ecma_loader_parking_lot", "ecma_loader_parking_lot",
] } ] }
testing = { version = "0.35.14" } testing = { version = "0.35.16" }
# Turbo crates # Turbo crates
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240126.2" } turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240127.2" }
# [TODO]: need to refactor embed_directory! macro usages, as well as resolving turbo_tasks::function, macros.. # [TODO]: need to refactor embed_directory! macro usages, as well as resolving turbo_tasks::function, macros..
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240126.2" } turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240127.2" }
# [TODO]: need to refactor embed_directory! macro usage in next-core # [TODO]: need to refactor embed_directory! macro usage in next-core
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240126.2" } turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240127.2" }
# General Deps # General Deps
......
...@@ -40,8 +40,8 @@ turbopack-binding = { workspace = true, features = [ ...@@ -40,8 +40,8 @@ turbopack-binding = { workspace = true, features = [
] } ] }
# To allow quote! macro works # To allow quote! macro works
swc_core = { workspace = true, features = ["ecma_quote"]} swc_core = { workspace = true, features = ["ecma_quote"]}
react_remove_properties = "0.22.0" react_remove_properties = "0.24.0"
remove_console = "0.23.0" remove_console = "0.25.0"
preset_env_base = "0.4.10" preset_env_base = "0.4.10"
[dev-dependencies] [dev-dependencies]
......
...@@ -188,7 +188,7 @@ where ...@@ -188,7 +188,7 @@ where
let ss = match ss { let ss = match ss {
Ok(v) => v, Ok(v) => v,
Err(err) => { Err(err) => {
bail!("failed to parse css: {}", err) bail!("failed to parse css using lightningcss: {}", err)
} }
}; };
......
...@@ -517,6 +517,7 @@ impl NextDynamicPatcher { ...@@ -517,6 +517,7 @@ impl NextDynamicPatcher {
src: Box::new(specifier.into()), src: Box::new(specifier.into()),
type_only: false, type_only: false,
with: None, with: None,
phase: Default::default(),
}))); })));
} }
TurbopackImport::DevelopmentId { TurbopackImport::DevelopmentId {
...@@ -543,6 +544,7 @@ impl NextDynamicPatcher { ...@@ -543,6 +544,7 @@ impl NextDynamicPatcher {
src: Box::new(specifier.into()), src: Box::new(specifier.into()),
type_only: false, type_only: false,
with: None, with: None,
phase: Default::default(),
}))); })));
} }
TurbopackImport::BuildTransition { TurbopackImport::BuildTransition {
...@@ -572,6 +574,7 @@ impl NextDynamicPatcher { ...@@ -572,6 +574,7 @@ impl NextDynamicPatcher {
src: Box::new(specifier.into()), src: Box::new(specifier.into()),
type_only: false, type_only: false,
with: None, with: None,
phase: Default::default(),
}))); })));
} }
TurbopackImport::BuildId { TurbopackImport::BuildId {
...@@ -598,6 +601,7 @@ impl NextDynamicPatcher { ...@@ -598,6 +601,7 @@ impl NextDynamicPatcher {
src: Box::new(specifier.into()), src: Box::new(specifier.into()),
type_only: false, type_only: false,
with: None, with: None,
phase: Default::default(),
}))); })));
} }
} }
......
...@@ -77,6 +77,7 @@ impl<'a> FontImportsGenerator<'a> { ...@@ -77,6 +77,7 @@ impl<'a> FontImportsGenerator<'a> {
type_only: false, type_only: false,
with: None, with: None,
span: DUMMY_SP, span: DUMMY_SP,
phase: Default::default(),
}); });
} }
} }
......
...@@ -642,7 +642,10 @@ pub fn server_components<C: Comments>( ...@@ -642,7 +642,10 @@ pub fn server_components<C: Comments>(
as_folder(ReactServerComponents { as_folder(ReactServerComponents {
is_react_server_layer, is_react_server_layer,
comments, comments,
filepath: filename.to_string(), filepath: match filename {
FileName::Custom(path) => format!("<{}>", path),
_ => filename.to_string(),
},
app_dir, app_dir,
export_names: vec![], export_names: vec![],
invalid_server_imports: vec![ invalid_server_imports: vec![
......
...@@ -900,6 +900,7 @@ impl<C: Comments> VisitMut for ServerActions<C> { ...@@ -900,6 +900,7 @@ impl<C: Comments> VisitMut for ServerActions<C> {
}), }),
type_only: false, type_only: false,
with: None, with: None,
phase: Default::default(),
}))); })));
} }
...@@ -986,6 +987,7 @@ impl<C: Comments> VisitMut for ServerActions<C> { ...@@ -986,6 +987,7 @@ impl<C: Comments> VisitMut for ServerActions<C> {
}), }),
type_only: false, type_only: false,
with: None, with: None,
phase: Default::default(),
}))); })));
new.push(ModuleItem::Stmt(Stmt::Expr(ExprStmt { new.push(ModuleItem::Stmt(Stmt::Expr(ExprStmt {
span: DUMMY_SP, span: DUMMY_SP,
...@@ -1059,6 +1061,7 @@ impl<C: Comments> VisitMut for ServerActions<C> { ...@@ -1059,6 +1061,7 @@ impl<C: Comments> VisitMut for ServerActions<C> {
}), }),
type_only: false, type_only: false,
with: None, with: None,
phase: Default::default(),
}))); })));
// Encryption and decryption only happens on the server layer. // Encryption and decryption only happens on the server layer.
...@@ -1087,6 +1090,7 @@ impl<C: Comments> VisitMut for ServerActions<C> { ...@@ -1087,6 +1090,7 @@ impl<C: Comments> VisitMut for ServerActions<C> {
}), }),
type_only: false, type_only: false,
with: None, with: None,
phase: Default::default(),
}))); })));
// Make it the first item // Make it the first item
......
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
"@types/ws": "8.2.0", "@types/ws": "8.2.0",
"@vercel/ncc": "0.34.0", "@vercel/ncc": "0.34.0",
"@vercel/nft": "0.26.2", "@vercel/nft": "0.26.2",
"@vercel/turbopack-ecmascript-runtime": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240126.2", "@vercel/turbopack-ecmascript-runtime": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240127.2",
"acorn": "8.5.0", "acorn": "8.5.0",
"amphtml-validator": "1.0.35", "amphtml-validator": "1.0.35",
"anser": "1.4.9", "anser": "1.4.9",
......
...@@ -1077,8 +1077,8 @@ importers: ...@@ -1077,8 +1077,8 @@ importers:
specifier: 0.26.2 specifier: 0.26.2
version: 0.26.2 version: 0.26.2
'@vercel/turbopack-ecmascript-runtime': '@vercel/turbopack-ecmascript-runtime':
specifier: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240126.2 specifier: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240127.2
version: '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240126.2(react-refresh@0.12.0)(webpack@5.90.0)' version: '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240127.2(react-refresh@0.12.0)(webpack@5.90.0)'
acorn: acorn:
specifier: 8.5.0 specifier: 8.5.0
version: 8.5.0 version: 8.5.0
...@@ -25611,9 +25611,9 @@ packages: ...@@ -25611,9 +25611,9 @@ packages:
/zwitch@2.0.4: /zwitch@2.0.4:
resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==}
'@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240126.2(react-refresh@0.12.0)(webpack@5.90.0)': '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240127.2(react-refresh@0.12.0)(webpack@5.90.0)':
resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240126.2} resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240127.2}
id: '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240126.2' id: '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240127.2'
name: '@vercel/turbopack-ecmascript-runtime' name: '@vercel/turbopack-ecmascript-runtime'
version: 0.0.0 version: 0.0.0
dependencies: dependencies:
......
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