Turbopack: Chunking Refactoring (#56756)
### What? see https://github.com/vercel/turbo/pull/6160 ### Turbopack Changes * https://github.com/vercel/turbo/pull/6116 * https://github.com/vercel/turbo/pull/6140 * https://github.com/vercel/turbo/pull/6118 * https://github.com/vercel/turbo/pull/6128 * https://github.com/vercel/turbo/pull/6129 * https://github.com/vercel/turbo/pull/6160 Closes WEB-1772 Co-authored-by: Justin Ridgewell <112982+jridgewell@users.noreply.github.com>
This commit is contained in:
parent
e8a92a9507
commit
04bad16bf4
20 changed files with 91 additions and 89 deletions
68
Cargo.lock
generated
68
Cargo.lock
generated
|
@ -321,7 +321,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "auto-hash-map"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"smallvec",
|
||||
|
@ -3424,6 +3424,7 @@ dependencies = [
|
|||
"serde_json",
|
||||
"swc_core",
|
||||
"thiserror",
|
||||
"tracing",
|
||||
"turbo-tasks",
|
||||
"turbo-tasks-fs",
|
||||
"turbopack-binding",
|
||||
|
@ -3515,7 +3516,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "node-file-trace"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"serde",
|
||||
|
@ -7368,7 +7369,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbo-tasks"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
|
@ -7400,7 +7401,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbo-tasks-build"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"cargo-lock",
|
||||
|
@ -7412,7 +7413,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbo-tasks-bytes"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
|
@ -7427,7 +7428,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbo-tasks-env"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"dotenvs",
|
||||
|
@ -7441,7 +7442,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbo-tasks-fetch"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"indexmap 1.9.3",
|
||||
|
@ -7458,7 +7459,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbo-tasks-fs"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"auto-hash-map",
|
||||
|
@ -7488,7 +7489,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbo-tasks-hash"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"base16",
|
||||
"hex",
|
||||
|
@ -7500,7 +7501,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbo-tasks-macros"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"convert_case 0.6.0",
|
||||
|
@ -7514,7 +7515,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbo-tasks-macros-shared"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -7524,7 +7525,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbo-tasks-malloc"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"mimalloc",
|
||||
]
|
||||
|
@ -7532,7 +7533,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbo-tasks-memory"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"auto-hash-map",
|
||||
|
@ -7557,7 +7558,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbopack"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-recursion",
|
||||
|
@ -7588,7 +7589,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbopack-binding"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"auto-hash-map",
|
||||
"mdxjs",
|
||||
|
@ -7628,7 +7629,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbopack-build"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"indexmap 1.9.3",
|
||||
|
@ -7650,7 +7651,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbopack-cli-utils"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap 4.4.2",
|
||||
|
@ -7674,7 +7675,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbopack-core"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-recursion",
|
||||
|
@ -7684,6 +7685,7 @@ dependencies = [
|
|||
"futures",
|
||||
"indexmap 1.9.3",
|
||||
"lazy_static",
|
||||
"once_cell",
|
||||
"patricia_tree",
|
||||
"qstring",
|
||||
"regex",
|
||||
|
@ -7703,7 +7705,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbopack-css"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
|
@ -7725,7 +7727,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbopack-dev"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"indexmap 1.9.3",
|
||||
|
@ -7749,7 +7751,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbopack-dev-server"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-compression",
|
||||
|
@ -7786,7 +7788,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbopack-ecmascript"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
|
@ -7820,7 +7822,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbopack-ecmascript-hmr-protocol"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
|
@ -7831,7 +7833,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbopack-ecmascript-plugins"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
|
@ -7854,7 +7856,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbopack-ecmascript-runtime"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"indoc",
|
||||
|
@ -7871,7 +7873,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbopack-env"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"indexmap 1.9.3",
|
||||
|
@ -7887,7 +7889,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbopack-image"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"base64 0.21.4",
|
||||
|
@ -7907,7 +7909,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbopack-json"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"serde",
|
||||
|
@ -7922,7 +7924,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbopack-mdx"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"mdxjs",
|
||||
|
@ -7937,7 +7939,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbopack-node"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-stream",
|
||||
|
@ -7972,7 +7974,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbopack-static"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"serde",
|
||||
|
@ -7988,7 +7990,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbopack-swc-utils"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"swc_core",
|
||||
"turbo-tasks",
|
||||
|
@ -7999,7 +8001,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "turbopack-wasm"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231006.4#8439948663a049728a48386cf4791693e264260e"
|
||||
source = "git+https://github.com/vercel/turbo.git?tag=turbopack-231013.2#9c1b3ba96b6f452c2c6d46b2c0d50c80df1b4699"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"indexmap 1.9.3",
|
||||
|
|
|
@ -40,11 +40,11 @@ swc_core = { version = "0.83.28", features = [
|
|||
testing = { version = "0.34.1" }
|
||||
|
||||
# Turbo crates
|
||||
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-231006.4" }
|
||||
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-231013.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", tag = "turbopack-231006.4" }
|
||||
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-231013.2" }
|
||||
# [TODO]: need to refactor embed_directory! macro usage in next-core
|
||||
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-231006.4" }
|
||||
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-231013.2" }
|
||||
|
||||
# General Deps
|
||||
|
||||
|
|
|
@ -834,7 +834,7 @@ impl AppEndpoint {
|
|||
.app_project
|
||||
.project()
|
||||
.rsc_chunking_context()
|
||||
.entry_chunk(
|
||||
.entry_chunk_group(
|
||||
server_path.join(format!(
|
||||
"app{original_name}.js",
|
||||
original_name = app_entry.original_name
|
||||
|
|
|
@ -629,8 +629,11 @@ impl PageEndpoint {
|
|||
|
||||
let ssr_entry_chunk_path_string = format!("pages{asset_path}");
|
||||
let ssr_entry_chunk_path = node_path.join(ssr_entry_chunk_path_string);
|
||||
let ssr_entry_chunk =
|
||||
chunking_context.entry_chunk(ssr_entry_chunk_path, ssr_module, runtime_entries);
|
||||
let ssr_entry_chunk = chunking_context.entry_chunk_group(
|
||||
ssr_entry_chunk_path,
|
||||
ssr_module,
|
||||
runtime_entries,
|
||||
);
|
||||
|
||||
Ok(SsrChunk::NodeJs {
|
||||
entry: ssr_entry_chunk,
|
||||
|
|
|
@ -291,7 +291,7 @@ pub async fn compute_app_entries_chunks(
|
|||
.entry(Vc::upcast(app_entry.rsc_entry))
|
||||
.await?;
|
||||
|
||||
let rsc_chunk = rsc_chunking_context.entry_chunk(
|
||||
let rsc_chunk = rsc_chunking_context.entry_chunk_group(
|
||||
node_root.join(format!(
|
||||
"server/app/{original_name}.js",
|
||||
original_name = app_entry.original_name
|
||||
|
|
|
@ -387,7 +387,7 @@ pub async fn compute_page_entries_chunks(
|
|||
let pathname = page_entry.pathname.await?;
|
||||
let asset_path: String = get_asset_path_from_pathname(&pathname, ".js");
|
||||
|
||||
let ssr_entry_chunk = ssr_chunking_context.entry_chunk(
|
||||
let ssr_entry_chunk = ssr_chunking_context.entry_chunk_group(
|
||||
node_root.join(format!("server/pages/{asset_path}")),
|
||||
Vc::upcast(page_entry.ssr_module),
|
||||
page_entries.ssr_runtime_entries,
|
||||
|
|
|
@ -29,6 +29,7 @@ allsorts = { workspace = true }
|
|||
futures = { workspace = true }
|
||||
lazy_static = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
turbopack-binding = { workspace = true, features = [
|
||||
"__swc_transform_modularize_imports",
|
||||
"__swc_transform_relay",
|
||||
|
|
|
@ -116,7 +116,6 @@ impl LoaderTreeBuilder {
|
|||
)?;
|
||||
self.imports.push(formatdoc!(
|
||||
r#"
|
||||
("TURBOPACK {{ chunking-type: isolatedParallel }}");
|
||||
import {}, {{ chunks as {} }} from "COMPONENT_{}";
|
||||
"#,
|
||||
identifier,
|
||||
|
|
|
@ -8,8 +8,7 @@ use turbopack_binding::{
|
|||
asset::{Asset, AssetContent},
|
||||
chunk::{
|
||||
ChunkData, ChunkItem, ChunkItemExt, ChunkType, ChunkableModule,
|
||||
ChunkableModuleReference, ChunkingContext, ChunkingContextExt, ChunkingType,
|
||||
ChunkingTypeOption, ChunksData,
|
||||
ChunkableModuleReference, ChunkingContext, ChunkingContextExt, ChunksData,
|
||||
},
|
||||
ident::AssetIdent,
|
||||
module::Module,
|
||||
|
@ -274,9 +273,4 @@ impl ModuleReference for WithClientChunksAssetReference {
|
|||
}
|
||||
|
||||
#[turbo_tasks::value_impl]
|
||||
impl ChunkableModuleReference for WithClientChunksAssetReference {
|
||||
#[turbo_tasks::function]
|
||||
fn chunking_type(&self) -> Vc<ChunkingTypeOption> {
|
||||
Vc::cell(Some(ChunkingType::IsolatedParallel))
|
||||
}
|
||||
}
|
||||
impl ChunkableModuleReference for WithClientChunksAssetReference {}
|
||||
|
|
|
@ -7,10 +7,7 @@ use turbo_tasks_fs::File;
|
|||
use turbopack_binding::turbopack::{
|
||||
core::{
|
||||
asset::{Asset, AssetContent},
|
||||
chunk::{
|
||||
availability_info::AvailabilityInfo, ChunkItem, ChunkType, ChunkableModule,
|
||||
ChunkingContext,
|
||||
},
|
||||
chunk::{AsyncModuleInfo, ChunkItem, ChunkType, ChunkableModule, ChunkingContext},
|
||||
code_builder::CodeBuilder,
|
||||
context::AssetContext,
|
||||
ident::AssetIdent,
|
||||
|
@ -257,12 +254,12 @@ impl EcmascriptChunkItem for ProxyModuleChunkItem {
|
|||
}
|
||||
|
||||
#[turbo_tasks::function]
|
||||
fn content_with_availability_info(
|
||||
fn content_with_async_module_info(
|
||||
&self,
|
||||
availability_info: Value<AvailabilityInfo>,
|
||||
async_module_info: Option<Vc<AsyncModuleInfo>>,
|
||||
) -> Vc<EcmascriptChunkItemContent> {
|
||||
self.inner_proxy_module_chunk_item
|
||||
.content_with_availability_info(availability_info)
|
||||
.content_with_async_module_info(async_module_info)
|
||||
}
|
||||
|
||||
#[turbo_tasks::function]
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
use anyhow::Result;
|
||||
use turbo_tasks::{ValueToString, Vc};
|
||||
use turbopack_binding::turbopack::core::{
|
||||
chunk::{ChunkableModuleReference, ChunkingType, ChunkingTypeOption},
|
||||
module::Module,
|
||||
reference::ModuleReference,
|
||||
chunk::ChunkableModuleReference, module::Module, reference::ModuleReference,
|
||||
resolve::ModuleResolveResult,
|
||||
};
|
||||
|
||||
|
@ -40,11 +38,4 @@ impl ModuleReference for NextServerComponentModuleReference {
|
|||
}
|
||||
|
||||
#[turbo_tasks::value_impl]
|
||||
impl ChunkableModuleReference for NextServerComponentModuleReference {
|
||||
#[turbo_tasks::function]
|
||||
fn chunking_type(&self) -> Vc<ChunkingTypeOption> {
|
||||
// TODO(alexkirsz) Instead of isolated parallel, have the server component
|
||||
// reference create a new chunk group entirely?
|
||||
Vc::cell(Some(ChunkingType::IsolatedParallel))
|
||||
}
|
||||
}
|
||||
impl ChunkableModuleReference for NextServerComponentModuleReference {}
|
||||
|
|
|
@ -191,7 +191,7 @@
|
|||
"@types/ws": "8.2.0",
|
||||
"@vercel/ncc": "0.34.0",
|
||||
"@vercel/nft": "0.22.6",
|
||||
"@vercel/turbopack-ecmascript-runtime": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-231006.4",
|
||||
"@vercel/turbopack-ecmascript-runtime": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-231013.2",
|
||||
"acorn": "8.5.0",
|
||||
"amphtml-validator": "1.0.35",
|
||||
"anser": "1.4.9",
|
||||
|
|
|
@ -1061,8 +1061,8 @@ importers:
|
|||
specifier: 0.22.6
|
||||
version: 0.22.6
|
||||
'@vercel/turbopack-ecmascript-runtime':
|
||||
specifier: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-231006.4
|
||||
version: '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-231006.4(react-refresh@0.12.0)(webpack@5.86.0)'
|
||||
specifier: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-231013.2
|
||||
version: '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-231013.2(react-refresh@0.12.0)(webpack@5.86.0)'
|
||||
acorn:
|
||||
specifier: 8.5.0
|
||||
version: 8.5.0
|
||||
|
@ -26805,9 +26805,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-231006.4(react-refresh@0.12.0)(webpack@5.86.0)':
|
||||
resolution: {registry: https://registry.npmjs.org/, tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-231006.4}
|
||||
id: '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-231006.4'
|
||||
'@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-231013.2(react-refresh@0.12.0)(webpack@5.86.0)':
|
||||
resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-231013.2}
|
||||
id: '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-231013.2'
|
||||
name: '@vercel/turbopack-ecmascript-runtime'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
|
|
|
@ -28,6 +28,11 @@ const SKIPPED_TEST_SUITES = {
|
|||
'ReactRefreshRegression app can fast refresh a page with dynamic rendering',
|
||||
'ReactRefreshRegression app can fast refresh a page with config',
|
||||
],
|
||||
'test/development/acceptance-app/ReactRefreshRequire.test.ts': [
|
||||
'ReactRefreshRequire app re-runs accepted modules',
|
||||
'ReactRefreshRequire app propagates a hot update to closest accepted module',
|
||||
'ReactRefreshRequire app propagates hot update to all inverse dependencies',
|
||||
],
|
||||
'test/development/acceptance/ReactRefreshRequire.test.ts': [
|
||||
'ReactRefreshRequire re-runs accepted modules',
|
||||
'ReactRefreshRequire propagates a hot update to closest accepted module',
|
||||
|
|
|
@ -12,6 +12,14 @@ exports[`next.rs api should allow to write app Node.js route to disk: diagnostic
|
|||
|
||||
exports[`next.rs api should allow to write app Node.js route to disk: issues 1`] = `Array []`;
|
||||
|
||||
exports[`next.rs api should allow to write app edge page to disk: diagnostics 1`] = `Array []`;
|
||||
|
||||
exports[`next.rs api should allow to write app edge page to disk: issues 1`] = `Array []`;
|
||||
|
||||
exports[`next.rs api should allow to write app edge page to disk: rsc diagnostics 1`] = `Array []`;
|
||||
|
||||
exports[`next.rs api should allow to write app edge page to disk: rsc issues 1`] = `Array []`;
|
||||
|
||||
exports[`next.rs api should allow to write app edge route to disk: diagnostics 1`] = `Array []`;
|
||||
|
||||
exports[`next.rs api should allow to write app edge route to disk: issues 1`] = `Array []`;
|
||||
|
|
|
@ -71,7 +71,7 @@ describe('Test Draft Mode', () => {
|
|||
|
||||
const body = await res.text()
|
||||
// "err":{"name":"TypeError","message":"Cannot read property 'previewModeId' of undefined"
|
||||
expect(body).not.toContain('err')
|
||||
expect(body).not.toContain('"err"')
|
||||
expect(body).not.toContain('TypeError')
|
||||
expect(body).not.toContain('previewModeId')
|
||||
|
||||
|
|
|
@ -22,15 +22,16 @@ describe('default', () => {
|
|||
await renderViaHTTP(port, '/')
|
||||
if (process.env.TURBOPACK) {
|
||||
const ssrPath = join(appDir, '.next/server/chunks/ssr')
|
||||
const pageBundleBasename = (await fs.readdir(ssrPath)).find((p) =>
|
||||
p.match(/pages_index_[0-9a-f]+\.js$/)
|
||||
const pageBundleBasenames = (await fs.readdir(ssrPath)).filter((p) =>
|
||||
p.match(/\.js$/)
|
||||
)
|
||||
expect(pageBundleBasename).not.toBeUndefined()
|
||||
const output = await fs.readFile(
|
||||
join(ssrPath, pageBundleBasename),
|
||||
'utf8'
|
||||
)
|
||||
expect(output).toContain(
|
||||
expect(pageBundleBasenames).not.toBeEmpty()
|
||||
let allBundles = ''
|
||||
for (const basename of pageBundleBasenames) {
|
||||
const output = await fs.readFile(join(ssrPath, basename), 'utf8')
|
||||
allBundles += output
|
||||
}
|
||||
expect(allBundles).toContain(
|
||||
'__turbopack_external_require__("external-package", true)'
|
||||
)
|
||||
} else {
|
||||
|
|
|
@ -210,7 +210,7 @@ describe('ServerSide Props Preview Mode', () => {
|
|||
|
||||
const body = await res.text()
|
||||
// "err":{"name":"TypeError","message":"Cannot read property 'previewModeId' of undefined"
|
||||
expect(body).not.toContain('err')
|
||||
expect(body).not.toContain('"err"')
|
||||
expect(body).not.toContain('TypeError')
|
||||
expect(body).not.toContain('previewModeId')
|
||||
|
||||
|
|
|
@ -303,7 +303,7 @@ describe('Prerender Preview Mode', () => {
|
|||
|
||||
const body = await res.text()
|
||||
// "err":{"name":"TypeError","message":"Cannot read property 'previewModeId' of undefined"
|
||||
expect(body).not.toContain('err')
|
||||
expect(body).not.toContain('"err"')
|
||||
expect(body).not.toContain('TypeError')
|
||||
expect(body).not.toContain('previewModeId')
|
||||
|
||||
|
|
|
@ -917,13 +917,10 @@
|
|||
"ReactRefreshRequire app can continue hot updates after module-level errors with module.exports",
|
||||
"ReactRefreshRequire app can replace a module before it is loaded",
|
||||
"ReactRefreshRequire app does not accumulate stale exports over time",
|
||||
"ReactRefreshRequire app propagates a hot update to closest accepted module",
|
||||
"ReactRefreshRequire app propagates hot update to all inverse dependencies",
|
||||
"ReactRefreshRequire app provides fresh value for ES6 default import in parents",
|
||||
"ReactRefreshRequire app provides fresh value for ES6 named import in parents",
|
||||
"ReactRefreshRequire app provides fresh value for exports.* in parents",
|
||||
"ReactRefreshRequire app provides fresh value for module.exports in parents",
|
||||
"ReactRefreshRequire app re-runs accepted modules",
|
||||
"ReactRefreshRequire app runs dependencies before dependents",
|
||||
"ReactRefreshRequire app stops update propagation after module-level errors"
|
||||
],
|
||||
|
@ -931,7 +928,11 @@
|
|||
"pending": [
|
||||
"ReactRefreshRequire app propagates a module that stops accepting in next version"
|
||||
],
|
||||
"flakey": [],
|
||||
"flakey": [
|
||||
"ReactRefreshRequire app propagates a hot update to closest accepted module",
|
||||
"ReactRefreshRequire app propagates hot update to all inverse dependencies",
|
||||
"ReactRefreshRequire app re-runs accepted modules"
|
||||
],
|
||||
"runtimeError": false
|
||||
},
|
||||
"test/development/acceptance-app/app-hmr-changes.test.ts": {
|
||||
|
|
Loading…
Reference in a new issue