Unverified Commit 04bad16b authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub
parent e8a92a95
This diff is collapsed.
......@@ -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]
......
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": {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment