Unverified Commit 446b1727 authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

update turbopack (#52899)

* https://github.com/vercel/turbo/pull/5563 
parent 86d7b85d
This diff is collapsed.
...@@ -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-230718.3" } turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230719.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-230718.3" } turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230719.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-230718.3" } turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230719.2" }
# General Deps # General Deps
......
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
......
...@@ -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![];
......
...@@ -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-230718.3", "@vercel/turbopack-ecmascript-runtime": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230719.2",
"@vercel/turbopack-node": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-230718.3", "@vercel/turbopack-node": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-230719.2",
"anser": "^2.1.1", "anser": "^2.1.1",
"css.escape": "^1.5.1", "css.escape": "^1.5.1",
"next": "*", "next": "*",
......
...@@ -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-230718.3 '@vercel/turbopack-ecmascript-runtime': https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230719.2
'@vercel/turbopack-node': https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-230718.3 '@vercel/turbopack-node': https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-230719.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-230718.3_react-refresh@0.12.0' '@vercel/turbopack-ecmascript-runtime': '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230719.2_react-refresh@0.12.0'
'@vercel/turbopack-node': '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-230718.3' '@vercel/turbopack-node': '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-230719.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-230718.3_react-refresh@0.12.0': '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230719.2_react-refresh@0.12.0':
resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230718.3} resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230719.2}
id: '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230718.3' id: '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230719.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-230718.3': '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-230719.2':
resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-230718.3} resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-230719.2}
name: '@vercel/turbopack-node' name: '@vercel/turbopack-node'
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