Commit 32977b34 authored by Will Binns-Smith's avatar Will Binns-Smith

Update comments and tests to reflect unified server/chunks/ output path

Remove /ssr suffix from all references to server chunk paths in comments,
JSDoc examples, and integration tests. All Node.js server chunks now land
in server/chunks/ directly.
Co-Authored-By: 's avatarClaude <noreply@anthropic.com>
parent 9ce2a539
......@@ -778,7 +778,7 @@ function bindingToApi(
/**
* Subscribe to the list of output chunk paths that can receive HMR updates.
* Chunk paths are output file paths like "server/chunks/ssr/..._.js" for server
* Chunk paths are output file paths like "server/chunks/..._.js" for server
* or "_next/static/chunks/app/page.js" for client.
*/
hmrChunkNamesSubscribe(target: HmrTarget) {
......
......@@ -255,7 +255,7 @@ export type NodeJsHmrUpdate =
| NodeJsRestartHmrUpdate
export interface HmrChunkNames {
/** Relative paths to output chunks that can receive HMR updates (e.g., "server/chunks/ssr/..._.js") */
/** Relative paths to output chunks that can receive HMR updates (e.g., "server/chunks/..._.js") */
chunkNames: string[]
}
......
......@@ -168,7 +168,7 @@ function setupServerHmr(
/**
* Subscribe to HMR updates for a server chunk.
* @param chunkPath - Server chunk output path (e.g., "server/chunks/ssr/..._.js")
* @param chunkPath - Server chunk output path (e.g., "server/chunks/..._.js")
*/
function subscribeToServerHmr(chunkPath: string) {
if (serverHmrSubscriptions.has(chunkPath)) {
......
......@@ -182,9 +182,9 @@ function getSourcemappedFrameIfPossible(
let sourceMapPayload: ModernSourceMapPayload
if (sourceMapCacheEntry === undefined) {
let sourceURL = frame.file
// e.g. "/Users/foo/APP/.next/server/chunks/ssr/[root-of-the-server]__2934a0._.js"
// or "C:\Users\foo\APP\.next\server\chunks\ssr\[root-of-the-server]__2934a0._.js"
// will be keyed by Node.js as "file:///APP/.next/server/chunks/ssr/[root-of-the-server]__2934a0._.js".
// e.g. "/Users/foo/APP/.next/server/chunks/[root-of-the-server]__2934a0._.js"
// or "C:\Users\foo\APP\.next\server\chunks\[root-of-the-server]__2934a0._.js"
// will be keyed by Node.js as "file:///APP/.next/server/chunks/[root-of-the-server]__2934a0._.js".
// This is likely caused by `callsite.toString()` in `Error.prepareStackTrace converting file URLs to paths.
//
// But frame.file might also be "webpack-internal:///(rsc)/./app/bad-sourcemap/page.js" or
......
......@@ -25,7 +25,7 @@ describe('default', () => {
const app = await launchApp(appDir, port)
await renderViaHTTP(port, '/')
if (process.env.IS_TURBOPACK_TEST) {
const ssrPath = join(appDir, `${getDistDir()}/server/chunks/ssr`)
const ssrPath = join(appDir, `${getDistDir()}/server/chunks`)
const pageBundleBasenames = (await fs.readdir(ssrPath)).filter((p) =>
p.match(/\.js$/)
)
......
......@@ -16,7 +16,7 @@ describe('bundle pages externals with config.bundlePagesRouterDependencies', ()
it('should have no externals with the config set', async () => {
if (process.env.IS_TURBOPACK_TEST) {
const ssrPath = join(appDir, '.next/server/chunks/ssr')
const ssrPath = join(appDir, '.next/server/chunks')
const pageBundleBasenames = (await fs.readdir(ssrPath)).filter((p) =>
p.match(/\.js$/)
)
......@@ -40,7 +40,7 @@ describe('bundle pages externals with config.bundlePagesRouterDependencies', ()
it('should respect the serverExternalPackages config', async () => {
if (process.env.IS_TURBOPACK_TEST) {
const ssrPath = join(appDir, '.next/server/chunks/ssr')
const ssrPath = join(appDir, '.next/server/chunks')
const pageBundleBasenames = (await fs.readdir(ssrPath)).filter((p) =>
p.match(/\.js$/)
)
......
......@@ -29,7 +29,7 @@ describe('minified module ids', () => {
global.isNextDev = false
await nextBuild(appDir, [])
const ssrPath = join(appDir, `${getDistDir()}/server/chunks/ssr/`)
const ssrPath = join(appDir, `${getDistDir()}/server/chunks/`)
const ssrBundleBasenames = (await fs.readdir(ssrPath)).filter((p) =>
p.match(/\.js$/)
)
......@@ -88,7 +88,7 @@ describe('minified module ids', () => {
await renderViaHTTP(appPort, '/')
const ssrPath = join(appDir, `${getDistDir()}/server/chunks/ssr/`)
const ssrPath = join(appDir, `${getDistDir()}/server/chunks/`)
const ssrBundleBasenames = (await fs.readdir(ssrPath)).filter((p) =>
p.match(/\.js$/)
)
......
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