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
446b1727
Unverified
Commit
446b1727
authored
Jul 19, 2023
by
Tobias Koppers
Committed by
GitHub
Jul 19, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update turbopack (#52899)
*
https://github.com/vercel/turbo/pull/5563
parent
86d7b85d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
77 deletions
+58
-77
Cargo.lock
Cargo.lock
+35
-35
Cargo.toml
Cargo.toml
+3
-3
project.rs
packages/next-swc/crates/next-api/src/project.rs
+8
-20
next_build.rs
packages/next-swc/crates/next-build/src/next_build.rs
+1
-8
package.json
packages/next-swc/crates/next-core/js/package.json
+2
-2
pnpm-lock.yaml
pnpm-lock.yaml
+9
-9
No files found.
Cargo.lock
View file @
446b1727
This diff is collapsed.
Click to expand it.
Cargo.toml
View file @
446b1727
...
@@ -44,11 +44,11 @@ swc_core = { version = "0.79.13" }
...
@@ -44,11 +44,11 @@ swc_core = { version = "0.79.13" }
testing
=
{
version
=
"0.33.20"
}
testing
=
{
version
=
"0.33.20"
}
# Turbo crates
# Turbo crates
turbopack-binding
=
{
git
=
"https://github.com/vercel/turbo.git"
,
tag
=
"turbopack-23071
8.3
"
}
turbopack-binding
=
{
git
=
"https://github.com/vercel/turbo.git"
,
tag
=
"turbopack-23071
9.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-23071
8.3
"
}
turbo-tasks
=
{
git
=
"https://github.com/vercel/turbo.git"
,
tag
=
"turbopack-23071
9.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-23071
8.3
"
}
turbo-tasks-fs
=
{
git
=
"https://github.com/vercel/turbo.git"
,
tag
=
"turbopack-23071
9.2
"
}
# General Deps
# General Deps
...
...
packages/next-swc/crates/next-api/src/project.rs
View file @
446b1727
use
std
::
path
::
MAIN_SEPARATOR
;
use
std
::
path
::
MAIN_SEPARATOR
;
use
anyhow
::
{
Context
,
Result
}
;
use
anyhow
::
Result
;
use
indexmap
::{
map
::
Entry
,
IndexMap
};
use
indexmap
::{
map
::
Entry
,
IndexMap
};
use
next_core
::{
use
next_core
::{
app_structure
::
find_app_dir
,
app_structure
::
find_app_dir
,
...
@@ -286,31 +286,19 @@ impl Project {
...
@@ -286,31 +286,19 @@ impl Project {
}
}
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
pub
(
super
)
async
fn
ssr_chunking_context
(
self
:
Vc
<
Self
>
)
->
Result
<
Vc
<
BuildChunkingContext
>>
{
pub
(
super
)
fn
ssr_chunking_context
(
self
:
Vc
<
Self
>
)
->
Vc
<
BuildChunkingContext
>
{
let
ssr_chunking_context
=
self
.server_chunking_context
()
.with_layer
(
"ssr"
.to_string
());
self
.server_chunking_context
()
.with_layer
(
"ssr"
.to_string
())
Vc
::
try_resolve_downcast_type
::
<
BuildChunkingContext
>
(
ssr_chunking_context
)
.await
?
.context
(
"with_layer should not change the type of the chunking context"
)
}
}
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
pub
(
super
)
async
fn
ssr_data_chunking_context
(
pub
(
super
)
fn
ssr_data_chunking_context
(
self
:
Vc
<
Self
>
)
->
Vc
<
BuildChunkingContext
>
{
self
:
Vc
<
Self
>
,
self
.server_chunking_context
()
)
->
Result
<
Vc
<
BuildChunkingContext
>>
{
.with_layer
(
"ssr data"
.to_string
())
let
ssr_chunking_context
=
self
.server_chunking_context
()
.with_layer
(
"ssr data"
.to_string
());
Vc
::
try_resolve_downcast_type
::
<
BuildChunkingContext
>
(
ssr_chunking_context
)
.await
?
.context
(
"with_layer should not change the type of the chunking context"
)
}
}
#[turbo_tasks
::
function]
#[turbo_tasks
::
function]
pub
(
super
)
async
fn
rsc_chunking_context
(
self
:
Vc
<
Self
>
)
->
Result
<
Vc
<
BuildChunkingContext
>>
{
pub
(
super
)
fn
rsc_chunking_context
(
self
:
Vc
<
Self
>
)
->
Vc
<
BuildChunkingContext
>
{
let
rsc_chunking_context
=
self
.server_chunking_context
()
.with_layer
(
"rsc"
.to_string
());
self
.server_chunking_context
()
.with_layer
(
"rsc"
.to_string
())
Vc
::
try_resolve_downcast_type
::
<
BuildChunkingContext
>
(
rsc_chunking_context
)
.await
?
.context
(
"with_layer should not change the type of the chunking context"
)
}
}
/// Scans the app/pages directories for entry points files (matching the
/// Scans the app/pages directories for entry points files (matching the
...
...
packages/next-swc/crates/next-build/src/next_build.rs
View file @
446b1727
...
@@ -4,7 +4,7 @@ use std::{
...
@@ -4,7 +4,7 @@ use std::{
path
::{
PathBuf
,
MAIN_SEPARATOR
},
path
::{
PathBuf
,
MAIN_SEPARATOR
},
};
};
use
anyhow
::{
anyhow
,
bail
,
Context
,
Result
};
use
anyhow
::{
anyhow
,
Context
,
Result
};
use
dunce
::
canonicalize
;
use
dunce
::
canonicalize
;
use
next_core
::{
use
next_core
::{
mode
::
NextMode
,
mode
::
NextMode
,
...
@@ -30,7 +30,6 @@ use turbo_tasks::{
...
@@ -30,7 +30,6 @@ use turbo_tasks::{
use
turbopack_binding
::{
use
turbopack_binding
::{
turbo
::
tasks_fs
::{
rebase
,
DiskFileSystem
,
FileContent
,
FileSystem
,
FileSystemPath
},
turbo
::
tasks_fs
::{
rebase
,
DiskFileSystem
,
FileContent
,
FileSystem
,
FileSystemPath
},
turbopack
::{
turbopack
::{
build
::
BuildChunkingContext
,
cli_utils
::
issue
::{
ConsoleUi
,
LogOptions
},
cli_utils
::
issue
::{
ConsoleUi
,
LogOptions
},
core
::{
core
::{
asset
::
Asset
,
asset
::
Asset
,
...
@@ -237,12 +236,6 @@ pub(crate) async fn next_build(options: TransientInstance<BuildOptions>) -> Resu
...
@@ -237,12 +236,6 @@ pub(crate) async fn next_build(options: TransientInstance<BuildOptions>) -> Resu
// be applied on the AssetContext level instead.
// be applied on the AssetContext level instead.
let
rsc_chunking_context
=
server_chunking_context
.with_layer
(
"rsc"
.to_string
());
let
rsc_chunking_context
=
server_chunking_context
.with_layer
(
"rsc"
.to_string
());
let
ssr_chunking_context
=
server_chunking_context
.with_layer
(
"ssr"
.to_string
());
let
ssr_chunking_context
=
server_chunking_context
.with_layer
(
"ssr"
.to_string
());
let
(
Some
(
rsc_chunking_context
),
Some
(
ssr_chunking_context
))
=
(
Vc
::
try_resolve_downcast_type
::
<
BuildChunkingContext
>
(
rsc_chunking_context
)
.await
?
,
Vc
::
try_resolve_downcast_type
::
<
BuildChunkingContext
>
(
ssr_chunking_context
)
.await
?
,
)
else
{
bail!
(
"with_layer should not change the type of the chunking context"
);
};
let
mut
all_chunks
=
vec!
[];
let
mut
all_chunks
=
vec!
[];
...
...
packages/next-swc/crates/next-core/js/package.json
View file @
446b1727
...
@@ -10,8 +10,8 @@
...
@@ -10,8 +10,8 @@
"check"
:
"tsc --noEmit"
"check"
:
"tsc --noEmit"
},
},
"dependencies"
:
{
"dependencies"
:
{
"@vercel/turbopack-ecmascript-runtime"
:
"https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-23071
8.3
"
,
"@vercel/turbopack-ecmascript-runtime"
:
"https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-23071
9.2
"
,
"@vercel/turbopack-node"
:
"https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-23071
8.3
"
,
"@vercel/turbopack-node"
:
"https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-23071
9.2
"
,
"anser"
:
"^2.1.1"
,
"anser"
:
"^2.1.1"
,
"css.escape"
:
"^1.5.1"
,
"css.escape"
:
"^1.5.1"
,
"next"
:
"*"
,
"next"
:
"*"
,
...
...
pnpm-lock.yaml
View file @
446b1727
...
@@ -994,8 +994,8 @@ importers:
...
@@ -994,8 +994,8 @@ importers:
'
@types/react'
:
18.2.7
'
@types/react'
:
18.2.7
'
@types/react-dom'
:
18.2.4
'
@types/react-dom'
:
18.2.4
'
@vercel/ncc'
:
^0.36.0
'
@vercel/ncc'
:
^0.36.0
'
@vercel/turbopack-ecmascript-runtime'
:
https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-23071
8.3
'
@vercel/turbopack-ecmascript-runtime'
:
https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-23071
9.2
'
@vercel/turbopack-node'
:
https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-23071
8.3
'
@vercel/turbopack-node'
:
https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-23071
9.2
anser
:
^2.1.1
anser
:
^2.1.1
css.escape
:
^1.5.1
css.escape
:
^1.5.1
find-up
:
^6.3.0
find-up
:
^6.3.0
...
@@ -1007,8 +1007,8 @@ importers:
...
@@ -1007,8 +1007,8 @@ importers:
stacktrace-parser
:
^0.1.10
stacktrace-parser
:
^0.1.10
strip-ansi
:
^7.0.1
strip-ansi
:
^7.0.1
dependencies
:
dependencies
:
'
@vercel/turbopack-ecmascript-runtime'
:
'
@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-23071
8.3
_react-refresh@0.12.0'
'
@vercel/turbopack-ecmascript-runtime'
:
'
@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-23071
9.2
_react-refresh@0.12.0'
'
@vercel/turbopack-node'
:
'
@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-23071
8.3
'
'
@vercel/turbopack-node'
:
'
@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-23071
9.2
'
anser
:
2.1.1
anser
:
2.1.1
css.escape
:
1.5.1
css.escape
:
1.5.1
next
:
link:../../../../next
next
:
link:../../../../next
...
@@ -25670,9 +25670,9 @@ packages:
...
@@ -25670,9 +25670,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-23071
8.3
_react-refresh@0.12.0'
:
'
@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-23071
9.2
_react-refresh@0.12.0'
:
resolution
:
{
tarball
:
https
:
//gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js
?
turbopack-23071
8.3
}
resolution
:
{
tarball
:
https
:
//gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js
?
turbopack-23071
9.2
}
id
:
'
@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-23071
8.3
'
id
:
'
@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-23071
9.2
'
name
:
'
@vercel/turbopack-ecmascript-runtime'
name
:
'
@vercel/turbopack-ecmascript-runtime'
version
:
0.0.0
version
:
0.0.0
dependencies
:
dependencies
:
...
@@ -25683,8 +25683,8 @@ packages:
...
@@ -25683,8 +25683,8 @@ packages:
-
webpack
-
webpack
dev
:
false
dev
:
false
'
@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-23071
8.3
'
:
'
@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-23071
9.2
'
:
resolution
:
{
tarball
:
https
:
//gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js
?
turbopack-23071
8.3
}
resolution
:
{
tarball
:
https
:
//gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js
?
turbopack-23071
9.2
}
name
:
'
@vercel/turbopack-node'
name
:
'
@vercel/turbopack-node'
version
:
0.0.0
version
:
0.0.0
dependencies
:
dependencies
:
...
...
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