From c7cbe58f214223769a503be3c2576f0c416d3cc2 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Fri, 7 Jul 2023 11:13:18 +0000 Subject: [PATCH 1/9] add Module trait to all modules --- .../src/next_client_chunks/in_chunking_context_asset.rs | 4 ++++ .../crates/next-core/src/next_client_chunks/with_chunks.rs | 4 ++++ .../with_chunking_context_scope_asset.rs | 4 ++++ .../next-core/src/next_client_component/with_client_chunks.rs | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/packages/next-swc/crates/next-core/src/next_client_chunks/in_chunking_context_asset.rs b/packages/next-swc/crates/next-core/src/next_client_chunks/in_chunking_context_asset.rs index 5daf588c75a47..31d9b4b061222 100644 --- a/packages/next-swc/crates/next-core/src/next_client_chunks/in_chunking_context_asset.rs +++ b/packages/next-swc/crates/next-core/src/next_client_chunks/in_chunking_context_asset.rs @@ -8,6 +8,7 @@ use turbopack_binding::turbopack::{ ChunkingContextVc, }, ident::AssetIdentVc, + module::{Module, ModuleVc}, reference::AssetReferencesVc, }, ecmascript::chunk::EcmascriptChunkingContextVc, @@ -46,6 +47,9 @@ impl Asset for InChunkingContextAsset { } } +#[turbo_tasks::value_impl] +impl Module for InChunkingContextAsset {} + #[turbo_tasks::value_impl] impl ChunkableAsset for InChunkingContextAsset { #[turbo_tasks::function] diff --git a/packages/next-swc/crates/next-core/src/next_client_chunks/with_chunks.rs b/packages/next-swc/crates/next-core/src/next_client_chunks/with_chunks.rs index 17c1fb6f132e1..3748c95a51baa 100644 --- a/packages/next-swc/crates/next-core/src/next_client_chunks/with_chunks.rs +++ b/packages/next-swc/crates/next-core/src/next_client_chunks/with_chunks.rs @@ -16,6 +16,7 @@ use turbopack_binding::{ ChunkingContextVc, ChunksDataVc, }, ident::AssetIdentVc, + module::{Module, ModuleVc}, reference::AssetReferencesVc, }, ecmascript::{ @@ -66,6 +67,9 @@ impl Asset for WithChunksAsset { } } +#[turbo_tasks::value_impl] +impl Module for WithChunksAsset {} + #[turbo_tasks::value_impl] impl ChunkableAsset for WithChunksAsset { #[turbo_tasks::function] diff --git a/packages/next-swc/crates/next-core/src/next_client_component/with_chunking_context_scope_asset.rs b/packages/next-swc/crates/next-core/src/next_client_component/with_chunking_context_scope_asset.rs index d2dda180f15cb..cc0f08ba9da5a 100644 --- a/packages/next-swc/crates/next-core/src/next_client_component/with_chunking_context_scope_asset.rs +++ b/packages/next-swc/crates/next-core/src/next_client_component/with_chunking_context_scope_asset.rs @@ -8,6 +8,7 @@ use turbopack_binding::turbopack::{ ChunkingContext, ChunkingContextVc, }, ident::AssetIdentVc, + module::{Module, ModuleVc}, reference::AssetReferencesVc, }, ecmascript::chunk::EcmascriptChunkingContextVc, @@ -46,6 +47,9 @@ impl Asset for WithChunkingContextScopeAsset { } } +#[turbo_tasks::value_impl] +impl Module for WithChunkingContextScopeAsset {} + #[turbo_tasks::value_impl] impl ChunkableAsset for WithChunkingContextScopeAsset { #[turbo_tasks::function] diff --git a/packages/next-swc/crates/next-core/src/next_client_component/with_client_chunks.rs b/packages/next-swc/crates/next-core/src/next_client_component/with_client_chunks.rs index b87fae3827d7b..7cd389ef6371f 100644 --- a/packages/next-swc/crates/next-core/src/next_client_component/with_client_chunks.rs +++ b/packages/next-swc/crates/next-core/src/next_client_component/with_client_chunks.rs @@ -13,6 +13,7 @@ use turbopack_binding::{ ChunkingTypeOptionVc, ChunksDataVc, }, ident::AssetIdentVc, + module::{Module, ModuleVc}, proxied_asset::ProxiedAssetVc, reference::{ AssetReference, AssetReferenceVc, AssetReferencesVc, SingleAssetReferenceVc, @@ -65,6 +66,9 @@ impl Asset for WithClientChunksAsset { } } +#[turbo_tasks::value_impl] +impl Module for WithClientChunksAsset {} + #[turbo_tasks::value_impl] impl ChunkableAsset for WithClientChunksAsset { #[turbo_tasks::function] From 345ffdbeddb06d02268680f29daecde27ebd2739 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Fri, 7 Jul 2023 15:10:04 +0000 Subject: [PATCH 2/9] change some return values to Modules --- .../src/next_pages/client_context.rs | 7 +++- .../next_server_component_transition.rs | 8 ++-- .../next-core/src/app_segment_config.rs | 9 ++-- .../crates/next-core/src/app_source.rs | 42 ++++++++++++------- .../crates/next-core/src/bootstrap.rs | 2 +- .../next-core/src/next_client/transition.rs | 8 ++-- .../client_chunks_transition.rs | 6 +-- .../server_to_client_transition.rs | 7 ++-- .../ssr_client_module_transition.rs | 6 +-- .../crates/next-core/src/next_config.rs | 4 +- .../src/next_edge/page_transition.rs | 9 ++-- .../src/next_edge/route_transition.rs | 11 +++-- .../next-core/src/next_font/google/mod.rs | 2 +- .../crates/next-core/src/next_image/module.rs | 5 ++- .../crates/next-core/src/page_loader.rs | 16 +++---- .../crates/next-core/src/page_source.rs | 24 ++++++----- .../next-swc/crates/next-core/src/router.rs | 42 +++++++++---------- .../next-swc/crates/next-core/src/util.rs | 17 ++++---- 18 files changed, 124 insertions(+), 101 deletions(-) diff --git a/packages/next-swc/crates/next-build/src/next_pages/client_context.rs b/packages/next-swc/crates/next-build/src/next_pages/client_context.rs index e4f3c1fa75c2a..429d3e699003d 100644 --- a/packages/next-swc/crates/next-build/src/next_pages/client_context.rs +++ b/packages/next-swc/crates/next-build/src/next_pages/client_context.rs @@ -70,8 +70,11 @@ impl PagesBuildClientContextVc { let this = self.await?; let client_asset_page = this.client_asset_context.process(asset, reference_type); - let client_asset_page = - create_page_loader_entry_asset(this.client_asset_context, client_asset_page, pathname); + let client_asset_page = create_page_loader_entry_asset( + this.client_asset_context, + client_asset_page.into(), + pathname, + ); let Some(client_module_asset) = EcmascriptModuleAssetVc::resolve_from(client_asset_page).await? diff --git a/packages/next-swc/crates/next-core/src/app_render/next_server_component_transition.rs b/packages/next-swc/crates/next-core/src/app_render/next_server_component_transition.rs index 4b205a93f21ea..cd6f2d0ddda33 100644 --- a/packages/next-swc/crates/next-core/src/app_render/next_server_component_transition.rs +++ b/packages/next-swc/crates/next-core/src/app_render/next_server_component_transition.rs @@ -2,7 +2,7 @@ use anyhow::{bail, Result}; use turbopack_binding::{ turbo::tasks_fs::FileSystemPathVc, turbopack::{ - core::{asset::AssetVc, compile_time_info::CompileTimeInfoVc}, + core::{compile_time_info::CompileTimeInfoVc, module::ModuleVc}, ecmascript::chunk::EcmascriptChunkPlaceableVc, turbopack::{ module_options::ModuleOptionsContextVc, @@ -55,10 +55,10 @@ impl Transition for NextServerComponentTransition { #[turbo_tasks::function] async fn process_module( &self, - asset: AssetVc, + module: ModuleVc, _context: ModuleAssetContextVc, - ) -> Result { - let Some(asset) = EcmascriptChunkPlaceableVc::resolve_from(asset).await? else { + ) -> Result { + let Some(asset) = EcmascriptChunkPlaceableVc::resolve_from(module).await? else { bail!("Not an ecmascript module"); }; diff --git a/packages/next-swc/crates/next-core/src/app_segment_config.rs b/packages/next-swc/crates/next-core/src/app_segment_config.rs index ba20e19aecf9f..063e10c412367 100644 --- a/packages/next-swc/crates/next-core/src/app_segment_config.rs +++ b/packages/next-swc/crates/next-core/src/app_segment_config.rs @@ -17,6 +17,7 @@ use turbopack_binding::turbopack::{ issue::{ Issue, IssueSeverity, IssueSeverityVc, IssueSourceVc, IssueVc, OptionIssueSourceVc, }, + module::ModuleVc, reference_type::{EcmaScriptModulesReferenceSubType, ReferenceType}, source_asset::SourceAssetVc, }, @@ -211,7 +212,7 @@ impl Issue for NextSegmentConfigParsingIssue { #[turbo_tasks::function] pub async fn parse_segment_config_from_source( - module_asset: AssetVc, + module_asset: ModuleVc, ) -> Result { let Some(ecmascript_asset) = EcmascriptModuleAssetVc::resolve_from(module_asset).await? else { return Ok(NextSegmentConfigVc::default()); @@ -256,7 +257,7 @@ fn issue_source(source: AssetVc, span: Span) -> IssueSourceVc { } fn parse_config_value( - module_asset: AssetVc, + module: ModuleVc, config: &mut NextSegmentConfig, ident: &Ident, init: &Expr, @@ -266,9 +267,9 @@ fn parse_config_value( let invalid_config = |detail: &str, value: &JsValue| { let (explainer, hints) = value.explain(2, 0); NextSegmentConfigParsingIssue { - ident: module_asset.ident(), + ident: module.ident(), detail: StringVc::cell(format!("{detail} Got {explainer}.{hints}")), - source: issue_source(module_asset, span), + source: issue_source(module.into(), span), } .cell() .as_issue() diff --git a/packages/next-swc/crates/next-core/src/app_source.rs b/packages/next-swc/crates/next-core/src/app_source.rs index 9e4dd3913b8d3..3fe1aee9f3475 100644 --- a/packages/next-swc/crates/next-core/src/app_source.rs +++ b/packages/next-swc/crates/next-core/src/app_source.rs @@ -872,12 +872,16 @@ import {}, {{ chunks as {} }} from "COMPONENT_{}"; state.inner_assets.insert( format!("COMPONENT_{i}"), - state.context.with_transition(state.rsc_transition).process( - SourceAssetVc::new(component).into(), - Value::new(ReferenceType::EcmaScriptModules( - EcmaScriptModulesReferenceSubType::Undefined, - )), - ), + state + .context + .with_transition(state.rsc_transition) + .process( + SourceAssetVc::new(component).into(), + Value::new(ReferenceType::EcmaScriptModules( + EcmaScriptModulesReferenceSubType::Undefined, + )), + ) + .into(), ); } Ok(()) @@ -978,7 +982,8 @@ import {}, {{ chunks as {} }} from "COMPONENT_{}"; SourceAssetVc::new(*path).into(), BlurPlaceholderMode::None, state.context, - ), + ) + .into(), ); writeln!(state.loader_tree_code, "{s}(async (props) => [{{")?; writeln!(state.loader_tree_code, "{s} url: {identifier}.src,")?; @@ -1000,11 +1005,16 @@ import {}, {{ chunks as {} }} from "COMPONENT_{}"; .push(format!("import {identifier} from \"{inner_module_id}\";")); state.inner_assets.insert( inner_module_id, - state.context.process( - TextContentSourceAssetVc::new(SourceAssetVc::new(*alt_path).into()) + state + .context + .process( + TextContentSourceAssetVc::new( + SourceAssetVc::new(*alt_path).into(), + ) .into(), - Value::new(ReferenceType::Internal(InnerAssetsVc::empty())), - ), + Value::new(ReferenceType::Internal(InnerAssetsVc::empty())), + ) + .into(), ); writeln!(state.loader_tree_code, "{s} alt: {identifier},")?; } @@ -1125,13 +1135,13 @@ import {}, {{ chunks as {} }} from "COMPONENT_{}"; "APP_ENTRY".to_string() => context.with_transition(rsc_transition).process( asset.into(), Value::new(ReferenceType::Internal(InnerAssetsVc::cell(inner_assets))), - ), + ).into(), "APP_BOOTSTRAP".to_string() => context.with_transition("next-client").process( SourceAssetVc::new(next_js_file_path("entry/app/hydrate.tsx")).into(), Value::new(ReferenceType::EcmaScriptModules( EcmaScriptModulesReferenceSubType::Undefined, )), - ), + ).into(), }))), ), Some(NextRuntime::Edge) => @@ -1141,7 +1151,7 @@ import {}, {{ chunks as {} }} from "COMPONENT_{}"; "INNER_EDGE_CHUNK_GROUP".to_string() => context.with_transition("next-edge-page").process( asset.into(), Value::new(ReferenceType::Internal(InnerAssetsVc::cell(inner_assets))), - ), + ).into(), }))), ) }; @@ -1225,7 +1235,7 @@ impl AppRouteVc { let bootstrap_asset = next_asset("entry/app/route.ts"); route_bootstrap( - entry_asset, + entry_asset.into(), this.context.into(), this.project_path, bootstrap_asset, @@ -1243,7 +1253,7 @@ impl AppRouteVc { let module = this.context.process( internal_asset, Value::new(ReferenceType::Internal(InnerAssetsVc::cell(indexmap! { - "ROUTE_CHUNK_GROUP".to_string() => entry + "ROUTE_CHUNK_GROUP".to_string() => entry.into() }))), ); diff --git a/packages/next-swc/crates/next-core/src/bootstrap.rs b/packages/next-swc/crates/next-core/src/bootstrap.rs index 93533b54f788b..202c6bb9594ab 100644 --- a/packages/next-swc/crates/next-core/src/bootstrap.rs +++ b/packages/next-swc/crates/next-core/src/bootstrap.rs @@ -122,7 +122,7 @@ pub async fn bootstrap( let mut inner_assets = inner_assets.await?.clone_value(); inner_assets.insert("ENTRY".to_string(), asset); - inner_assets.insert("BOOTSTRAP_CONFIG".to_string(), config_asset); + inner_assets.insert("BOOTSTRAP_CONFIG".to_string(), config_asset.into()); let asset = context.process( bootstrap_asset, diff --git a/packages/next-swc/crates/next-core/src/next_client/transition.rs b/packages/next-swc/crates/next-core/src/next_client/transition.rs index 2211b566f7847..9388e5801e80c 100644 --- a/packages/next-swc/crates/next-core/src/next_client/transition.rs +++ b/packages/next-swc/crates/next-core/src/next_client/transition.rs @@ -3,10 +3,10 @@ use indexmap::indexmap; use turbo_tasks::Value; use turbopack_binding::turbopack::{ core::{ - asset::AssetVc, chunk::{ChunkingContext, ChunkingContextVc}, compile_time_info::CompileTimeInfoVc, context::AssetContext, + module::ModuleVc, reference_type::{InnerAssetsVc, ReferenceType}, }, ecmascript::chunk::EcmascriptChunkPlaceableVc, @@ -66,16 +66,16 @@ impl Transition for NextClientTransition { #[turbo_tasks::function] async fn process_module( &self, - asset: AssetVc, + asset: ModuleVc, context: ModuleAssetContextVc, - ) -> Result { + ) -> Result { let asset = if !self.is_app { let internal_asset = next_asset("entry/next-hydrate.tsx"); context.process( internal_asset, Value::new(ReferenceType::Internal(InnerAssetsVc::cell(indexmap! { - "PAGE".to_string() => asset + "PAGE".to_string() => asset.into() }))), ) } else { diff --git a/packages/next-swc/crates/next-core/src/next_client_chunks/client_chunks_transition.rs b/packages/next-swc/crates/next-core/src/next_client_chunks/client_chunks_transition.rs index 4397a859a122c..f6f88b37f7dfe 100644 --- a/packages/next-swc/crates/next-core/src/next_client_chunks/client_chunks_transition.rs +++ b/packages/next-swc/crates/next-core/src/next_client_chunks/client_chunks_transition.rs @@ -3,7 +3,7 @@ use turbo_tasks::Value; use turbopack_binding::{ turbo::tasks_fs::FileSystemPathVc, turbopack::{ - core::{asset::AssetVc, chunk::ChunkingContextVc, compile_time_info::CompileTimeInfoVc}, + core::{chunk::ChunkingContextVc, compile_time_info::CompileTimeInfoVc, module::ModuleVc}, node::execution_context::ExecutionContextVc, turbopack::{ ecmascript::chunk::EcmascriptChunkPlaceableVc, @@ -106,9 +106,9 @@ impl Transition for NextClientChunksTransition { #[turbo_tasks::function] async fn process_module( &self, - asset: AssetVc, + asset: ModuleVc, _context: ModuleAssetContextVc, - ) -> Result { + ) -> Result { Ok( if let Some(placeable) = EcmascriptChunkPlaceableVc::resolve_from(asset).await? { WithChunksAsset { diff --git a/packages/next-swc/crates/next-core/src/next_client_component/server_to_client_transition.rs b/packages/next-swc/crates/next-core/src/next_client_component/server_to_client_transition.rs index 938c7fa184c0f..08bc2da3c32dc 100644 --- a/packages/next-swc/crates/next-core/src/next_client_component/server_to_client_transition.rs +++ b/packages/next-swc/crates/next-core/src/next_client_component/server_to_client_transition.rs @@ -5,6 +5,7 @@ use turbopack_binding::turbopack::{ core::{ asset::AssetVc, context::AssetContext, + module::ModuleVc, reference_type::{EntryReferenceSubType, InnerAssetsVc, ReferenceType}, }, turbopack::{ @@ -28,7 +29,7 @@ impl Transition for NextServerToClientTransition { asset: AssetVc, context: ModuleAssetContextVc, _reference_type: Value, - ) -> Result { + ) -> Result { let internal_asset = next_asset(if self_vc.await?.ssr { "entry/app/server-to-client-ssr.tsx" } else { @@ -50,8 +51,8 @@ impl Transition for NextServerToClientTransition { Ok(context.process( internal_asset, Value::new(ReferenceType::Internal(InnerAssetsVc::cell(indexmap! { - "CLIENT_MODULE".to_string() => client_module, - "CLIENT_CHUNKS".to_string() => client_chunks, + "CLIENT_MODULE".to_string() => client_module.into(), + "CLIENT_CHUNKS".to_string() => client_chunks.into(), }))), )) } diff --git a/packages/next-swc/crates/next-core/src/next_client_component/ssr_client_module_transition.rs b/packages/next-swc/crates/next-core/src/next_client_component/ssr_client_module_transition.rs index c353ae965a6a8..257b44678e42e 100644 --- a/packages/next-swc/crates/next-core/src/next_client_component/ssr_client_module_transition.rs +++ b/packages/next-swc/crates/next-core/src/next_client_component/ssr_client_module_transition.rs @@ -1,6 +1,6 @@ use anyhow::Result; use turbopack_binding::turbopack::{ - core::{asset::AssetVc, compile_time_info::CompileTimeInfoVc}, + core::{compile_time_info::CompileTimeInfoVc, module::ModuleVc}, turbopack::{ ecmascript::chunk::EcmascriptChunkPlaceableVc, module_options::ModuleOptionsContextVc, @@ -48,9 +48,9 @@ impl Transition for NextSSRClientModuleTransition { #[turbo_tasks::function] async fn process_module( &self, - asset: AssetVc, + asset: ModuleVc, _context: ModuleAssetContextVc, - ) -> Result { + ) -> Result { Ok( if let Some(placeable) = EcmascriptChunkPlaceableVc::resolve_from(asset).await? { WithChunkingContextScopeAsset { diff --git a/packages/next-swc/crates/next-core/src/next_config.rs b/packages/next-swc/crates/next-core/src/next_config.rs index b286f9503bb02..fc4a01edaa890 100644 --- a/packages/next-swc/crates/next-core/src/next_config.rs +++ b/packages/next-swc/crates/next-core/src/next_config.rs @@ -684,14 +684,14 @@ pub async fn load_next_config_internal( config_asset.into(), Value::new(ReferenceType::Internal(InnerAssetsVc::empty())), ); - any_content_changed(config_asset) + any_content_changed(config_asset.into()) }); let load_next_config_asset = context.process( next_asset("entry/config/next.js"), Value::new(ReferenceType::Entry(EntryReferenceSubType::Undefined)), ); let config_value = evaluate( - load_next_config_asset, + load_next_config_asset.into(), project_path, env, config_asset.map_or_else(|| AssetIdentVc::from_path(project_path), |c| c.ident()), diff --git a/packages/next-swc/crates/next-core/src/next_edge/page_transition.rs b/packages/next-swc/crates/next-core/src/next_edge/page_transition.rs index 277a55de49360..bd0cf15f9eee5 100644 --- a/packages/next-swc/crates/next-core/src/next_edge/page_transition.rs +++ b/packages/next-swc/crates/next-core/src/next_edge/page_transition.rs @@ -9,6 +9,7 @@ use turbopack_binding::{ chunk::{ChunkableAssetVc, ChunkingContextVc}, compile_time_info::CompileTimeInfoVc, context::AssetContext, + module::ModuleVc, reference_type::{EcmaScriptModulesReferenceSubType, InnerAssetsVc, ReferenceType}, source_asset::SourceAssetVc, }, @@ -68,19 +69,19 @@ impl Transition for NextEdgePageTransition { #[turbo_tasks::function] async fn process_module( &self, - asset: AssetVc, + asset: ModuleVc, context: ModuleAssetContextVc, - ) -> Result { + ) -> Result { let asset = context.process( self.bootstrap_asset, Value::new(ReferenceType::Internal(InnerAssetsVc::cell(indexmap! { - "APP_ENTRY".to_string() => asset, + "APP_ENTRY".to_string() => asset.into(), "APP_BOOTSTRAP".to_string() => context.with_transition("next-client").process( SourceAssetVc::new(next_js_file_path("entry/app/hydrate.tsx")).into(), Value::new(ReferenceType::EcmaScriptModules( EcmaScriptModulesReferenceSubType::Undefined, )), - ), + ).into(), }))), ); diff --git a/packages/next-swc/crates/next-core/src/next_edge/route_transition.rs b/packages/next-swc/crates/next-core/src/next_edge/route_transition.rs index 39f0a2672bea4..b8556d12f3990 100644 --- a/packages/next-swc/crates/next-core/src/next_edge/route_transition.rs +++ b/packages/next-swc/crates/next-core/src/next_edge/route_transition.rs @@ -3,7 +3,10 @@ use indexmap::indexmap; use turbopack_binding::{ turbo::tasks_fs::FileSystemPathVc, turbopack::{ - core::{asset::AssetVc, chunk::ChunkingContextVc, compile_time_info::CompileTimeInfoVc}, + core::{ + asset::AssetVc, chunk::ChunkingContextVc, compile_time_info::CompileTimeInfoVc, + module::ModuleVc, + }, ecmascript::chunk_group_files_asset::ChunkGroupFilesAsset, turbopack::{ module_options::ModuleOptionsContextVc, @@ -57,11 +60,11 @@ impl Transition for NextEdgeRouteTransition { #[turbo_tasks::function] async fn process_module( &self, - asset: AssetVc, + asset: ModuleVc, context: ModuleAssetContextVc, - ) -> Result { + ) -> Result { let new_asset = route_bootstrap( - asset, + asset.into(), context.into(), self.base_path, self.bootstrap_asset, diff --git a/packages/next-swc/crates/next-core/src/next_font/google/mod.rs b/packages/next-swc/crates/next-core/src/next_font/google/mod.rs index de5742f8bb7c0..9cdd481156864 100644 --- a/packages/next-swc/crates/next-core/src/next_font/google/mod.rs +++ b/packages/next-swc/crates/next-core/src/next_font/google/mod.rs @@ -458,7 +458,7 @@ async fn get_mock_stylesheet( let root = mock_fs.root(); let val = evaluate( - mocked_response_asset, + mocked_response_asset.into(), root, env, AssetIdentVc::from_path(loader_path), diff --git a/packages/next-swc/crates/next-core/src/next_image/module.rs b/packages/next-swc/crates/next-core/src/next_image/module.rs index d8b738f6f6303..31eaa826709c5 100644 --- a/packages/next-swc/crates/next-core/src/next_image/module.rs +++ b/packages/next-swc/crates/next-core/src/next_image/module.rs @@ -6,6 +6,7 @@ use turbopack_binding::{ core::{ asset::AssetVc, context::AssetContext, + module::ModuleVc, reference_type::{InnerAssetsVc, ReferenceType}, resolve::ModulePartVc, }, @@ -47,7 +48,7 @@ impl StructuredImageModuleType { source: AssetVc, blur_placeholder_mode: BlurPlaceholderMode, context: ModuleAssetContextVc, - ) -> AssetVc { + ) -> ModuleVc { let static_asset = StaticModuleAssetVc::new(source, context.into()); context.process( StructuredImageSourceAsset { @@ -81,7 +82,7 @@ impl CustomModuleType for StructuredImageModuleType { source: AssetVc, context: ModuleAssetContextVc, _part: Option, - ) -> AssetVc { + ) -> ModuleVc { StructuredImageModuleType::create_module(source, self.blur_placeholder_mode, context) } } diff --git a/packages/next-swc/crates/next-core/src/page_loader.rs b/packages/next-swc/crates/next-core/src/page_loader.rs index fe2438542d2b4..79254a26534e0 100644 --- a/packages/next-swc/crates/next-core/src/page_loader.rs +++ b/packages/next-swc/crates/next-core/src/page_loader.rs @@ -14,6 +14,7 @@ use turbopack_binding::{ }, context::{AssetContext, AssetContextVc}, ident::AssetIdentVc, + module::ModuleVc, reference::{AssetReferencesVc, SingleAssetReferenceVc}, reference_type::{EntryReferenceSubType, InnerAssetsVc, ReferenceType}, virtual_asset::VirtualAssetVc, @@ -59,7 +60,7 @@ pub async fn create_page_loader_entry_asset( client_context: AssetContextVc, entry_asset: AssetVc, pathname: StringVc, -) -> Result { +) -> Result { let mut result = RopeBuilder::default(); writeln!( result, @@ -81,12 +82,13 @@ pub async fn create_page_loader_entry_asset( Ok(client_context.process( virtual_asset, - Value::new(ReferenceType::Internal( - InnerAssetsVc::cell(indexmap! { - "PAGE".to_string() => client_context.process(entry_asset, Value::new(ReferenceType::Entry(EntryReferenceSubType::Page))) - }) - ))) - ) + Value::new(ReferenceType::Internal(InnerAssetsVc::cell(indexmap! { + "PAGE".to_string() => client_context.process( + entry_asset, + Value::new(ReferenceType::Entry(EntryReferenceSubType::Page)) + ).into(), + }))), + )) } #[turbo_tasks::value_impl] diff --git a/packages/next-swc/crates/next-core/src/page_source.rs b/packages/next-swc/crates/next-core/src/page_source.rs index 4d4e6990889a1..e8f908ab6723c 100644 --- a/packages/next-swc/crates/next-core/src/page_source.rs +++ b/packages/next-swc/crates/next-core/src/page_source.rs @@ -1,5 +1,5 @@ use anyhow::{bail, Result}; -use indexmap::indexmap; +use indexmap::{indexmap, IndexMap}; use serde::{Deserialize, Serialize}; use turbo_tasks::{ primitives::{JsonValueVc, StringVc, StringsVc}, @@ -536,10 +536,12 @@ async fn create_not_found_page_source( ) }; - let entry_asset = server_context.process( - page_asset, - Value::new(ReferenceType::Entry(EntryReferenceSubType::Page)), - ); + let entry_asset = server_context + .process( + page_asset, + Value::new(ReferenceType::Entry(EntryReferenceSubType::Page)), + ) + .into(); let ssr_entry = SsrEntry { runtime_entries, @@ -802,12 +804,12 @@ impl SsrEntryVc { } else { this.ty }; - let (internal_asset, inner_assets) = match ty { + let (internal_asset, inner_assets): (_, IndexMap<_, AssetVc>) = match ty { SsrType::AutoApi => unreachable!(), SsrType::Api => ( next_asset("entry/server-api.tsx"), indexmap! { - "INNER".to_string() => entry_asset_page, + "INNER".to_string() => entry_asset_page.into(), }, ), SsrType::EdgeApi => { @@ -819,14 +821,14 @@ impl SsrEntryVc { ( next_asset("entry/server-edge-api.tsx"), indexmap! { - "INNER_EDGE_CHUNK_GROUP".to_string() => entry_asset_edge_chunk_group, + "INNER_EDGE_CHUNK_GROUP".to_string() => entry_asset_edge_chunk_group.into(), }, ) } SsrType::Data => ( next_asset("entry/server-data.tsx"), indexmap! { - "INNER".to_string() => entry_asset_page, + "INNER".to_string() => entry_asset_page.into(), }, ), SsrType::Html => { @@ -838,8 +840,8 @@ impl SsrEntryVc { ( next_asset("entry/server-renderer.tsx"), indexmap! { - "INNER".to_string() => entry_asset_page, - "INNER_CLIENT_CHUNK_GROUP".to_string() => entry_asset_client_chunk_group, + "INNER".to_string() => entry_asset_page.into(), + "INNER_CLIENT_CHUNK_GROUP".to_string() => entry_asset_client_chunk_group.into(), }, ) } diff --git a/packages/next-swc/crates/next-core/src/router.rs b/packages/next-swc/crates/next-core/src/router.rs index bdeb8c58770f9..064abe63c7be5 100644 --- a/packages/next-swc/crates/next-core/src/router.rs +++ b/packages/next-swc/crates/next-core/src/router.rs @@ -16,13 +16,13 @@ use turbopack_binding::{ }, turbopack::{ core::{ - asset::{AssetOptionVc, AssetVc}, changed::any_content_changed, chunk::ChunkingContext, context::{AssetContext, AssetContextVc}, environment::{ServerAddrVc, ServerInfo}, ident::AssetIdentVc, issue::IssueVc, + module::{ModuleVc, OptionModuleVc}, reference_type::{EcmaScriptModulesReferenceSubType, InnerAssetsVc, ReferenceType}, resolve::{find_context_file, FindContextFileResult}, source_asset::SourceAssetVc, @@ -142,16 +142,20 @@ async fn get_config( context: AssetContextVc, project_path: FileSystemPathVc, configs: StringsVc, -) -> Result { +) -> Result { let find_config_result = find_context_file(project_path, configs); let config_asset = match &*find_config_result.await? { - FindContextFileResult::Found(config_path, _) => Some(context.process( - SourceAssetVc::new(*config_path).as_asset(), - Value::new(ReferenceType::Internal(InnerAssetsVc::empty())), - )), + FindContextFileResult::Found(config_path, _) => { + Some(context.with_transition("next-edge").process( + SourceAssetVc::new(*config_path).into(), + Value::new(ReferenceType::EcmaScriptModules( + EcmaScriptModulesReferenceSubType::Undefined, + )), + )) + } FindContextFileResult::NotFound(_) => None, }; - Ok(AssetOptionVc::cell(config_asset)) + Ok(OptionModuleVc::cell(config_asset)) } #[turbo_tasks::function] @@ -161,7 +165,7 @@ async fn next_config_changed( ) -> Result { let next_config = get_config(context, project_path, next_configs()).await?; Ok(if let Some(c) = *next_config { - any_content_changed(c) + any_content_changed(c.into()) } else { CompletionVc::immutable() }) @@ -180,15 +184,9 @@ async fn config_assets( // is no middleware file, then we need to generate a default empty manifest // and we cannot process it with the next-edge transition because it // requires a real file for some reason. - let (manifest, config) = match &*middleware_config { - Some(c) => { - let manifest = context.with_transition("next-edge").process( - *c, - Value::new(ReferenceType::EcmaScriptModules( - EcmaScriptModulesReferenceSubType::Undefined, - )), - ); - let config = parse_config_from_source(*c); + let (manifest, config) = match *middleware_config { + Some(manifest) => { + let config = parse_config_from_source(manifest); (manifest, config) } None => { @@ -219,13 +217,13 @@ async fn config_assets( ); Ok(InnerAssetsVc::cell(indexmap! { - "MIDDLEWARE_CHUNK_GROUP".to_string() => manifest, - "MIDDLEWARE_CONFIG".to_string() => config_asset, + "MIDDLEWARE_CHUNK_GROUP".to_string() => manifest.into(), + "MIDDLEWARE_CONFIG".to_string() => config_asset.into(), })) } #[turbo_tasks::function] -fn route_executor(context: AssetContextVc, configs: InnerAssetsVc) -> AssetVc { +fn route_executor(context: AssetContextVc, configs: InnerAssetsVc) -> ModuleVc { context.process( next_asset("entry/router.ts"), Value::new(ReferenceType::Internal(configs)), @@ -363,7 +361,7 @@ async fn route_internal( }; let server_addr = server_addr.await?; let result = evaluate( - router_asset, + router_asset.into(), project_path, env, AssetIdentVc::from_path(project_path), @@ -434,7 +432,7 @@ async fn route_internal( RouterResult::Error(shared_anyhow!( trace_stack( error, - router_asset, + router_asset.into(), chunking_context.output_root(), project_path ) diff --git a/packages/next-swc/crates/next-core/src/util.rs b/packages/next-swc/crates/next-core/src/util.rs index 84ad064f8d5fa..907f7d4eb5efd 100644 --- a/packages/next-swc/crates/next-core/src/util.rs +++ b/packages/next-swc/crates/next-core/src/util.rs @@ -10,10 +10,11 @@ use turbopack_binding::{ turbo::tasks_fs::{json::parse_json_rope_with_source_context, FileContent, FileSystemPathVc}, turbopack::{ core::{ - asset::{Asset, AssetVc}, + asset::Asset, environment::{ServerAddrVc, ServerInfo}, ident::AssetIdentVc, issue::{Issue, IssueSeverity, IssueSeverityVc, IssueVc, OptionIssueSourceVc}, + module::ModuleVc, reference_type::{EcmaScriptModulesReferenceSubType, ReferenceType}, resolve::{ self, handle_resolve_error, node::node_cjs_resolve_options, parse::RequestVc, @@ -165,15 +166,15 @@ impl Issue for NextSourceConfigParsingIssue { } #[turbo_tasks::function] -pub async fn parse_config_from_source(module_asset: AssetVc) -> Result { - if let Some(ecmascript_asset) = EcmascriptModuleAssetVc::resolve_from(module_asset).await? { +pub async fn parse_config_from_source(module: ModuleVc) -> Result { + if let Some(ecmascript_asset) = EcmascriptModuleAssetVc::resolve_from(module).await? { if let ParseResult::Ok { - program: Program::Module(module), + program: Program::Module(module_ast), eval_context, .. } = &*ecmascript_asset.parse().await? { - for item in &module.body { + for item in &module_ast.body { if let Some(decl) = item .as_module_decl() .and_then(|mod_decl| mod_decl.as_export_decl()) @@ -188,10 +189,10 @@ pub async fn parse_config_from_source(module_asset: AssetVc) -> Result Result NextSourceConfig { +fn parse_config_from_js_value(module_asset: ModuleVc, value: &JsValue) -> NextSourceConfig { let mut config = NextSourceConfig::default(); let invalid_config = |detail: &str, value: &JsValue| { let (explainer, hints) = value.explain(2, 0); From 41ee58fec16eaa3633bb81d9925e81c27c4717fd Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sun, 9 Jul 2023 07:08:53 +0000 Subject: [PATCH 3/9] link --- Cargo.lock | 70 +++++++++---------- Cargo.toml | 6 +- .../next-swc/crates/next-core/js/package.json | 4 +- pnpm-lock.yaml | 18 ++--- 4 files changed, 49 insertions(+), 49 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4d0db085054f1..220e410036772 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -412,7 +412,7 @@ dependencies = [ [[package]] name = "auto-hash-map" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "serde", ] @@ -3553,7 +3553,7 @@ dependencies = [ [[package]] name = "node-file-trace" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "serde", @@ -7213,7 +7213,7 @@ dependencies = [ [[package]] name = "turbo-tasks" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "auto-hash-map", @@ -7244,7 +7244,7 @@ dependencies = [ [[package]] name = "turbo-tasks-build" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "cargo-lock", @@ -7256,7 +7256,7 @@ dependencies = [ [[package]] name = "turbo-tasks-bytes" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "bytes", @@ -7271,7 +7271,7 @@ dependencies = [ [[package]] name = "turbo-tasks-env" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "dotenvs", @@ -7285,7 +7285,7 @@ dependencies = [ [[package]] name = "turbo-tasks-fetch" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "indexmap", @@ -7302,7 +7302,7 @@ dependencies = [ [[package]] name = "turbo-tasks-fs" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "auto-hash-map", @@ -7332,7 +7332,7 @@ dependencies = [ [[package]] name = "turbo-tasks-hash" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "base16", "hex", @@ -7344,7 +7344,7 @@ dependencies = [ [[package]] name = "turbo-tasks-macros" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -7358,7 +7358,7 @@ dependencies = [ [[package]] name = "turbo-tasks-macros-shared" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "proc-macro2", "quote", @@ -7368,7 +7368,7 @@ dependencies = [ [[package]] name = "turbo-tasks-malloc" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "mimalloc", ] @@ -7376,7 +7376,7 @@ dependencies = [ [[package]] name = "turbo-tasks-memory" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "auto-hash-map", @@ -7399,7 +7399,7 @@ dependencies = [ [[package]] name = "turbo-tasks-testing" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "auto-hash-map", @@ -7412,7 +7412,7 @@ dependencies = [ [[package]] name = "turbopack" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "async-recursion", @@ -7442,7 +7442,7 @@ dependencies = [ [[package]] name = "turbopack-bench" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "chromiumoxide", @@ -7472,7 +7472,7 @@ dependencies = [ [[package]] name = "turbopack-binding" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "auto-hash-map", "mdxjs", @@ -7514,7 +7514,7 @@ dependencies = [ [[package]] name = "turbopack-build" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "indexmap", @@ -7534,7 +7534,7 @@ dependencies = [ [[package]] name = "turbopack-cli-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "clap 4.1.11", @@ -7558,7 +7558,7 @@ dependencies = [ [[package]] name = "turbopack-core" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "async-trait", @@ -7586,7 +7586,7 @@ dependencies = [ [[package]] name = "turbopack-create-test-app" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "clap 4.1.11", @@ -7599,7 +7599,7 @@ dependencies = [ [[package]] name = "turbopack-css" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "async-trait", @@ -7621,7 +7621,7 @@ dependencies = [ [[package]] name = "turbopack-dev" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "indexmap", @@ -7645,7 +7645,7 @@ dependencies = [ [[package]] name = "turbopack-dev-server" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "async-compression", @@ -7681,7 +7681,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "async-trait", @@ -7714,7 +7714,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript-plugins" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "async-trait", @@ -7737,7 +7737,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript-runtime" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "indoc", @@ -7754,7 +7754,7 @@ dependencies = [ [[package]] name = "turbopack-env" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "indexmap", @@ -7770,7 +7770,7 @@ dependencies = [ [[package]] name = "turbopack-image" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "base64 0.21.0", @@ -7790,7 +7790,7 @@ dependencies = [ [[package]] name = "turbopack-json" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "serde", @@ -7805,7 +7805,7 @@ dependencies = [ [[package]] name = "turbopack-mdx" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "mdxjs", @@ -7820,7 +7820,7 @@ dependencies = [ [[package]] name = "turbopack-node" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "async-stream", @@ -7855,7 +7855,7 @@ dependencies = [ [[package]] name = "turbopack-static" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "serde", @@ -7871,7 +7871,7 @@ dependencies = [ [[package]] name = "turbopack-swc-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "swc_core", "turbo-tasks", @@ -7882,7 +7882,7 @@ dependencies = [ [[package]] name = "turbopack-test-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230707.3#96254ce90f90e31433226d055b2f2f32d5db27d9" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" dependencies = [ "anyhow", "once_cell", diff --git a/Cargo.toml b/Cargo.toml index bc882b8231e02..a9fce33521087 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,11 +42,11 @@ swc_core = { version = "0.79.13" } testing = { version = "0.33.20" } # Turbo crates -turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230707.3" } +turbopack-binding = { git = "https://github.com/vercel/turbo.git", branch = "sokra/module-trait" } # last tag: "turbopack-230707.3" # [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-230707.3" } +turbo-tasks = { git = "https://github.com/vercel/turbo.git", branch = "sokra/module-trait" } # last tag: "turbopack-230707.3" # [TODO]: need to refactor embed_directory! macro usage in next-core -turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230707.3" } +turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", branch = "sokra/module-trait" } # last tag: "turbopack-230707.3" # General Deps diff --git a/packages/next-swc/crates/next-core/js/package.json b/packages/next-swc/crates/next-core/js/package.json index aeb91faabb3c7..7298b8e725ad9 100644 --- a/packages/next-swc/crates/next-core/js/package.json +++ b/packages/next-swc/crates/next-core/js/package.json @@ -10,8 +10,8 @@ "check": "tsc --noEmit" }, "dependencies": { - "@vercel/turbopack-ecmascript-runtime": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230707.3", - "@vercel/turbopack-node": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-230707.3", + "@vercel/turbopack-ecmascript-runtime": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?3d69aa75b24064aca7c3fcae904c507c22f1abd7", + "@vercel/turbopack-node": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?3d69aa75b24064aca7c3fcae904c507c22f1abd7", "anser": "^2.1.1", "css.escape": "^1.5.1", "next": "*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 87c1bb04be01d..5f6e3d40cbfda 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -992,8 +992,8 @@ importers: '@types/react': 18.2.7 '@types/react-dom': 18.2.4 '@vercel/ncc': ^0.36.0 - '@vercel/turbopack-ecmascript-runtime': https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230707.3 - '@vercel/turbopack-node': https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-230707.3 + '@vercel/turbopack-ecmascript-runtime': https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?3d69aa75b24064aca7c3fcae904c507c22f1abd7 + '@vercel/turbopack-node': https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?3d69aa75b24064aca7c3fcae904c507c22f1abd7 anser: ^2.1.1 css.escape: ^1.5.1 find-up: ^6.3.0 @@ -1005,8 +1005,8 @@ importers: stacktrace-parser: ^0.1.10 strip-ansi: ^7.0.1 dependencies: - '@vercel/turbopack-ecmascript-runtime': '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230707.3_react-refresh@0.12.0' - '@vercel/turbopack-node': '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-230707.3' + '@vercel/turbopack-ecmascript-runtime': '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?3d69aa75b24064aca7c3fcae904c507c22f1abd7_react-refresh@0.12.0' + '@vercel/turbopack-node': '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?3d69aa75b24064aca7c3fcae904c507c22f1abd7' anser: 2.1.1 css.escape: 1.5.1 next: link:../../../../next @@ -25581,9 +25581,9 @@ packages: /zwitch/2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} - '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230707.3_react-refresh@0.12.0': - resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230707.3} - id: '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230707.3' + '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?3d69aa75b24064aca7c3fcae904c507c22f1abd7_react-refresh@0.12.0': + resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?3d69aa75b24064aca7c3fcae904c507c22f1abd7} + id: '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?3d69aa75b24064aca7c3fcae904c507c22f1abd7' name: '@vercel/turbopack-ecmascript-runtime' version: 0.0.0 dependencies: @@ -25594,8 +25594,8 @@ packages: - webpack dev: false - '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-230707.3': - resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-230707.3} + '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?3d69aa75b24064aca7c3fcae904c507c22f1abd7': + resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?3d69aa75b24064aca7c3fcae904c507c22f1abd7} name: '@vercel/turbopack-node' version: 0.0.0 dependencies: From bc453457dc3b34171575fb859872c1fe1786bbf1 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 10 Jul 2023 10:03:11 +0000 Subject: [PATCH 4/9] parse middleware config from correct file --- .../next-core/src/next_client/transition.rs | 2 +- .../src/next_edge/page_transition.rs | 8 +-- .../src/next_edge/route_transition.rs | 2 +- .../next-swc/crates/next-core/src/router.rs | 59 +++++++++---------- 4 files changed, 33 insertions(+), 38 deletions(-) diff --git a/packages/next-swc/crates/next-core/src/next_client/transition.rs b/packages/next-swc/crates/next-core/src/next_client/transition.rs index 9388e5801e80c..23897454ec8f4 100644 --- a/packages/next-swc/crates/next-core/src/next_client/transition.rs +++ b/packages/next-swc/crates/next-core/src/next_client/transition.rs @@ -88,7 +88,7 @@ impl Transition for NextClientTransition { let runtime_entries = self.runtime_entries.resolve_entries(context.into()); let asset = ChunkGroupFilesAsset { - asset: asset.into(), + module: asset.into(), // This ensures that the chunk group files asset will strip out the _next prefix from // all chunk paths, which is what the Next.js renderer code expects. client_root: self.client_chunking_context.output_root().join("_next"), diff --git a/packages/next-swc/crates/next-core/src/next_edge/page_transition.rs b/packages/next-swc/crates/next-core/src/next_edge/page_transition.rs index bd0cf15f9eee5..638dfbf54fca1 100644 --- a/packages/next-swc/crates/next-core/src/next_edge/page_transition.rs +++ b/packages/next-swc/crates/next-core/src/next_edge/page_transition.rs @@ -72,7 +72,7 @@ impl Transition for NextEdgePageTransition { asset: ModuleVc, context: ModuleAssetContextVc, ) -> Result { - let asset = context.process( + let module = context.process( self.bootstrap_asset, Value::new(ReferenceType::Internal(InnerAssetsVc::cell(indexmap! { "APP_ENTRY".to_string() => asset.into(), @@ -85,12 +85,12 @@ impl Transition for NextEdgePageTransition { }))), ); - let Some(asset) = ChunkableAssetVc::resolve_from(asset).await? else { - bail!("Internal module is not evaluatable"); + let Some(module) = ChunkableAssetVc::resolve_from(module).await? else { + bail!("Internal module is not chunkable"); }; let asset = ChunkGroupFilesAsset { - asset, + module, client_root: self.output_path, chunking_context: self.edge_chunking_context, runtime_entries: None, diff --git a/packages/next-swc/crates/next-core/src/next_edge/route_transition.rs b/packages/next-swc/crates/next-core/src/next_edge/route_transition.rs index b8556d12f3990..ab952dca0f0d9 100644 --- a/packages/next-swc/crates/next-core/src/next_edge/route_transition.rs +++ b/packages/next-swc/crates/next-core/src/next_edge/route_transition.rs @@ -74,7 +74,7 @@ impl Transition for NextEdgeRouteTransition { ); let asset = ChunkGroupFilesAsset { - asset: new_asset.into(), + module: new_asset.into(), client_root: self.output_path, chunking_context: self.edge_chunking_context, runtime_entries: None, diff --git a/packages/next-swc/crates/next-core/src/router.rs b/packages/next-swc/crates/next-core/src/router.rs index 064abe63c7be5..aa8473b825e2e 100644 --- a/packages/next-swc/crates/next-core/src/router.rs +++ b/packages/next-swc/crates/next-core/src/router.rs @@ -137,37 +137,21 @@ pub enum RouterResult { Error(#[turbo_tasks(trace_ignore)] SharedError), } -#[turbo_tasks::function] -async fn get_config( - context: AssetContextVc, - project_path: FileSystemPathVc, - configs: StringsVc, -) -> Result { - let find_config_result = find_context_file(project_path, configs); - let config_asset = match &*find_config_result.await? { - FindContextFileResult::Found(config_path, _) => { - Some(context.with_transition("next-edge").process( - SourceAssetVc::new(*config_path).into(), - Value::new(ReferenceType::EcmaScriptModules( - EcmaScriptModulesReferenceSubType::Undefined, - )), - )) - } - FindContextFileResult::NotFound(_) => None, - }; - Ok(OptionModuleVc::cell(config_asset)) -} - #[turbo_tasks::function] async fn next_config_changed( context: AssetContextVc, project_path: FileSystemPathVc, ) -> Result { - let next_config = get_config(context, project_path, next_configs()).await?; - Ok(if let Some(c) = *next_config { - any_content_changed(c.into()) - } else { - CompletionVc::immutable() + let find_config_result = find_context_file(project_path, next_configs()); + Ok(match *find_config_result.await? { + FindContextFileResult::Found(config_path, _) => { + let module = context.process( + SourceAssetVc::new(config_path).as_asset(), + Value::new(ReferenceType::Internal(InnerAssetsVc::empty())), + ); + any_content_changed(module.into()) + } + FindContextFileResult::NotFound(_) => CompletionVc::immutable(), }) } @@ -177,19 +161,30 @@ async fn config_assets( project_path: FileSystemPathVc, page_extensions: StringsVc, ) -> Result { - let middleware_config = - get_config(context, project_path, middleware_files(page_extensions)).await?; + let find_config_result = find_context_file(project_path, middleware_files(page_extensions)); // The router.ts file expects a manifest of chunks for the middleware. If there // is no middleware file, then we need to generate a default empty manifest // and we cannot process it with the next-edge transition because it // requires a real file for some reason. - let (manifest, config) = match *middleware_config { - Some(manifest) => { - let config = parse_config_from_source(manifest); + let (manifest, config) = match *find_config_result.await? { + FindContextFileResult::Found(config_path, _) => { + let config = context.process( + SourceAssetVc::new(config_path).into(), + Value::new(ReferenceType::EcmaScriptModules( + EcmaScriptModulesReferenceSubType::Undefined, + )), + ); + let config = parse_config_from_source(config); + let manifest = context.with_transition("next-edge").process( + SourceAssetVc::new(config_path).into(), + Value::new(ReferenceType::EcmaScriptModules( + EcmaScriptModulesReferenceSubType::Undefined, + )), + ); (manifest, config) } - None => { + FindContextFileResult::NotFound(_) => { let manifest = context.process( VirtualAssetVc::new( project_path.join("middleware.js"), From df5254db0d398d5de7956e2bbbe64d4357afd1a1 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 10 Jul 2023 10:06:56 +0000 Subject: [PATCH 5/9] link --- Cargo.lock | 72 +++++++++---------- .../next-swc/crates/next-core/js/package.json | 4 +- pnpm-lock.yaml | 18 ++--- 3 files changed, 47 insertions(+), 47 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 220e410036772..aad92f86f25fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -412,7 +412,7 @@ dependencies = [ [[package]] name = "auto-hash-map" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "serde", ] @@ -3553,7 +3553,7 @@ dependencies = [ [[package]] name = "node-file-trace" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "serde", @@ -7213,7 +7213,7 @@ dependencies = [ [[package]] name = "turbo-tasks" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "auto-hash-map", @@ -7244,7 +7244,7 @@ dependencies = [ [[package]] name = "turbo-tasks-build" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "cargo-lock", @@ -7256,7 +7256,7 @@ dependencies = [ [[package]] name = "turbo-tasks-bytes" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "bytes", @@ -7271,7 +7271,7 @@ dependencies = [ [[package]] name = "turbo-tasks-env" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "dotenvs", @@ -7285,7 +7285,7 @@ dependencies = [ [[package]] name = "turbo-tasks-fetch" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "indexmap", @@ -7302,7 +7302,7 @@ dependencies = [ [[package]] name = "turbo-tasks-fs" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "auto-hash-map", @@ -7332,7 +7332,7 @@ dependencies = [ [[package]] name = "turbo-tasks-hash" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "base16", "hex", @@ -7344,7 +7344,7 @@ dependencies = [ [[package]] name = "turbo-tasks-macros" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -7358,7 +7358,7 @@ dependencies = [ [[package]] name = "turbo-tasks-macros-shared" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "proc-macro2", "quote", @@ -7368,7 +7368,7 @@ dependencies = [ [[package]] name = "turbo-tasks-malloc" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "mimalloc", ] @@ -7376,7 +7376,7 @@ dependencies = [ [[package]] name = "turbo-tasks-memory" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "auto-hash-map", @@ -7399,7 +7399,7 @@ dependencies = [ [[package]] name = "turbo-tasks-testing" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "auto-hash-map", @@ -7412,7 +7412,7 @@ dependencies = [ [[package]] name = "turbopack" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "async-recursion", @@ -7442,7 +7442,7 @@ dependencies = [ [[package]] name = "turbopack-bench" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "chromiumoxide", @@ -7472,7 +7472,7 @@ dependencies = [ [[package]] name = "turbopack-binding" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "auto-hash-map", "mdxjs", @@ -7514,7 +7514,7 @@ dependencies = [ [[package]] name = "turbopack-build" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "indexmap", @@ -7534,7 +7534,7 @@ dependencies = [ [[package]] name = "turbopack-cli-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "clap 4.1.11", @@ -7558,7 +7558,7 @@ dependencies = [ [[package]] name = "turbopack-core" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "async-trait", @@ -7586,7 +7586,7 @@ dependencies = [ [[package]] name = "turbopack-create-test-app" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "clap 4.1.11", @@ -7599,7 +7599,7 @@ dependencies = [ [[package]] name = "turbopack-css" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "async-trait", @@ -7621,7 +7621,7 @@ dependencies = [ [[package]] name = "turbopack-dev" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "indexmap", @@ -7645,7 +7645,7 @@ dependencies = [ [[package]] name = "turbopack-dev-server" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "async-compression", @@ -7681,7 +7681,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "async-trait", @@ -7714,7 +7714,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript-plugins" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "async-trait", @@ -7737,7 +7737,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript-runtime" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "indoc", @@ -7754,7 +7754,7 @@ dependencies = [ [[package]] name = "turbopack-env" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "indexmap", @@ -7770,7 +7770,7 @@ dependencies = [ [[package]] name = "turbopack-image" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "base64 0.21.0", @@ -7790,7 +7790,7 @@ dependencies = [ [[package]] name = "turbopack-json" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "serde", @@ -7805,7 +7805,7 @@ dependencies = [ [[package]] name = "turbopack-mdx" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "mdxjs", @@ -7820,7 +7820,7 @@ dependencies = [ [[package]] name = "turbopack-node" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "async-stream", @@ -7855,7 +7855,7 @@ dependencies = [ [[package]] name = "turbopack-static" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "serde", @@ -7871,7 +7871,7 @@ dependencies = [ [[package]] name = "turbopack-swc-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "swc_core", "turbo-tasks", @@ -7882,7 +7882,7 @@ dependencies = [ [[package]] name = "turbopack-test-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#3d69aa75b24064aca7c3fcae904c507c22f1abd7" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" dependencies = [ "anyhow", "once_cell", @@ -7902,7 +7902,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if 1.0.0", - "rand 0.4.6", + "rand 0.8.5", "static_assertions", ] diff --git a/packages/next-swc/crates/next-core/js/package.json b/packages/next-swc/crates/next-core/js/package.json index 7298b8e725ad9..9ab9a23aa9bfc 100644 --- a/packages/next-swc/crates/next-core/js/package.json +++ b/packages/next-swc/crates/next-core/js/package.json @@ -10,8 +10,8 @@ "check": "tsc --noEmit" }, "dependencies": { - "@vercel/turbopack-ecmascript-runtime": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?3d69aa75b24064aca7c3fcae904c507c22f1abd7", - "@vercel/turbopack-node": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?3d69aa75b24064aca7c3fcae904c507c22f1abd7", + "@vercel/turbopack-ecmascript-runtime": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?1224fd2bbd051076fc363933c0e550416c2026d3", + "@vercel/turbopack-node": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?1224fd2bbd051076fc363933c0e550416c2026d3", "anser": "^2.1.1", "css.escape": "^1.5.1", "next": "*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5f6e3d40cbfda..851b5d63e901a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -992,8 +992,8 @@ importers: '@types/react': 18.2.7 '@types/react-dom': 18.2.4 '@vercel/ncc': ^0.36.0 - '@vercel/turbopack-ecmascript-runtime': https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?3d69aa75b24064aca7c3fcae904c507c22f1abd7 - '@vercel/turbopack-node': https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?3d69aa75b24064aca7c3fcae904c507c22f1abd7 + '@vercel/turbopack-ecmascript-runtime': https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?1224fd2bbd051076fc363933c0e550416c2026d3 + '@vercel/turbopack-node': https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?1224fd2bbd051076fc363933c0e550416c2026d3 anser: ^2.1.1 css.escape: ^1.5.1 find-up: ^6.3.0 @@ -1005,8 +1005,8 @@ importers: stacktrace-parser: ^0.1.10 strip-ansi: ^7.0.1 dependencies: - '@vercel/turbopack-ecmascript-runtime': '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?3d69aa75b24064aca7c3fcae904c507c22f1abd7_react-refresh@0.12.0' - '@vercel/turbopack-node': '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?3d69aa75b24064aca7c3fcae904c507c22f1abd7' + '@vercel/turbopack-ecmascript-runtime': '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?1224fd2bbd051076fc363933c0e550416c2026d3_react-refresh@0.12.0' + '@vercel/turbopack-node': '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?1224fd2bbd051076fc363933c0e550416c2026d3' anser: 2.1.1 css.escape: 1.5.1 next: link:../../../../next @@ -25581,9 +25581,9 @@ packages: /zwitch/2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} - '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?3d69aa75b24064aca7c3fcae904c507c22f1abd7_react-refresh@0.12.0': - resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?3d69aa75b24064aca7c3fcae904c507c22f1abd7} - id: '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?3d69aa75b24064aca7c3fcae904c507c22f1abd7' + '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?1224fd2bbd051076fc363933c0e550416c2026d3_react-refresh@0.12.0': + resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?1224fd2bbd051076fc363933c0e550416c2026d3} + id: '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?1224fd2bbd051076fc363933c0e550416c2026d3' name: '@vercel/turbopack-ecmascript-runtime' version: 0.0.0 dependencies: @@ -25594,8 +25594,8 @@ packages: - webpack dev: false - '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?3d69aa75b24064aca7c3fcae904c507c22f1abd7': - resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?3d69aa75b24064aca7c3fcae904c507c22f1abd7} + '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?1224fd2bbd051076fc363933c0e550416c2026d3': + resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?1224fd2bbd051076fc363933c0e550416c2026d3} name: '@vercel/turbopack-node' version: 0.0.0 dependencies: From b4e3f3e05e81deebc8d1660ca2d43fef92dfefd6 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 10 Jul 2023 10:15:45 +0000 Subject: [PATCH 6/9] fix warning --- packages/next-swc/crates/next-core/src/router.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/next-swc/crates/next-core/src/router.rs b/packages/next-swc/crates/next-core/src/router.rs index aa8473b825e2e..f07dd77601408 100644 --- a/packages/next-swc/crates/next-core/src/router.rs +++ b/packages/next-swc/crates/next-core/src/router.rs @@ -22,7 +22,7 @@ use turbopack_binding::{ environment::{ServerAddrVc, ServerInfo}, ident::AssetIdentVc, issue::IssueVc, - module::{ModuleVc, OptionModuleVc}, + module::ModuleVc, reference_type::{EcmaScriptModulesReferenceSubType, InnerAssetsVc, ReferenceType}, resolve::{find_context_file, FindContextFileResult}, source_asset::SourceAssetVc, From 686104933d9d5f6d76e524bf0d2ac5e3a9dd93a1 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 10 Jul 2023 10:16:48 +0000 Subject: [PATCH 7/9] rename ChunkableAsset to ChunkableModule --- .../crates/next-build/src/next_pages/client_context.rs | 2 +- .../src/next_client_chunks/in_chunking_context_asset.rs | 4 ++-- .../next-core/src/next_client_chunks/with_chunks.rs | 4 ++-- .../with_chunking_context_scope_asset.rs | 4 ++-- .../src/next_client_component/with_client_chunks.rs | 8 ++++---- .../crates/next-core/src/next_edge/page_transition.rs | 4 ++-- packages/next-swc/crates/next-core/src/page_loader.rs | 2 +- .../next-swc/crates/next-core/src/web_entry_source.rs | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/next-swc/crates/next-build/src/next_pages/client_context.rs b/packages/next-swc/crates/next-build/src/next_pages/client_context.rs index 429d3e699003d..46d17b62b129e 100644 --- a/packages/next-swc/crates/next-build/src/next_pages/client_context.rs +++ b/packages/next-swc/crates/next-build/src/next_pages/client_context.rs @@ -11,7 +11,7 @@ use turbopack_binding::{ turbopack::{ core::{ asset::AssetVc, - chunk::{ChunkableAsset, ChunkingContext, ChunkingContextVc}, + chunk::{ChunkableModule, ChunkingContext, ChunkingContextVc}, context::{AssetContext, AssetContextVc}, reference_type::ReferenceType, }, diff --git a/packages/next-swc/crates/next-core/src/next_client_chunks/in_chunking_context_asset.rs b/packages/next-swc/crates/next-core/src/next_client_chunks/in_chunking_context_asset.rs index 31d9b4b061222..ae8b988402acc 100644 --- a/packages/next-swc/crates/next-core/src/next_client_chunks/in_chunking_context_asset.rs +++ b/packages/next-swc/crates/next-core/src/next_client_chunks/in_chunking_context_asset.rs @@ -4,7 +4,7 @@ use turbopack_binding::turbopack::{ core::{ asset::{Asset, AssetContentVc, AssetVc}, chunk::{ - availability_info::AvailabilityInfo, ChunkVc, ChunkableAsset, ChunkableAssetVc, + availability_info::AvailabilityInfo, ChunkVc, ChunkableModule, ChunkableModuleVc, ChunkingContextVc, }, ident::AssetIdentVc, @@ -51,7 +51,7 @@ impl Asset for InChunkingContextAsset { impl Module for InChunkingContextAsset {} #[turbo_tasks::value_impl] -impl ChunkableAsset for InChunkingContextAsset { +impl ChunkableModule for InChunkingContextAsset { #[turbo_tasks::function] fn as_chunk( &self, diff --git a/packages/next-swc/crates/next-core/src/next_client_chunks/with_chunks.rs b/packages/next-swc/crates/next-core/src/next_client_chunks/with_chunks.rs index 3748c95a51baa..f9673ee59aff4 100644 --- a/packages/next-swc/crates/next-core/src/next_client_chunks/with_chunks.rs +++ b/packages/next-swc/crates/next-core/src/next_client_chunks/with_chunks.rs @@ -12,7 +12,7 @@ use turbopack_binding::{ asset::{Asset, AssetContentVc, AssetVc, AssetsVc}, chunk::{ availability_info::AvailabilityInfo, ChunkDataVc, ChunkGroupReferenceVc, ChunkItem, - ChunkItemVc, ChunkVc, ChunkableAsset, ChunkableAssetVc, ChunkingContext, + ChunkItemVc, ChunkVc, ChunkableModule, ChunkableModuleVc, ChunkingContext, ChunkingContextVc, ChunksDataVc, }, ident::AssetIdentVc, @@ -71,7 +71,7 @@ impl Asset for WithChunksAsset { impl Module for WithChunksAsset {} #[turbo_tasks::value_impl] -impl ChunkableAsset for WithChunksAsset { +impl ChunkableModule for WithChunksAsset { #[turbo_tasks::function] fn as_chunk( self_vc: WithChunksAssetVc, diff --git a/packages/next-swc/crates/next-core/src/next_client_component/with_chunking_context_scope_asset.rs b/packages/next-swc/crates/next-core/src/next_client_component/with_chunking_context_scope_asset.rs index cc0f08ba9da5a..43d25187b1de6 100644 --- a/packages/next-swc/crates/next-core/src/next_client_component/with_chunking_context_scope_asset.rs +++ b/packages/next-swc/crates/next-core/src/next_client_component/with_chunking_context_scope_asset.rs @@ -4,7 +4,7 @@ use turbopack_binding::turbopack::{ core::{ asset::{Asset, AssetContentVc, AssetVc}, chunk::{ - availability_info::AvailabilityInfo, ChunkVc, ChunkableAsset, ChunkableAssetVc, + availability_info::AvailabilityInfo, ChunkVc, ChunkableModule, ChunkableModuleVc, ChunkingContext, ChunkingContextVc, }, ident::AssetIdentVc, @@ -51,7 +51,7 @@ impl Asset for WithChunkingContextScopeAsset { impl Module for WithChunkingContextScopeAsset {} #[turbo_tasks::value_impl] -impl ChunkableAsset for WithChunkingContextScopeAsset { +impl ChunkableModule for WithChunkingContextScopeAsset { #[turbo_tasks::function] fn as_chunk( &self, diff --git a/packages/next-swc/crates/next-core/src/next_client_component/with_client_chunks.rs b/packages/next-swc/crates/next-core/src/next_client_component/with_client_chunks.rs index 7cd389ef6371f..4ad161b043c7f 100644 --- a/packages/next-swc/crates/next-core/src/next_client_component/with_client_chunks.rs +++ b/packages/next-swc/crates/next-core/src/next_client_component/with_client_chunks.rs @@ -8,8 +8,8 @@ use turbopack_binding::{ asset::{Asset, AssetContentVc, AssetVc, AssetsVc}, chunk::{ availability_info::AvailabilityInfo, ChunkDataVc, ChunkItem, ChunkItemVc, ChunkVc, - ChunkableAsset, ChunkableAssetReference, ChunkableAssetReferenceVc, - ChunkableAssetVc, ChunkingContext, ChunkingContextVc, ChunkingType, + ChunkableModule, ChunkableModuleReference, ChunkableModuleReferenceVc, + ChunkableModuleVc, ChunkingContext, ChunkingContextVc, ChunkingType, ChunkingTypeOptionVc, ChunksDataVc, }, ident::AssetIdentVc, @@ -70,7 +70,7 @@ impl Asset for WithClientChunksAsset { impl Module for WithClientChunksAsset {} #[turbo_tasks::value_impl] -impl ChunkableAsset for WithClientChunksAsset { +impl ChunkableModule for WithClientChunksAsset { #[turbo_tasks::function] fn as_chunk( self_vc: WithClientChunksAssetVc, @@ -261,7 +261,7 @@ impl AssetReference for WithClientChunksAssetReference { } #[turbo_tasks::value_impl] -impl ChunkableAssetReference for WithClientChunksAssetReference { +impl ChunkableModuleReference for WithClientChunksAssetReference { #[turbo_tasks::function] fn chunking_type(&self) -> ChunkingTypeOptionVc { ChunkingTypeOptionVc::cell(Some(ChunkingType::IsolatedParallel)) diff --git a/packages/next-swc/crates/next-core/src/next_edge/page_transition.rs b/packages/next-swc/crates/next-core/src/next_edge/page_transition.rs index 638dfbf54fca1..69dab18293e3e 100644 --- a/packages/next-swc/crates/next-core/src/next_edge/page_transition.rs +++ b/packages/next-swc/crates/next-core/src/next_edge/page_transition.rs @@ -6,7 +6,7 @@ use turbopack_binding::{ turbopack::{ core::{ asset::AssetVc, - chunk::{ChunkableAssetVc, ChunkingContextVc}, + chunk::{ChunkableModuleVc, ChunkingContextVc}, compile_time_info::CompileTimeInfoVc, context::AssetContext, module::ModuleVc, @@ -85,7 +85,7 @@ impl Transition for NextEdgePageTransition { }))), ); - let Some(module) = ChunkableAssetVc::resolve_from(module).await? else { + let Some(module) = ChunkableModuleVc::resolve_from(module).await? else { bail!("Internal module is not chunkable"); }; diff --git a/packages/next-swc/crates/next-core/src/page_loader.rs b/packages/next-swc/crates/next-core/src/page_loader.rs index 79254a26534e0..3957976979fa4 100644 --- a/packages/next-swc/crates/next-core/src/page_loader.rs +++ b/packages/next-swc/crates/next-core/src/page_loader.rs @@ -9,7 +9,7 @@ use turbopack_binding::{ core::{ asset::{Asset, AssetContentVc, AssetVc, AssetsVc}, chunk::{ - ChunkDataVc, ChunkableAsset, ChunkingContext, ChunkingContextVc, ChunksDataVc, + ChunkDataVc, ChunkableModule, ChunkingContext, ChunkingContextVc, ChunksDataVc, EvaluatableAssetVc, EvaluatableAssetsVc, }, context::{AssetContext, AssetContextVc}, diff --git a/packages/next-swc/crates/next-core/src/web_entry_source.rs b/packages/next-swc/crates/next-core/src/web_entry_source.rs index 9e1bbac4ddb51..0101d6c53d080 100644 --- a/packages/next-swc/crates/next-core/src/web_entry_source.rs +++ b/packages/next-swc/crates/next-core/src/web_entry_source.rs @@ -6,7 +6,7 @@ use turbopack_binding::{ }, turbopack::{ core::{ - chunk::{ChunkableAssetVc, ChunkingContextVc}, + chunk::{ChunkableModuleVc, ChunkingContextVc}, compile_time_defines, compile_time_info::{ CompileTimeDefines, CompileTimeDefinesVc, CompileTimeInfo, CompileTimeInfoVc, @@ -181,7 +181,7 @@ pub async fn create_web_entry_source( chunking_context, Some(runtime_entries.with_entry(ecmascript.into())), )) - } else if let Some(chunkable) = ChunkableAssetVc::resolve_from(module).await? { + } else if let Some(chunkable) = ChunkableModuleVc::resolve_from(module).await? { // TODO this is missing runtime code, so it's probably broken and we should also // add an ecmascript chunk with the runtime code Ok((chunkable, chunking_context, None)) From 24db35436fb1cf2a044fad5aa4f8b0c4f210166a Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 10 Jul 2023 10:18:39 +0000 Subject: [PATCH 8/9] link --- Cargo.lock | 72 +++++++++---------- .../next-swc/crates/next-core/js/package.json | 4 +- pnpm-lock.yaml | 33 +++------ 3 files changed, 48 insertions(+), 61 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aad92f86f25fe..284afcdfe5e11 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -412,7 +412,7 @@ dependencies = [ [[package]] name = "auto-hash-map" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "serde", ] @@ -3553,7 +3553,7 @@ dependencies = [ [[package]] name = "node-file-trace" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "serde", @@ -7213,7 +7213,7 @@ dependencies = [ [[package]] name = "turbo-tasks" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "auto-hash-map", @@ -7244,7 +7244,7 @@ dependencies = [ [[package]] name = "turbo-tasks-build" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "cargo-lock", @@ -7256,7 +7256,7 @@ dependencies = [ [[package]] name = "turbo-tasks-bytes" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "bytes", @@ -7271,7 +7271,7 @@ dependencies = [ [[package]] name = "turbo-tasks-env" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "dotenvs", @@ -7285,7 +7285,7 @@ dependencies = [ [[package]] name = "turbo-tasks-fetch" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "indexmap", @@ -7302,7 +7302,7 @@ dependencies = [ [[package]] name = "turbo-tasks-fs" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "auto-hash-map", @@ -7332,7 +7332,7 @@ dependencies = [ [[package]] name = "turbo-tasks-hash" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "base16", "hex", @@ -7344,7 +7344,7 @@ dependencies = [ [[package]] name = "turbo-tasks-macros" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -7358,7 +7358,7 @@ dependencies = [ [[package]] name = "turbo-tasks-macros-shared" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "proc-macro2", "quote", @@ -7368,7 +7368,7 @@ dependencies = [ [[package]] name = "turbo-tasks-malloc" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "mimalloc", ] @@ -7376,7 +7376,7 @@ dependencies = [ [[package]] name = "turbo-tasks-memory" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "auto-hash-map", @@ -7399,7 +7399,7 @@ dependencies = [ [[package]] name = "turbo-tasks-testing" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "auto-hash-map", @@ -7412,7 +7412,7 @@ dependencies = [ [[package]] name = "turbopack" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "async-recursion", @@ -7442,7 +7442,7 @@ dependencies = [ [[package]] name = "turbopack-bench" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "chromiumoxide", @@ -7472,7 +7472,7 @@ dependencies = [ [[package]] name = "turbopack-binding" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "auto-hash-map", "mdxjs", @@ -7514,7 +7514,7 @@ dependencies = [ [[package]] name = "turbopack-build" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "indexmap", @@ -7534,7 +7534,7 @@ dependencies = [ [[package]] name = "turbopack-cli-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "clap 4.1.11", @@ -7558,7 +7558,7 @@ dependencies = [ [[package]] name = "turbopack-core" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "async-trait", @@ -7586,7 +7586,7 @@ dependencies = [ [[package]] name = "turbopack-create-test-app" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "clap 4.1.11", @@ -7599,7 +7599,7 @@ dependencies = [ [[package]] name = "turbopack-css" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "async-trait", @@ -7621,7 +7621,7 @@ dependencies = [ [[package]] name = "turbopack-dev" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "indexmap", @@ -7645,7 +7645,7 @@ dependencies = [ [[package]] name = "turbopack-dev-server" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "async-compression", @@ -7681,7 +7681,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "async-trait", @@ -7714,7 +7714,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript-plugins" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "async-trait", @@ -7737,7 +7737,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript-runtime" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "indoc", @@ -7754,7 +7754,7 @@ dependencies = [ [[package]] name = "turbopack-env" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "indexmap", @@ -7770,7 +7770,7 @@ dependencies = [ [[package]] name = "turbopack-image" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "base64 0.21.0", @@ -7790,7 +7790,7 @@ dependencies = [ [[package]] name = "turbopack-json" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "serde", @@ -7805,7 +7805,7 @@ dependencies = [ [[package]] name = "turbopack-mdx" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "mdxjs", @@ -7820,7 +7820,7 @@ dependencies = [ [[package]] name = "turbopack-node" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "async-stream", @@ -7855,7 +7855,7 @@ dependencies = [ [[package]] name = "turbopack-static" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "serde", @@ -7871,7 +7871,7 @@ dependencies = [ [[package]] name = "turbopack-swc-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "swc_core", "turbo-tasks", @@ -7882,7 +7882,7 @@ dependencies = [ [[package]] name = "turbopack-test-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#1224fd2bbd051076fc363933c0e550416c2026d3" +source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" dependencies = [ "anyhow", "once_cell", @@ -7902,7 +7902,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if 1.0.0", - "rand 0.8.5", + "rand 0.4.6", "static_assertions", ] diff --git a/packages/next-swc/crates/next-core/js/package.json b/packages/next-swc/crates/next-core/js/package.json index 9ab9a23aa9bfc..0f768e5d037ba 100644 --- a/packages/next-swc/crates/next-core/js/package.json +++ b/packages/next-swc/crates/next-core/js/package.json @@ -10,8 +10,8 @@ "check": "tsc --noEmit" }, "dependencies": { - "@vercel/turbopack-ecmascript-runtime": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?1224fd2bbd051076fc363933c0e550416c2026d3", - "@vercel/turbopack-node": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?1224fd2bbd051076fc363933c0e550416c2026d3", + "@vercel/turbopack-ecmascript-runtime": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?261ae798208de92abe9759bc4b8278318ebdbc7c", + "@vercel/turbopack-node": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?261ae798208de92abe9759bc4b8278318ebdbc7c", "anser": "^2.1.1", "css.escape": "^1.5.1", "next": "*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 851b5d63e901a..0adc45fc6ba78 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -992,8 +992,8 @@ importers: '@types/react': 18.2.7 '@types/react-dom': 18.2.4 '@vercel/ncc': ^0.36.0 - '@vercel/turbopack-ecmascript-runtime': https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?1224fd2bbd051076fc363933c0e550416c2026d3 - '@vercel/turbopack-node': https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?1224fd2bbd051076fc363933c0e550416c2026d3 + '@vercel/turbopack-ecmascript-runtime': https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?261ae798208de92abe9759bc4b8278318ebdbc7c + '@vercel/turbopack-node': https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?261ae798208de92abe9759bc4b8278318ebdbc7c anser: ^2.1.1 css.escape: ^1.5.1 find-up: ^6.3.0 @@ -1005,8 +1005,8 @@ importers: stacktrace-parser: ^0.1.10 strip-ansi: ^7.0.1 dependencies: - '@vercel/turbopack-ecmascript-runtime': '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?1224fd2bbd051076fc363933c0e550416c2026d3_react-refresh@0.12.0' - '@vercel/turbopack-node': '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?1224fd2bbd051076fc363933c0e550416c2026d3' + '@vercel/turbopack-ecmascript-runtime': '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?261ae798208de92abe9759bc4b8278318ebdbc7c_react-refresh@0.12.0' + '@vercel/turbopack-node': '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?261ae798208de92abe9759bc4b8278318ebdbc7c' anser: 2.1.1 css.escape: 1.5.1 next: link:../../../../next @@ -6136,7 +6136,7 @@ packages: dependencies: '@mdx-js/mdx': 2.2.1 source-map: 0.7.3 - webpack: 5.86.0 + webpack: 5.86.0_@swc+core@1.3.55 transitivePeerDependencies: - supports-color @@ -6810,7 +6810,6 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true - dev: true optional: true /@swc/core-darwin-x64/1.3.55: @@ -6819,7 +6818,6 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true - dev: true optional: true /@swc/core-linux-arm-gnueabihf/1.3.55: @@ -6828,7 +6826,6 @@ packages: cpu: [arm] os: [linux] requiresBuild: true - dev: true optional: true /@swc/core-linux-arm64-gnu/1.3.55: @@ -6837,7 +6834,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: true optional: true /@swc/core-linux-arm64-musl/1.3.55: @@ -6846,7 +6842,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: true optional: true /@swc/core-linux-x64-gnu/1.3.55: @@ -6855,7 +6850,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: true optional: true /@swc/core-linux-x64-musl/1.3.55: @@ -6864,7 +6858,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: true optional: true /@swc/core-win32-arm64-msvc/1.3.55: @@ -6873,7 +6866,6 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true - dev: true optional: true /@swc/core-win32-ia32-msvc/1.3.55: @@ -6882,7 +6874,6 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true - dev: true optional: true /@swc/core-win32-x64-msvc/1.3.55: @@ -6891,7 +6882,6 @@ packages: cpu: [x64] os: [win32] requiresBuild: true - dev: true optional: true /@swc/core/1.3.55_@swc+helpers@0.5.1: @@ -6916,7 +6906,6 @@ packages: '@swc/core-win32-arm64-msvc': 1.3.55 '@swc/core-win32-ia32-msvc': 1.3.55 '@swc/core-win32-x64-msvc': 1.3.55 - dev: true /@swc/helpers/0.4.14: resolution: {integrity: sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==} @@ -23814,7 +23803,6 @@ packages: serialize-javascript: 6.0.1 terser: 5.17.7 webpack: 5.86.0_@swc+core@1.3.55 - dev: true /terser/5.10.0: resolution: {integrity: sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==} @@ -25172,7 +25160,6 @@ packages: - '@swc/core' - esbuild - uglify-js - dev: true /websocket-driver/0.7.3: resolution: {integrity: sha512-bpxWlvbbB459Mlipc5GBzzZwhoZgGEZLuqPaR0INBGnPAY1vdBX6hPnoFXiw+3yWxDuHyQjO2oXTMyS8A5haFg==} @@ -25581,9 +25568,9 @@ packages: /zwitch/2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} - '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?1224fd2bbd051076fc363933c0e550416c2026d3_react-refresh@0.12.0': - resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?1224fd2bbd051076fc363933c0e550416c2026d3} - id: '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?1224fd2bbd051076fc363933c0e550416c2026d3' + '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?261ae798208de92abe9759bc4b8278318ebdbc7c_react-refresh@0.12.0': + resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?261ae798208de92abe9759bc4b8278318ebdbc7c} + id: '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?261ae798208de92abe9759bc4b8278318ebdbc7c' name: '@vercel/turbopack-ecmascript-runtime' version: 0.0.0 dependencies: @@ -25594,8 +25581,8 @@ packages: - webpack dev: false - '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?1224fd2bbd051076fc363933c0e550416c2026d3': - resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?1224fd2bbd051076fc363933c0e550416c2026d3} + '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?261ae798208de92abe9759bc4b8278318ebdbc7c': + resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?261ae798208de92abe9759bc4b8278318ebdbc7c} name: '@vercel/turbopack-node' version: 0.0.0 dependencies: From 76b775b004e57f1942909d73196d0f68bb2e487c Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 10 Jul 2023 11:06:30 +0000 Subject: [PATCH 9/9] update turbopack --- Cargo.lock | 70 +++++++++---------- Cargo.toml | 6 +- .../next-swc/crates/next-core/js/package.json | 4 +- pnpm-lock.yaml | 18 ++--- 4 files changed, 49 insertions(+), 49 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 284afcdfe5e11..582f457d929dc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -412,7 +412,7 @@ dependencies = [ [[package]] name = "auto-hash-map" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "serde", ] @@ -3553,7 +3553,7 @@ dependencies = [ [[package]] name = "node-file-trace" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "serde", @@ -7213,7 +7213,7 @@ dependencies = [ [[package]] name = "turbo-tasks" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "auto-hash-map", @@ -7244,7 +7244,7 @@ dependencies = [ [[package]] name = "turbo-tasks-build" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "cargo-lock", @@ -7256,7 +7256,7 @@ dependencies = [ [[package]] name = "turbo-tasks-bytes" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "bytes", @@ -7271,7 +7271,7 @@ dependencies = [ [[package]] name = "turbo-tasks-env" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "dotenvs", @@ -7285,7 +7285,7 @@ dependencies = [ [[package]] name = "turbo-tasks-fetch" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "indexmap", @@ -7302,7 +7302,7 @@ dependencies = [ [[package]] name = "turbo-tasks-fs" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "auto-hash-map", @@ -7332,7 +7332,7 @@ dependencies = [ [[package]] name = "turbo-tasks-hash" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "base16", "hex", @@ -7344,7 +7344,7 @@ dependencies = [ [[package]] name = "turbo-tasks-macros" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -7358,7 +7358,7 @@ dependencies = [ [[package]] name = "turbo-tasks-macros-shared" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "proc-macro2", "quote", @@ -7368,7 +7368,7 @@ dependencies = [ [[package]] name = "turbo-tasks-malloc" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "mimalloc", ] @@ -7376,7 +7376,7 @@ dependencies = [ [[package]] name = "turbo-tasks-memory" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "auto-hash-map", @@ -7399,7 +7399,7 @@ dependencies = [ [[package]] name = "turbo-tasks-testing" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "auto-hash-map", @@ -7412,7 +7412,7 @@ dependencies = [ [[package]] name = "turbopack" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "async-recursion", @@ -7442,7 +7442,7 @@ dependencies = [ [[package]] name = "turbopack-bench" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "chromiumoxide", @@ -7472,7 +7472,7 @@ dependencies = [ [[package]] name = "turbopack-binding" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "auto-hash-map", "mdxjs", @@ -7514,7 +7514,7 @@ dependencies = [ [[package]] name = "turbopack-build" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "indexmap", @@ -7534,7 +7534,7 @@ dependencies = [ [[package]] name = "turbopack-cli-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "clap 4.1.11", @@ -7558,7 +7558,7 @@ dependencies = [ [[package]] name = "turbopack-core" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "async-trait", @@ -7586,7 +7586,7 @@ dependencies = [ [[package]] name = "turbopack-create-test-app" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "clap 4.1.11", @@ -7599,7 +7599,7 @@ dependencies = [ [[package]] name = "turbopack-css" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "async-trait", @@ -7621,7 +7621,7 @@ dependencies = [ [[package]] name = "turbopack-dev" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "indexmap", @@ -7645,7 +7645,7 @@ dependencies = [ [[package]] name = "turbopack-dev-server" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "async-compression", @@ -7681,7 +7681,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "async-trait", @@ -7714,7 +7714,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript-plugins" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "async-trait", @@ -7737,7 +7737,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript-runtime" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "indoc", @@ -7754,7 +7754,7 @@ dependencies = [ [[package]] name = "turbopack-env" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "indexmap", @@ -7770,7 +7770,7 @@ dependencies = [ [[package]] name = "turbopack-image" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "base64 0.21.0", @@ -7790,7 +7790,7 @@ dependencies = [ [[package]] name = "turbopack-json" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "serde", @@ -7805,7 +7805,7 @@ dependencies = [ [[package]] name = "turbopack-mdx" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "mdxjs", @@ -7820,7 +7820,7 @@ dependencies = [ [[package]] name = "turbopack-node" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "async-stream", @@ -7855,7 +7855,7 @@ dependencies = [ [[package]] name = "turbopack-static" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "serde", @@ -7871,7 +7871,7 @@ dependencies = [ [[package]] name = "turbopack-swc-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "swc_core", "turbo-tasks", @@ -7882,7 +7882,7 @@ dependencies = [ [[package]] name = "turbopack-test-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?branch=sokra/module-trait#261ae798208de92abe9759bc4b8278318ebdbc7c" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-230710.2#b910aac1d669f356a96b963e32fbae9de777487e" dependencies = [ "anyhow", "once_cell", diff --git a/Cargo.toml b/Cargo.toml index a9fce33521087..d66cb9183d95e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,11 +42,11 @@ swc_core = { version = "0.79.13" } testing = { version = "0.33.20" } # Turbo crates -turbopack-binding = { git = "https://github.com/vercel/turbo.git", branch = "sokra/module-trait" } # last tag: "turbopack-230707.3" +turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230710.2" } # [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", branch = "sokra/module-trait" } # last tag: "turbopack-230707.3" +turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230710.2" } # [TODO]: need to refactor embed_directory! macro usage in next-core -turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", branch = "sokra/module-trait" } # last tag: "turbopack-230707.3" +turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230710.2" } # General Deps diff --git a/packages/next-swc/crates/next-core/js/package.json b/packages/next-swc/crates/next-core/js/package.json index 0f768e5d037ba..ad6b908b75dd2 100644 --- a/packages/next-swc/crates/next-core/js/package.json +++ b/packages/next-swc/crates/next-core/js/package.json @@ -10,8 +10,8 @@ "check": "tsc --noEmit" }, "dependencies": { - "@vercel/turbopack-ecmascript-runtime": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?261ae798208de92abe9759bc4b8278318ebdbc7c", - "@vercel/turbopack-node": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?261ae798208de92abe9759bc4b8278318ebdbc7c", + "@vercel/turbopack-ecmascript-runtime": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230710.2", + "@vercel/turbopack-node": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-230710.2", "anser": "^2.1.1", "css.escape": "^1.5.1", "next": "*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0adc45fc6ba78..c012397e81397 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -992,8 +992,8 @@ importers: '@types/react': 18.2.7 '@types/react-dom': 18.2.4 '@vercel/ncc': ^0.36.0 - '@vercel/turbopack-ecmascript-runtime': https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?261ae798208de92abe9759bc4b8278318ebdbc7c - '@vercel/turbopack-node': https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?261ae798208de92abe9759bc4b8278318ebdbc7c + '@vercel/turbopack-ecmascript-runtime': https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230710.2 + '@vercel/turbopack-node': https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-230710.2 anser: ^2.1.1 css.escape: ^1.5.1 find-up: ^6.3.0 @@ -1005,8 +1005,8 @@ importers: stacktrace-parser: ^0.1.10 strip-ansi: ^7.0.1 dependencies: - '@vercel/turbopack-ecmascript-runtime': '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?261ae798208de92abe9759bc4b8278318ebdbc7c_react-refresh@0.12.0' - '@vercel/turbopack-node': '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?261ae798208de92abe9759bc4b8278318ebdbc7c' + '@vercel/turbopack-ecmascript-runtime': '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230710.2_react-refresh@0.12.0' + '@vercel/turbopack-node': '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-230710.2' anser: 2.1.1 css.escape: 1.5.1 next: link:../../../../next @@ -25568,9 +25568,9 @@ packages: /zwitch/2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} - '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?261ae798208de92abe9759bc4b8278318ebdbc7c_react-refresh@0.12.0': - resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?261ae798208de92abe9759bc4b8278318ebdbc7c} - id: '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?261ae798208de92abe9759bc4b8278318ebdbc7c' + '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230710.2_react-refresh@0.12.0': + resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230710.2} + id: '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230710.2' name: '@vercel/turbopack-ecmascript-runtime' version: 0.0.0 dependencies: @@ -25581,8 +25581,8 @@ packages: - webpack dev: false - '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?261ae798208de92abe9759bc4b8278318ebdbc7c': - resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?261ae798208de92abe9759bc4b8278318ebdbc7c} + '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-230710.2': + resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-node/js?turbopack-230710.2} name: '@vercel/turbopack-node' version: 0.0.0 dependencies: