Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
1fac9a1b
Unverified
Commit
1fac9a1b
authored
Feb 13, 2026
by
Niklas Mischkulnig
Committed by
GitHub
Feb 13, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade to swc 56 (#89111)
parent
30dbf5ca
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
418 additions
and
342 deletions
+418
-342
Cargo.lock
Cargo.lock
+391
-302
Cargo.toml
Cargo.toml
+10
-10
chain_transforms.rs
crates/next-custom-transforms/src/chain_transforms.rs
+5
-9
full.rs
crates/next-custom-transforms/tests/full.rs
+1
-1
output.js
.../next-custom-transforms/tests/loader/auto-cjs/1/output.js
+3
-8
output.js
...tom-transforms/tests/loader/auto-cjs/react-prod/output.js
+0
-4
output.js
...ext-custom-transforms/tests/loader/front/attr-1/output.js
+1
-1
output.js
...next-custom-transforms/tests/loader/issue-32553/output.js
+1
-0
output.js
...next-custom-transforms/tests/loader/issue-40231/output.js
+0
-1
Cargo.toml
crates/next-napi-bindings/Cargo.toml
+1
-0
Cargo.toml
turbopack/crates/turbopack-ecmascript/Cargo.toml
+0
-1
5c1d0_turbopack-tests_tests_snapshot_swc_transforms_preset_env_input_index_5aaf1327.js
...napshot_swc_transforms_preset_env_input_index_5aaf1327.js
+3
-3
780ce_turbopack-tests_tests_snapshot_swc_transforms_preset_env_input_index_5aaf1327.js.map
...hot_swc_transforms_preset_env_input_index_5aaf1327.js.map
+2
-2
No files found.
Cargo.lock
View file @
1fac9a1b
This diff is collapsed.
Click to expand it.
Cargo.toml
View file @
1fac9a1b
...
@@ -336,25 +336,25 @@ turbopack-trace-utils = { path = "turbopack/crates/turbopack-trace-utils" }
...
@@ -336,25 +336,25 @@ 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
=
"5
4
.0.0"
,
features
=
[
swc_core
=
{
version
=
"5
6
.0.0"
,
features
=
[
"ecma_loader_lru"
,
"ecma_loader_lru"
,
"ecma_loader_parking_lot"
,
"ecma_loader_parking_lot"
,
"parallel_rayon"
,
"parallel_rayon"
,
]
}
]
}
swc_plugin_backend_wasmer
=
{
version
=
"
6
.0.0"
}
swc_plugin_backend_wasmer
=
{
version
=
"
7
.0.0"
}
testing
=
"19.0.0"
testing
=
"19.0.0"
# Keep consistent with preset_env_base through swc_core
# Keep consistent with preset_env_base through swc_core
browserslist-rs
=
"0.19.0"
browserslist-rs
=
"0.19.0"
mdxjs
=
"1.0.3"
mdxjs
=
"1.0.3"
modularize_imports
=
"0.1
08
.0"
modularize_imports
=
"0.1
10
.0"
styled_components
=
"0.13
6
.0"
styled_components
=
"0.13
8
.0"
styled_jsx
=
"0.11
1
.0"
styled_jsx
=
"0.11
3
.0"
swc_emotion
=
"0.11
2
.0"
swc_emotion
=
"0.11
4
.0"
swc_relay
=
"0.8
2
.0"
swc_relay
=
"0.8
4
.0"
react_remove_properties
=
"0.6
2
.0"
react_remove_properties
=
"0.6
4
.0"
remove_console
=
"0.6
3
.0"
remove_console
=
"0.6
5
.0"
preset_env_base
=
"
6
.0.0"
preset_env_base
=
"
7
.0.0"
# General Deps
# General Deps
...
...
crates/next-custom-transforms/src/chain_transforms.rs
View file @
1fac9a1b
...
@@ -161,21 +161,17 @@ where
...
@@ -161,21 +161,17 @@ where
fn_pass
(
move
|
program
|
{
fn_pass
(
move
|
program
|
{
if
let
Some
(
config
)
=
opts
.styled_jsx
.to_option
()
{
if
let
Some
(
config
)
=
opts
.styled_jsx
.to_option
()
{
let
target_browsers
=
opts
let
target_browsers
=
opts
.css_env
.as_ref
()
.map
(|
env
|
{
.css_env
targets_to_versions
(
env
.targets
.clone
(),
None
)
.as_ref
()
.expect
(
"failed to parse env.targets"
)
.map
(|
env
|
{
});
targets_to_versions
(
env
.targets
.clone
(),
None
)
.expect
(
"failed to parse env.targets"
)
})
.unwrap_or_default
();
program
.mutate
(
styled_jsx
::
visitor
::
styled_jsx
(
program
.mutate
(
styled_jsx
::
visitor
::
styled_jsx
(
cm
.clone
(),
cm
.clone
(),
&
file
.name
,
&
file
.name
,
&
styled_jsx
::
visitor
::
Config
{
&
styled_jsx
::
visitor
::
Config
{
use_lightningcss
:
config
.use_lightningcss
,
use_lightningcss
:
config
.use_lightningcss
,
browsers
:
*
target_browsers
,
browsers
:
*
target_browsers
.map
(|
t
|
t
.versions
)
.unwrap_or_default
()
,
},
},
&
styled_jsx
::
visitor
::
NativeConfig
{
process_css
:
None
},
&
styled_jsx
::
visitor
::
NativeConfig
{
process_css
:
None
},
))
))
...
...
crates/next-custom-transforms/tests/full.rs
View file @
1fac9a1b
...
@@ -38,7 +38,7 @@ fn test(input: &Path, minify: bool) {
...
@@ -38,7 +38,7 @@ fn test(input: &Path, minify: bool) {
output_path
:
Some
(
output
.clone
()),
output_path
:
Some
(
output
.clone
()),
config
:
swc_core
::
base
::
config
::
Config
{
config
:
swc_core
::
base
::
config
::
Config
{
is_module
:
Some
(
swc_core
::
base
::
config
::
IsModule
::
Bool
(
true
)
),
is_module
:
Some
(
swc_core
::
base
::
config
::
IsModule
::
Unknown
),
jsc
:
swc_core
::
base
::
config
::
JscConfig
{
jsc
:
swc_core
::
base
::
config
::
JscConfig
{
minify
:
if
minify
{
minify
:
if
minify
{
...
...
crates/next-custom-transforms/tests/loader/auto-cjs/1/output.js
View file @
1fac9a1b
"use strict"
;
import
mixed
from
'esm'
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
console
.
log
(
mixed
.
foo
);
value
:
true
module
.
exports
=
mixed
;
});
var
_interop_require_default
=
require
(
"@swc/helpers/_/_interop_require_default"
);
var
_esm
=
/*#__PURE__*/
_interop_require_default
.
_
(
require
(
"esm"
));
console
.
log
(
_esm
.
default
.
foo
);
module
.
exports
=
_esm
.
default
;
crates/next-custom-transforms/tests/loader/auto-cjs/react-prod/output.js
View file @
1fac9a1b
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
_class_call_check
=
require
(
"@swc/helpers/_/_class_call_check"
);
var
_class_call_check
=
require
(
"@swc/helpers/_/_class_call_check"
);
// This file should not import helpers using ESM syntax
// This file should not import helpers using ESM syntax
var
E
=
function
Foo
()
{
var
E
=
function
Foo
()
{
...
...
crates/next-custom-transforms/tests/loader/front/attr-1/output.js
View file @
1fac9a1b
import
_JSXStyle
from
"styled-jsx/style"
;
import
_JSXStyle
from
"styled-jsx/style"
;
export
default
function
Foo
()
{
export
default
function
Foo
()
{
return
/*#__PURE__*/
React
.
createElement
(
"div"
,
{
return
/*#__PURE__*/
React
.
createElement
(
"div"
,
{
render
:
function
(
v
)
{
render
:
function
render
(
v
)
{
return
/*#__PURE__*/
React
.
createElement
(
"form"
,
{
return
/*#__PURE__*/
React
.
createElement
(
"form"
,
{
className
:
"jsx-3d44fb7892a1f38b"
className
:
"jsx-3d44fb7892a1f38b"
});
});
...
...
crates/next-custom-transforms/tests/loader/issue-32553/output.js
View file @
1fac9a1b
;
/*#__PURE__*/
React
.
createElement
(
"div"
,
null
,
"children"
);
/*#__PURE__*/
React
.
createElement
(
"div"
,
null
,
"children"
);
'<>hello</>'
;
'<>hello</>'
;
crates/next-custom-transforms/tests/loader/issue-40231/output.js
View file @
1fac9a1b
"use strict"
;
function
loadSomethingWithDynamicImport
(
param
)
{
function
loadSomethingWithDynamicImport
(
param
)
{
return
import
(
"something/"
.
concat
(
param
)).
then
(
function
(
r
)
{
return
import
(
"something/"
.
concat
(
param
)).
then
(
function
(
r
)
{
return
r
.
default
;
return
r
.
default
;
...
...
crates/next-napi-bindings/Cargo.toml
View file @
1fac9a1b
...
@@ -82,6 +82,7 @@ once_cell = { workspace = true }
...
@@ -82,6 +82,7 @@ once_cell = { workspace = true }
swc_core
=
{
workspace
=
true
,
features
=
[
swc_core
=
{
workspace
=
true
,
features
=
[
"base"
,
"base"
,
"base_module"
,
"common_concurrent"
,
"common_concurrent"
,
"ecma_ast"
,
"ecma_ast"
,
"ecma_ast_serde"
,
"ecma_ast_serde"
,
...
...
turbopack/crates/turbopack-ecmascript/Cargo.toml
View file @
1fac9a1b
...
@@ -72,7 +72,6 @@ swc_core = { workspace = true, features = [
...
@@ -72,7 +72,6 @@ swc_core = { workspace = true, features = [
"ecma_parser"
,
"ecma_parser"
,
"ecma_preset_env"
,
"ecma_preset_env"
,
"ecma_transforms"
,
"ecma_transforms"
,
"ecma_transforms_module"
,
"ecma_transforms_react"
,
"ecma_transforms_react"
,
"ecma_transforms_optimization"
,
"ecma_transforms_optimization"
,
"ecma_transforms_typescript"
,
"ecma_transforms_typescript"
,
...
...
turbopack/crates/turbopack-tests/tests/snapshot/swc_transforms/preset_env/output/5c1d0_turbopack-tests_tests_snapshot_swc_transforms_preset_env_input_index_5aaf1327.js
View file @
1fac9a1b
...
@@ -716,7 +716,7 @@ function asyncModule(body, hasAwait) {
...
@@ -716,7 +716,7 @@ function asyncModule(body, hasAwait) {
Object
.
defineProperty
(
module
,
'namespaceObject'
,
attributes
);
Object
.
defineProperty
(
module
,
'namespaceObject'
,
attributes
);
function
handleAsyncDependencies
(
deps
)
{
function
handleAsyncDependencies
(
deps
)
{
var
currentDeps
=
wrapDeps
(
deps
);
var
currentDeps
=
wrapDeps
(
deps
);
var
getResult
=
function
()
{
var
getResult
=
function
getResult
()
{
return
currentDeps
.
map
(
function
(
d
)
{
return
currentDeps
.
map
(
function
(
d
)
{
if
(
d
[
turbopackError
])
throw
d
[
turbopackError
];
if
(
d
[
turbopackError
])
throw
d
[
turbopackError
];
return
d
[
turbopackExports
];
return
d
[
turbopackExports
];
...
@@ -1416,7 +1416,7 @@ function getOrInstantiateRuntimeModule(chunkPath, moduleId) {
...
@@ -1416,7 +1416,7 @@ function getOrInstantiateRuntimeModule(chunkPath, moduleId) {
*/
// Used by the backend
*/
// Used by the backend
// @ts-ignore
// @ts-ignore
// eslint-disable-next-line @typescript-eslint/no-unused-vars
// eslint-disable-next-line @typescript-eslint/no-unused-vars
var
getOrInstantiateModuleFromParent
=
function
(
id
,
sourceModule
)
{
var
getOrInstantiateModuleFromParent
=
function
getOrInstantiateModuleFromParent
(
id
,
sourceModule
)
{
var
module
=
moduleCache
[
id
];
var
module
=
moduleCache
[
id
];
if
(
module
)
{
if
(
module
)
{
if
(
module
.
error
)
{
if
(
module
.
error
)
{
...
@@ -1747,7 +1747,7 @@ var BACKEND;
...
@@ -1747,7 +1747,7 @@ var BACKEND;
resolved
:
false
,
resolved
:
false
,
loadingStarted
:
false
,
loadingStarted
:
false
,
promise
:
promise
,
promise
:
promise
,
resolve
:
function
()
{
resolve
:
function
resolve1
()
{
resolver
.
resolved
=
true
;
resolver
.
resolved
=
true
;
resolve
();
resolve
();
},
},
...
...
turbopack/crates/turbopack-tests/tests/snapshot/swc_transforms/preset_env/output/780ce_turbopack-tests_tests_snapshot_swc_transforms_preset_env_input_index_5aaf1327.js.map
View file @
1fac9a1b
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment