Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Revert "update turbopack"" #50947

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
115 changes: 63 additions & 52 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ next-transform-strip-page-exports = { path = "packages/next-swc/crates/next-tran

# SWC crates
# Keep consistent with preset_env_base through swc_core
swc_core = { version = "0.76.37" }
swc_core = { version = "0.76.41" }
testing = { version = "0.33.13" }

# Turbo crates
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230601.3" }
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230608.1" }
# [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-230601.3" }
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230608.1" }
# [TODO]: need to refactor embed_directory! macro usage in next-core
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230601.3" }
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-230608.1" }

# General Deps

Expand Down
4 changes: 2 additions & 2 deletions packages/next-swc/crates/next-core/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"check": "tsc --noEmit"
},
"dependencies": {
"@vercel/turbopack-ecmascript-runtime": "https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230601.3",
"@vercel/turbopack-node": "https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230601.3",
"@vercel/turbopack-ecmascript-runtime": "https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-230608.1",
"@vercel/turbopack-node": "https://gitpkg.vercel.app/vercel/turbo/crates/turbopack-node/js?turbopack-230608.1",
"anser": "^2.1.1",
"css.escape": "^1.5.1",
"next": "*",
Expand Down
4 changes: 4 additions & 0 deletions packages/next-swc/crates/next-core/src/app_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ use turbopack_binding::{
},
env::ProcessEnvAssetVc,
node::{
debug::should_debug,
execution_context::ExecutionContextVc,
render::{
node_api_source::create_node_api_source,
Expand Down Expand Up @@ -587,6 +588,7 @@ async fn create_app_page_source_for_route(
.into(),
fallback_page,
render_data,
should_debug("app_source"),
);

Ok(source.issue_context(app_dir, &format!("Next.js App Page Route {pathname}")))
Expand Down Expand Up @@ -630,6 +632,7 @@ async fn create_app_not_found_page_source(
.into(),
fallback_page,
render_data,
should_debug("app_source"),
);

Ok(source.issue_context(app_dir, "Next.js App Page Route /404"))
Expand Down Expand Up @@ -673,6 +676,7 @@ async fn create_app_route_source_for_route(
.cell()
.into(),
render_data,
should_debug("app_source"),
);

Ok(source.issue_context(app_dir, &format!("Next.js App Route {pathname}")))
Expand Down
3 changes: 2 additions & 1 deletion packages/next-swc/crates/next-core/src/next_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ use turbopack_binding::{
styled_components::StyledComponentsTransformConfig,
},
node::{
debug::should_debug,
evaluate::evaluate,
execution_context::{ExecutionContext, ExecutionContextVc},
transforms::webpack::{WebpackLoaderItem, WebpackLoaderItemsVc},
Expand Down Expand Up @@ -688,7 +689,7 @@ pub async fn load_next_config_internal(
None,
vec![],
config_changed,
/* debug */ false,
should_debug("next_config"),
)
.await?;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ async fn get_mock_stylesheet(
ecmascript::{
EcmascriptInputTransformsVc, EcmascriptModuleAssetType, EcmascriptModuleAssetVc,
},
node::{evaluate::evaluate, execution_context::ExecutionContext},
node::{debug::should_debug, evaluate::evaluate, execution_context::ExecutionContext},
turbopack::evaluate_context::node_evaluate_asset_context,
},
};
Expand Down Expand Up @@ -473,7 +473,7 @@ async fn get_mock_stylesheet(
None,
vec![],
CompletionVc::immutable(),
/* debug */ false,
should_debug("next_font::google"),
)
.await?;

Expand Down
5 changes: 5 additions & 0 deletions packages/next-swc/crates/next-core/src/page_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ use turbopack_binding::{
},
env::ProcessEnvAssetVc,
node::{
debug::should_debug,
execution_context::ExecutionContextVc,
render::{
node_api_source::create_node_api_source,
Expand Down Expand Up @@ -422,6 +423,7 @@ async fn create_page_source_for_file(
.cell()
.into(),
render_data,
should_debug("page_source"),
)
} else {
let data_pathname = pathname_for_path(client_root, client_path, PathType::Data);
Expand Down Expand Up @@ -465,6 +467,7 @@ async fn create_page_source_for_file(
ssr_entry,
fallback_page,
render_data,
should_debug("page_source"),
),
create_node_rendered_source(
project_path,
Expand All @@ -476,6 +479,7 @@ async fn create_page_source_for_file(
ssr_data_entry,
fallback_page,
render_data,
should_debug("page_source"),
),
create_page_loader(
client_root,
Expand Down Expand Up @@ -591,6 +595,7 @@ async fn create_not_found_page_source(
ssr_entry,
fallback_page,
render_data,
should_debug("page_source"),
),
page_loader,
])
Expand Down
3 changes: 2 additions & 1 deletion packages/next-swc/crates/next-core/src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ use turbopack_binding::{
},
dev::DevChunkingContextVc,
node::{
debug::should_debug,
evaluate::evaluate,
execution_context::{ExecutionContext, ExecutionContextVc},
source_map::{trace_stack, StructuredError},
Expand Down Expand Up @@ -376,7 +377,7 @@ async fn route_internal(
JsonValueVc::cell(serde_json::to_value(ServerInfo::try_from(&*server_addr)?)?),
],
CompletionsVc::all(vec![next_config_changed, routes_changed]),
/* debug */ false,
should_debug("router"),
)
.await?;

Expand Down
20 changes: 10 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.