diff --git a/.github/workflows/test_e2e_deploy_release.yml b/.github/workflows/test_e2e_deploy_release.yml index 25fb523511634..fee7b89e38fca 100644 --- a/.github/workflows/test_e2e_deploy_release.yml +++ b/.github/workflows/test_e2e_deploy_release.yml @@ -90,6 +90,33 @@ jobs: runs_on_labels: '["ubuntu-latest"]' overrideProxyAddress: ${{ inputs.overrideProxyAddress || '' }} + test-deploy-adapter: + name: Run Deploy Adapter Tests + needs: setup + uses: ./.github/workflows/build_reusable.yml + secrets: inherit + strategy: + fail-fast: false + matrix: + group: [1/1] + with: + afterBuild: | + npm i -g vercel@latest && \ + NEXT_E2E_TEST_TIMEOUT=240000 \ + NEXT_TEST_MODE=deploy \ + IS_WEBPACK_TEST=1 \ + NEXT_ENABLE_ADAPTER=1 \ + NEXT_EXTERNAL_TESTS_FILTERS="test/deploy-tests-manifest.json" \ + NEXT_TEST_VERSION="${{ github.event.inputs.nextVersion || needs.setup.outputs.next-version || 'canary' }}" \ + VERCEL_CLI_VERSION="${{ github.event.inputs.vercelCliVersion || 'vercel@latest' }}" \ + node run-tests.js --timings -g ${{ matrix.group }} -c 2 test/e2e/app-dir/segment-cache/client-params/client-params.test.ts test/e2e/app-dir/app-static/app-static.test.ts test/e2e/app-dir/cache-components/cache-components.test.ts test/e2e/app-dir/app/index.test.ts test/e2e/app-dir/app-edge/app-edge.test.ts test/e2e/edge-pages-support/index.test.ts test/e2e/prerender.test.ts test/e2e/middleware-general/test/index.test.ts test/e2e/middleware-rewrites/test/index.test.ts test/e2e/app-dir/actions/app-action-node-middleware.test.ts + skipNativeBuild: 'yes' + skipNativeInstall: 'no' + stepName: 'test-deploy-adapter-${{ matrix.group }}' + timeout_minutes: 180 + runs_on_labels: '["ubuntu-latest"]' + overrideProxyAddress: ${{ inputs.overrideProxyAddress || '' }} + report-test-results-to-datadog: needs: test-deploy if: ${{ always() }} diff --git a/packages/next/src/build/adapter/build-complete.ts b/packages/next/src/build/adapter/build-complete.ts index 1af503c507551..f0a062929f9fc 100644 --- a/packages/next/src/build/adapter/build-complete.ts +++ b/packages/next/src/build/adapter/build-complete.ts @@ -176,50 +176,38 @@ export interface AdapterOutput { /** * fallback is initial cache data generated during build for a prerender */ - fallback?: - | { - /** - * path to the fallback file can be HTML/JSON/RSC, - */ - filePath: string - /** - * initialStatus is the status code that should be applied - * when serving the fallback - */ - initialStatus?: number - /** - * initialHeaders are the headers that should be sent when - * serving the fallback - */ - initialHeaders?: Record - /** - * initial expiration is how long until the fallback entry - * is considered expired and no longer valid to serve - */ - initialExpiration?: number - /** - * initial revalidate is how long until the fallback is - * considered stale and should be revalidated - */ - initialRevalidate?: Revalidate - - /** - * postponedState is the PPR state when it postponed and is used for resuming - */ - postponedState?: string - } - | { - /* - a fallback filePath can be omitted when postponedState is - present which signals the fallback should just resume with - the postpone state but doesn't have fallback to seed cache - */ - postponedState: string - initialExpiration?: number - initialRevalidate?: Revalidate - initialHeaders?: Record - initialStatus?: number - } + fallback?: { + /** + * path to the fallback file can be HTML/JSON/RSC, + */ + filePath: string | undefined + /** + * initialStatus is the status code that should be applied + * when serving the fallback + */ + initialStatus?: number + /** + * initialHeaders are the headers that should be sent when + * serving the fallback + */ + initialHeaders?: Record + /** + * initial expiration is how long until the fallback entry + * is considered expired and no longer valid to serve + */ + initialExpiration?: number + /** + * initial revalidate is how long until the fallback is + * considered stale and should be revalidated + */ + initialRevalidate?: Revalidate + + /** + * postponedState is the PPR state when it postponed and is used for resuming + */ + postponedState: string | undefined + } + /** * config related to the route */ @@ -701,9 +689,9 @@ export async function handleBuildComplete({ function handleFile(file: string) { const originalPath = path.join(distDir, file) - const fileOutputPath = path.join( - path.relative(tracingRoot, distDir), - file + const fileOutputPath = path.relative( + config.distDir, + path.join(path.relative(tracingRoot, distDir), file) ) if (!output.assets) { output.assets = {} @@ -714,7 +702,10 @@ export async function handleBuildComplete({ handleFile(file) } for (const item of [...(page.assets || [])]) { - handleFile(item.filePath) + if (!output.assets) { + output.assets = {} + } + output.assets[item.name] = path.join(distDir, item.filePath) } for (const item of page.wasm || []) { if (!output.wasmAssets) { @@ -756,6 +747,17 @@ export async function handleBuildComplete({ pathname: rscPathname, id: page.name + '.rsc', }) + } else if (serverPropsPages.has(route === '/index' ? '/' : route)) { + const nextDataPath = path.posix.join( + '/_next/data/', + buildId, + normalizePagePath(output.pathname) + '.json' + ) + outputs.appPages.push({ + ...output, + pathname: nextDataPath, + id: page.name, + }) } } @@ -1086,6 +1088,10 @@ export async function handleBuildComplete({ meta: { postponed?: string segmentPaths?: string[] + }, + ctx: { + htmlAllowQuery?: string[] + dataAllowQuery?: string[] } ) => { if (meta.postponed && initialOutput.fallback) { @@ -1099,6 +1105,20 @@ export async function handleBuildComplete({ `${normalizedRoute}${prefetchSegmentDirSuffix}` ) + // If client param parsing is enabled, we follow the same logic as + // the HTML allowQuery as it's already going to vary based on if + // there's a static shell generated or if there's fallback root + // params. If there are fallback root params, and we can serve a + // fallback, then we should follow the same logic for the segment + // prerenders. + // + // If client param parsing is not enabled, we have to use the + // allowQuery because the segment payloads will contain dynamic + // segment values. + const segmentAllowQuery = routesManifest.rsc.clientParamParsing + ? ctx.htmlAllowQuery + : ctx.dataAllowQuery + for (const segmentPath of meta.segmentPaths) { const outputSegmentPath = path.join( @@ -1106,10 +1126,16 @@ export async function handleBuildComplete({ segmentPath ) + prefetchSegmentSuffix - const fallbackPathname = path.join( - segmentsDir, - segmentPath + prefetchSegmentSuffix - ) + // Only use the fallback value when the allowQuery is defined and + // is empty, which means that the segments do not vary based on + // the route parameters. This is safer than ensuring that we only + // use the fallback when this is not a fallback because we know in + // this new logic that it doesn't vary based on the route + // parameters and therefore can be used for all requests instead. + const fallbackPathname = + segmentAllowQuery && segmentAllowQuery.length === 0 + ? path.join(segmentsDir, segmentPath + prefetchSegmentSuffix) + : undefined outputs.prerenders.push({ id: outputSegmentPath, @@ -1120,10 +1146,12 @@ export async function handleBuildComplete({ config: { ...initialOutput.config, + bypassFor: undefined, }, fallback: { filePath: fallbackPathname, + postponedState: undefined, initialExpiration: initialOutput.fallback?.initialExpiration, initialRevalidate: initialOutput.fallback?.initialRevalidate, @@ -1165,11 +1193,19 @@ export async function handleBuildComplete({ // normalize these for consistency for (const key of Object.keys(meta.headers)) { const keyLower = key.toLowerCase() + let value = meta.headers[key] + + // normalize values to strings (e.g. set-cookie can be an array) + if (Array.isArray(value)) { + value = value.join(', ') + } else if (typeof value !== 'string') { + value = String(value) + } + if (keyLower !== key) { - const value = meta.headers[key] delete meta.headers[key] - meta.headers[keyLower] = value } + meta.headers[keyLower] = value } } @@ -1208,6 +1244,12 @@ export async function handleBuildComplete({ const isAppPage = Boolean(appOutputMap[srcRoute]) || srcRoute === '/_not-found' + // if we already have 404.html favor that instead of + // _not-found prerender + if (srcRoute === '/_not-found' && hasStatic404) { + continue + } + const isNotFoundTrue = prerenderManifest.notFoundRoutes.includes(route) let allowQuery: string[] | undefined @@ -1215,7 +1257,7 @@ export async function handleBuildComplete({ (item) => item.page === srcRoute )?.routeKeys - if (!isDynamicRoute(srcRoute)) { + if (!isDynamicRoute(route)) { // for non-dynamic routes we use an empty array since // no query values bust the cache for non-dynamic prerenders // prerendered paths also do not pass allowQuery as they match @@ -1253,6 +1295,42 @@ export async function handleBuildComplete({ const meta = await getAppRouteMeta(route, isAppPage) + let htmlAllowQuery = allowQuery + let dataAllowQuery = allowQuery + const dataInitialHeaders: Record = {} + + // We additionally vary based on if there's a postponed prerender + // because if there isn't, then that means that we generated an + // empty shell, and producing an empty RSC shell would be a waste. + // If there is a postponed prerender, then the RSC shell would be + // non-empty, and it would be valuable to also generate an empty + // RSC shell. + if (meta.postponed) { + htmlAllowQuery = [] + + if (routesManifest.rsc.dynamicRSCPrerender) { + // If client param parsing is enabled, we follow the same logic as the + // HTML allowQuery as it's already going to vary based on if there's a + // static shell generated or if there's fallback root params. If there + // are fallback root params, and we can serve a fallback, then we + // should follow the same logic for the dynamic RSC routes. + // + // If client param parsing is not enabled, we have to use the + // allowQuery because the RSC payloads will contain dynamic segment + // values. + if (routesManifest.rsc.clientParamParsing) { + dataAllowQuery = htmlAllowQuery + } + } + } + + if (renderingMode === RenderingMode.PARTIALLY_STATIC) { + // Dynamic RSC requests cannot be cached, so we explicity set it + // here to ensure that the response is not cached by the browser. + dataInitialHeaders['cache-control'] = + 'private, no-store, no-cache, max-age=0, must-revalidate' + } + const initialOutput: AdapterOutput['PRERENDER'] = { id: route, type: AdapterOutputType.PRERENDER, @@ -1264,7 +1342,7 @@ export async function handleBuildComplete({ groupId: prerenderGroupId, pprChain: - isAppPage && config.experimental.ppr + isAppPage && renderingMode === RenderingMode.PARTIALLY_STATIC ? { headers: { [NEXT_RESUME_HEADER]: '1', @@ -1278,8 +1356,11 @@ export async function handleBuildComplete({ !isNotFoundTrue || (isNotFoundTrue && hasStatic404) ? { filePath, + postponedState: undefined, initialStatus: - (initialStatus ?? isNotFoundTrue) ? 404 : undefined, + initialStatus ?? + meta.status ?? + (isNotFoundTrue ? 404 : undefined), initialHeaders: { ...initialHeaders, vary: varyHeader, @@ -1297,7 +1378,10 @@ export async function handleBuildComplete({ allowQuery, allowHeader, renderingMode, - bypassFor: experimentalBypassFor, + bypassFor: + isAppPage && srcRoute !== '/_not-found' + ? experimentalBypassFor + : undefined, bypassToken: prerenderManifest.preview.previewModeId, }, } @@ -1333,25 +1417,23 @@ export async function handleBuildComplete({ renderingMode === RenderingMode.PARTIALLY_STATIC && !(await cachedFilePathCheck(dataFilePath)) ) { - // TODO: allowQuery should diverge based on app client param - // parsing flag outputs.prerenders.push({ ...initialOutput, id: dataRoute, pathname: dataRoute, - fallback: !postponed - ? undefined - : { - ...initialOutput.fallback, - postponedState: postponed, - initialHeaders: { - ...initialOutput.fallback?.initialHeaders, - 'content-type': isAppPage - ? rscContentTypeHeader - : JSON_CONTENT_TYPE_HEADER, - }, - filePath: undefined, - }, + fallback: { + ...initialOutput.fallback, + postponedState: postponed, + initialStatus: undefined, + initialHeaders: { + ...initialOutput.fallback?.initialHeaders, + ...dataInitialHeaders, + 'content-type': isAppPage + ? rscContentTypeHeader + : JSON_CONTENT_TYPE_HEADER, + }, + filePath: undefined, + }, }) } else { outputs.prerenders.push({ @@ -1362,12 +1444,15 @@ export async function handleBuildComplete({ ? undefined : { ...initialOutput.fallback, + initialStatus: undefined, initialHeaders: { ...initialOutput.fallback?.initialHeaders, + ...dataInitialHeaders, 'content-type': isAppPage ? rscContentTypeHeader : JSON_CONTENT_TYPE_HEADER, }, + postponedState: undefined, filePath: dataFilePath, }, }) @@ -1375,7 +1460,10 @@ export async function handleBuildComplete({ } if (isAppPage) { - await handleAppMeta(route, initialOutput, meta) + await handleAppMeta(route, initialOutput, meta, { + htmlAllowQuery, + dataAllowQuery, + }) } prerenderGroupId += 1 } @@ -1388,6 +1476,7 @@ export async function handleBuildComplete({ fallbackHeaders, fallbackStatus, fallbackSourceRoute, + fallbackRootParams, allowHeader, dataRoute, renderingMode, @@ -1398,12 +1487,29 @@ export async function handleBuildComplete({ const parentOutput = getParentOutput(srcRoute, dynamicRoute) const isAppPage = Boolean(appOutputMap[srcRoute]) + const meta = await getAppRouteMeta(dynamicRoute, isAppPage) const allowQuery = Object.values( routesManifest.dynamicRoutes.find( (item) => item.page === dynamicRoute )?.routeKeys || {} ) - const meta = await getAppRouteMeta(dynamicRoute, isAppPage) + let htmlAllowQuery = allowQuery + + // We only want to vary on the shell contents if there is a fallback + // present and able to be served. + if (typeof fallback === 'string') { + if (fallbackRootParams && fallbackRootParams.length > 0) { + htmlAllowQuery = fallbackRootParams as string[] + } // We additionally vary based on if there's a postponed prerender + // because if there isn't, then that means that we generated an + // empty shell, and producing an empty RSC shell would be a waste. + // If there is a postponed prerender, then the RSC shell would be + // non-empty, and it would be valuable to also generate an empty + // RSC shell. + else if (meta.postponed) { + htmlAllowQuery = [] + } + } const initialOutput: AdapterOutput['PRERENDER'] = { id: dynamicRoute, @@ -1411,13 +1517,16 @@ export async function handleBuildComplete({ pathname: dynamicRoute, parentOutputId: parentOutput.id, groupId: prerenderGroupId, - config: { - allowQuery, - allowHeader, - renderingMode, - bypassFor: experimentalBypassFor, - bypassToken: prerenderManifest.preview.previewModeId, - }, + + pprChain: + isAppPage && renderingMode === RenderingMode.PARTIALLY_STATIC + ? { + headers: { + [NEXT_RESUME_HEADER]: '1', + }, + } + : undefined, + fallback: typeof fallback === 'string' ? { @@ -1427,15 +1536,25 @@ export async function handleBuildComplete({ // extension so ensure it's added here fallback.endsWith('.html') ? fallback : `${fallback}.html` ), - initialStatus: fallbackStatus, + postponedState: undefined, + initialStatus: fallbackStatus ?? meta.status, initialHeaders: { ...fallbackHeaders, + ...(appPageKeys?.length ? { vary: varyHeader } : {}), 'content-type': HTML_CONTENT_TYPE_HEADER, + ...meta.headers, }, initialExpiration: fallbackExpire, - initialRevalidate: fallbackRevalidate || 1, + initialRevalidate: fallbackRevalidate ?? 1, } : undefined, + config: { + allowQuery: htmlAllowQuery, + allowHeader, + renderingMode, + bypassFor: isAppPage ? experimentalBypassFor : undefined, + bypassToken: prerenderManifest.preview.previewModeId, + }, } if (!config.i18n || isAppPage) { @@ -1456,8 +1575,36 @@ export async function handleBuildComplete({ }) } + let dataAllowQuery = allowQuery + const dataInitialHeaders: Record = {} + + if (meta.postponed && routesManifest.rsc.dynamicRSCPrerender) { + // If client param parsing is enabled, we follow the same logic as the + // HTML allowQuery as it's already going to vary based on if there's a + // static shell generated or if there's fallback root params. If there + // are fallback root params, and we can serve a fallback, then we + // should follow the same logic for the dynamic RSC routes. + // + // If client param parsing is not enabled, we have to use the + // allowQuery because the RSC payloads will contain dynamic segment + // values. + if (routesManifest.rsc.clientParamParsing) { + dataAllowQuery = htmlAllowQuery + } + } + + if (renderingMode === RenderingMode.PARTIALLY_STATIC) { + // Dynamic RSC requests cannot be cached, so we explicity set it + // here to ensure that the response is not cached by the browser. + dataInitialHeaders['cache-control'] = + 'private, no-store, no-cache, max-age=0, must-revalidate' + } + if (isAppPage) { - await handleAppMeta(dynamicRoute, initialOutput, meta) + await handleAppMeta(dynamicRoute, initialOutput, meta, { + htmlAllowQuery, + dataAllowQuery, + }) } if (renderingMode === RenderingMode.PARTIALLY_STATIC) { @@ -1465,18 +1612,24 @@ export async function handleBuildComplete({ ...initialOutput, id: `${dynamicRoute}.rsc`, pathname: `${dynamicRoute}.rsc`, - fallback: meta.postponed - ? { - ...initialOutput.fallback, - postponedState: meta.postponed, - initialHeaders: { - ...initialOutput.fallback?.initialHeaders, - 'content-type': isAppPage - ? rscContentTypeHeader - : JSON_CONTENT_TYPE_HEADER, - }, - } - : undefined, + fallback: { + ...initialOutput.fallback, + filePath: undefined, + postponedState: meta.postponed, + initialStatus: undefined, + initialHeaders: { + ...initialOutput.fallback?.initialHeaders, + ...dataInitialHeaders, + 'content-type': isAppPage + ? rscContentTypeHeader + : JSON_CONTENT_TYPE_HEADER, + }, + }, + + config: { + ...initialOutput.config, + allowQuery: dataAllowQuery, + }, }) } else if (dataRoute) { outputs.prerenders.push({ @@ -1489,7 +1642,7 @@ export async function handleBuildComplete({ prerenderGroupId += 1 } else { for (const locale of config.i18n.locales) { - const currentOutput = { + const currentOutput: AdapterOutput['PRERENDER'] = { ...initialOutput, pathname: path.posix.join(`/${locale}`, initialOutput.pathname), id: path.posix.join(`/${locale}`, initialOutput.id), @@ -1497,6 +1650,8 @@ export async function handleBuildComplete({ typeof fallback === 'string' ? { ...initialOutput.fallback, + initialStatus: undefined, + postponedState: undefined, filePath: path.join( pagesDistDir, locale, @@ -1624,7 +1779,7 @@ export async function handleBuildComplete({ const sourceRegex = routeRegex.namedRegex.replace( '^', - `^${config.basePath && config.basePath !== '/' ? path.posix.join('/', config.basePath || '') : ''}[/]?${shouldLocalize ? '(?[^/]{1,})?' : ''}` + `^${config.basePath && config.basePath !== '/' ? path.posix.join('/', config.basePath || '') : ''}[/]?${shouldLocalize ? '(?[^/]{1,})' : ''}` ) const destination = path.posix.join( @@ -1751,7 +1906,7 @@ export async function handleBuildComplete({ config.basePath, `_next/data`, escapeStringRegexp(buildId) - )}[/]?${shouldLocalize ? '(?[^/]{1,})?' : ''}` + )}[/]?${shouldLocalize ? '(?[^/]{1,})' : ''}` ), destination, has: isFallbackFalse ? fallbackFalseHasCondition : undefined, diff --git a/packages/next/src/build/templates/app-page.ts b/packages/next/src/build/templates/app-page.ts index 289962e1d5a0b..f03844d47ff3d 100644 --- a/packages/next/src/build/templates/app-page.ts +++ b/packages/next/src/build/templates/app-page.ts @@ -407,7 +407,7 @@ export async function handler( // when fixing this to correct logic it causes hydration issue since we set // serveStreamingMetadata to true during export const serveStreamingMetadata = - isHtmlBot && isRoutePPREnabled + botType && isRoutePPREnabled ? false : !userAgent ? true @@ -417,9 +417,10 @@ export async function handler( (prerenderInfo || isPrerendered || prerenderManifest.routes[normalizedSrcPage]) && - // If this is a html bot request and PPR is enabled, then we don't want - // to serve a static response. - !(isHtmlBot && isRoutePPREnabled) + // If this is a bot request and PPR is enabled, then we don't want + // to serve a static response. This applies to both DOM bots (like Googlebot) + // and HTML-limited bots. + !(botType && isRoutePPREnabled) ) // When a page supports cacheComponents, we can support RDC for Navigations @@ -449,8 +450,9 @@ export async function handler( : // Otherwise, we can support dynamic responses if it's a dynamic RSC request. isDynamicRSCRequest) - // When html bots request PPR page, perform the full dynamic rendering. - const shouldWaitOnAllReady = isHtmlBot && isRoutePPREnabled + // When bots request PPR page, perform the full dynamic rendering. + // This applies to both DOM bots (like Googlebot) and HTML-limited bots. + const shouldWaitOnAllReady = Boolean(botType) && isRoutePPREnabled let ssgCacheKey: string | null = null if ( @@ -575,7 +577,17 @@ export async function handler( }) } - const incrementalCache = getRequestMeta(req, 'incrementalCache') + const incrementalCache = + getRequestMeta(req, 'incrementalCache') || + (await routeModule.getIncrementalCache( + req, + nextConfig, + prerenderManifest, + isMinimalMode + )) + + incrementalCache?.resetRequestCache() + ;(globalThis as any).__incrementalCache = incrementalCache const doRender = async ({ span, diff --git a/packages/next/src/build/templates/app-route.ts b/packages/next/src/build/templates/app-route.ts index c07c51affff96..8ccf9665c1cc1 100644 --- a/packages/next/src/build/templates/app-route.ts +++ b/packages/next/src/build/templates/app-route.ts @@ -203,6 +203,19 @@ export async function handler( const method = req.method || 'GET' const tracer = getTracer() const activeSpan = tracer.getActiveScopeSpan() + const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode')) + + const incrementalCache = + getRequestMeta(req, 'incrementalCache') || + (await routeModule.getIncrementalCache( + req, + nextConfig, + prerenderManifest, + isMinimalMode + )) + + incrementalCache?.resetRequestCache() + ;(globalThis as any).__incrementalCache = incrementalCache const context: AppRouteRouteHandlerContext = { params, @@ -213,7 +226,7 @@ export async function handler( }, cacheComponents: Boolean(nextConfig.cacheComponents), supportsDynamicResponse, - incrementalCache: getRequestMeta(req, 'incrementalCache'), + incrementalCache, cacheLifeProfiles: nextConfig.cacheLife, waitUntil: ctx.waitUntil, onClose: (cb) => { @@ -289,7 +302,6 @@ export async function handler( } }) } - const isMinimalMode = Boolean(getRequestMeta(req, 'minimalMode')) const handleResponse = async (currentSpan?: Span) => { const responseGenerator: ResponseGenerator = async ({ diff --git a/packages/next/src/server/next-server.ts b/packages/next/src/server/next-server.ts index 9a1f46db58bf6..aacdf272f2a0a 100644 --- a/packages/next/src/server/next-server.ts +++ b/packages/next/src/server/next-server.ts @@ -118,7 +118,6 @@ import { AsyncCallbackSet } from './lib/async-callback-set' import { initializeCacheHandlers, setCacheHandler } from './use-cache/handlers' import type { UnwrapPromise } from '../lib/coalesced-function' import { populateStaticEnv } from '../lib/static-env' -import { isPostpone } from './lib/router-utils/is-postpone' import { NodeModuleLoader } from './lib/module-loader/node-module-loader' import { NoFallbackError } from '../shared/lib/no-fallback-error.external' import { @@ -130,6 +129,7 @@ import { routerServerGlobal, } from './lib/router-utils/router-server-context' import { installGlobalBehaviors } from './node-environment-extensions/global-behaviors' +import { installProcessErrorHandlers } from './node-environment-extensions/process-error-handlers' export * from './base-server' @@ -170,88 +170,6 @@ function getMiddlewareMatcher( return matcher } -function installProcessErrorHandlers( - shouldRemoveUncaughtErrorAndRejectionListeners: boolean -) { - // The conventional wisdom of Node.js and other runtimes is to treat - // unhandled errors as fatal and exit the process. - // - // But Next.js is not a generic JS runtime — it's a specialized runtime for - // React Server Components. - // - // Many unhandled rejections are due to the late-awaiting pattern for - // prefetching data. In Next.js it's OK to call an async function without - // immediately awaiting it, to start the request as soon as possible - // without blocking unncessarily on the result. These can end up - // triggering an "unhandledRejection" if it later turns out that the - // data is not needed to render the page. Example: - // - // const promise = fetchData() - // const shouldShow = await checkCondition() - // if (shouldShow) { - // return - // } - // - // In this example, `fetchData` is called immediately to start the request - // as soon as possible, but if `shouldShow` is false, then it will be - // discarded without unwrapping its result. If it errors, it will trigger - // an "unhandledRejection" event. - // - // Ideally, we would suppress these rejections completely without warning, - // because we don't consider them real errors. (TODO: Currently we do warn.) - // - // But regardless of whether we do or don't warn, we definitely shouldn't - // crash the entire process. - // - // Even a "legit" unhandled error unrelated to prefetching shouldn't - // prevent the rest of the page from rendering. - // - // So, we're going to intentionally override the default error handling - // behavior of the outer JS runtime to be more forgiving - - // Remove any existing "unhandledRejection" and "uncaughtException" handlers. - // This is gated behind an experimental flag until we've considered the impact - // in various deployment environments. It's possible this may always need to - // be configurable. - if (shouldRemoveUncaughtErrorAndRejectionListeners) { - process.removeAllListeners('uncaughtException') - process.removeAllListeners('unhandledRejection') - } - - // Install a new handler to prevent the process from crashing. - process.on('unhandledRejection', (reason: unknown) => { - if (isPostpone(reason)) { - // React postpones that are unhandled might end up logged here but they're - // not really errors. They're just part of rendering. - return - } - // Immediately log the error. - // TODO: Ideally, if we knew that this error was triggered by application - // code, we would suppress it entirely without logging. We can't reliably - // detect all of these, but when cacheComponents is enabled, we could suppress - // at least some of them by waiting to log the error until after all in- - // progress renders have completed. Then, only log errors for which there - // was not a corresponding "rejectionHandled" event. - console.error(reason) - }) - - process.on('rejectionHandled', () => { - // TODO: See note in the unhandledRejection handler above. In the future, - // we may use the "rejectionHandled" event to de-queue an error from - // being logged. - }) - - // Unhandled exceptions are errors triggered by non-async functions, so this - // is unrelated to the late-awaiting pattern. However, for similar reasons, - // we still shouldn't crash the process. Just log it. - process.on('uncaughtException', (reason: unknown) => { - if (isPostpone(reason)) { - return - } - console.error(reason) - }) -} - export default class NextNodeServer extends BaseServer< Options, NodeNextRequest, diff --git a/packages/next/src/server/node-environment-extensions/process-error-handlers.ts b/packages/next/src/server/node-environment-extensions/process-error-handlers.ts new file mode 100644 index 0000000000000..6905e0c2897e2 --- /dev/null +++ b/packages/next/src/server/node-environment-extensions/process-error-handlers.ts @@ -0,0 +1,89 @@ +import { isPostpone } from '../lib/router-utils/is-postpone' + +let _global = globalThis as typeof globalThis & { + nextInitializedProcessErrorHandlers?: boolean +} + +export function installProcessErrorHandlers( + shouldRemoveUncaughtErrorAndRejectionListeners: boolean +) { + if (_global.nextInitializedProcessErrorHandlers) return + _global.nextInitializedProcessErrorHandlers = true + // The conventional wisdom of Node.js and other runtimes is to treat + // unhandled errors as fatal and exit the process. + // + // But Next.js is not a generic JS runtime — it's a specialized runtime for + // React Server Components. + // + // Many unhandled rejections are due to the late-awaiting pattern for + // prefetching data. In Next.js it's OK to call an async function without + // immediately awaiting it, to start the request as soon as possible + // without blocking unncessarily on the result. These can end up + // triggering an "unhandledRejection" if it later turns out that the + // data is not needed to render the page. Example: + // + // const promise = fetchData() + // const shouldShow = await checkCondition() + // if (shouldShow) { + // return + // } + // + // In this example, `fetchData` is called immediately to start the request + // as soon as possible, but if `shouldShow` is false, then it will be + // discarded without unwrapping its result. If it errors, it will trigger + // an "unhandledRejection" event. + // + // Ideally, we would suppress these rejections completely without warning, + // because we don't consider them real errors. (TODO: Currently we do warn.) + // + // But regardless of whether we do or don't warn, we definitely shouldn't + // crash the entire process. + // + // Even a "legit" unhandled error unrelated to prefetching shouldn't + // prevent the rest of the page from rendering. + // + // So, we're going to intentionally override the default error handling + // behavior of the outer JS runtime to be more forgiving + + // Remove any existing "unhandledRejection" and "uncaughtException" handlers. + // This is gated behind an experimental flag until we've considered the impact + // in various deployment environments. It's possible this may always need to + // be configurable. + if (shouldRemoveUncaughtErrorAndRejectionListeners) { + process.removeAllListeners('uncaughtException') + process.removeAllListeners('unhandledRejection') + } + + // Install a new handler to prevent the process from crashing. + process.on('unhandledRejection', (reason: unknown) => { + if (isPostpone(reason)) { + // React postpones that are unhandled might end up logged here but they're + // not really errors. They're just part of rendering. + return + } + // Immediately log the error. + // TODO: Ideally, if we knew that this error was triggered by application + // code, we would suppress it entirely without logging. We can't reliably + // detect all of these, but when cacheComponents is enabled, we could suppress + // at least some of them by waiting to log the error until after all in- + // progress renders have completed. Then, only log errors for which there + // was not a corresponding "rejectionHandled" event. + console.error(reason) + }) + + process.on('rejectionHandled', () => { + // TODO: See note in the unhandledRejection handler above. In the future, + // we may use the "rejectionHandled" event to de-queue an error from + // being logged. + }) + + // Unhandled exceptions are errors triggered by non-async functions, so this + // is unrelated to the late-awaiting pattern. However, for similar reasons, + // we still shouldn't crash the process. Just log it. + process.on('uncaughtException', (reason: unknown) => { + if (isPostpone(reason)) { + return + } + console.error(reason) + }) +} diff --git a/packages/next/src/server/route-modules/route-module.ts b/packages/next/src/server/route-modules/route-module.ts index 308f3c3118329..a0c34c5f99deb 100644 --- a/packages/next/src/server/route-modules/route-module.ts +++ b/packages/next/src/server/route-modules/route-module.ts @@ -630,12 +630,35 @@ export abstract class RouteModule< const { routesManifest, prerenderManifest, serverFilesManifest } = manifests const { basePath, i18n, rewrites } = routesManifest + const relativeProjectDir = + getRequestMeta(req, 'relativeProjectDir') || this.relativeProjectDir + + const routerServerContext = + routerServerGlobal[RouterServerContextSymbol]?.[relativeProjectDir] + const nextConfig = + routerServerContext?.nextConfig || serverFilesManifest?.config + + // Injected in base-server.ts + const protocol = req.headers['x-forwarded-proto']?.includes('https') + ? 'https' + : 'http' + + // When there are hostname and port we build an absolute URL + if (!getRequestMeta(req, 'initURL')) { + const initUrl = serverFilesManifest?.config.experimental.trustHostHeader + ? `${protocol}://${req.headers.host || 'localhost'}${req.url}` + : `${protocol}://${routerServerContext?.hostname || 'localhost'}${req.url}` + + addRequestMeta(req, 'initURL', initUrl) + addRequestMeta(req, 'initProtocol', protocol) + } if (basePath) { req.url = removePathPrefix(req.url || '/', basePath) } const parsedUrl = parseReqUrl(req.url || '/') + addRequestMeta(req, 'initQuery', { ...parsedUrl?.query }) // if we couldn't parse the URL we can't continue if (!parsedUrl) { return @@ -815,12 +838,14 @@ export abstract class RouteModule< if ( // if both query and params are valid but one - // provided more information rely on that one + // provided more information and the query params + // were nxtP prefixed rely on that one query && params && paramsResult.hasValidParams && queryResult.hasValidParams && - Object.keys(paramsResult.params).length < + routeParamKeys.size > 0 && + Object.keys(paramsResult.params).length <= Object.keys(queryResult.params).length ) { paramsToInterpolate = queryResult.params @@ -880,6 +905,15 @@ export abstract class RouteModule< for (const key of routeParamKeys) { if (!(key in originalQuery)) { delete query[key] + // handle the case where there's collision and we + // normalized nxtPid=123 -> id=123 but user also + // sends id=456 as separate key + } else if ( + originalQuery[key] && + query[key] && + originalQuery[key] !== query[key] + ) { + query[key] = originalQuery[key] } } @@ -903,18 +937,21 @@ export abstract class RouteModule< isDraftMode = previewData !== false } - const relativeProjectDir = - getRequestMeta(req, 'relativeProjectDir') || this.relativeProjectDir - - const routerServerContext = - routerServerGlobal[RouterServerContextSymbol]?.[relativeProjectDir] - const nextConfig = - routerServerContext?.nextConfig || serverFilesManifest?.config - if (!nextConfig) { throw new Error("Invariant: nextConfig couldn't be loaded") } + if (process.env.NEXT_RUNTIME !== 'edge') { + const { installProcessErrorHandlers } = + require('../node-environment-extensions/process-error-handlers') as typeof import('../node-environment-extensions/process-error-handlers') + + installProcessErrorHandlers( + Boolean( + nextConfig.experimental.removeUncaughtErrorAndRejectionListeners + ) + ) + } + let resolvedPathname = normalizedSrcPage if (isDynamicRoute(resolvedPathname) && params) { resolvedPathname = serverUtils.interpolateDynamicPath( @@ -926,6 +963,17 @@ export abstract class RouteModule< if (resolvedPathname === '/index') { resolvedPathname = '/' } + + if ( + res && + Boolean(req.headers['x-nextjs-data']) && + (!res.statusCode || res.statusCode === 200) + ) { + res.setHeader( + 'x-nextjs-matched-path', + removeTrailingSlash(`${locale ? `/${locale}` : ''}${normalizedSrcPage}`) + ) + } const encodedResolvedPathname = resolvedPathname // we decode for cache key/manifest usage encoded is diff --git a/test/e2e/app-dir/cache-components/my-adapter.mjs b/test/e2e/app-dir/cache-components/my-adapter.mjs index bdaae733f7ab9..5f6b2c234dc5b 100644 --- a/test/e2e/app-dir/cache-components/my-adapter.mjs +++ b/test/e2e/app-dir/cache-components/my-adapter.mjs @@ -61,10 +61,6 @@ const myAdapter = { `Missing fallback file for prerender ${output.id}: ${JSON.stringify(output, null, 2)}` ) } - } else if (!output.fallback.postponedState) { - throw new Error( - `Missing postponed state or filePath for prerender ${output.id} ${JSON.stringify(output, null, 2)}` - ) } } diff --git a/test/e2e/app-dir/cache-components/next.config.js b/test/e2e/app-dir/cache-components/next.config.js index d05012cdd262e..77f8a25e631ae 100644 --- a/test/e2e/app-dir/cache-components/next.config.js +++ b/test/e2e/app-dir/cache-components/next.config.js @@ -4,7 +4,8 @@ const nextConfig = { cacheComponents: true, experimental: { - adapterPath: require.resolve('./my-adapter.mjs'), + adapterPath: + process.env.NEXT_ADAPTER_PATH ?? require.resolve('./my-adapter.mjs'), }, } diff --git a/test/lib/next-modes/base.ts b/test/lib/next-modes/base.ts index 8903436bdab50..455d11ba5943f 100644 --- a/test/lib/next-modes/base.ts +++ b/test/lib/next-modes/base.ts @@ -275,9 +275,13 @@ export class NextInstance { }, ...(this.resolutions ? { resolutions: this.resolutions } : {}), scripts: { - // since we can't get the build id as a build artifact, make it - // available under the static files - 'post-build': `cp ${this.distDir}/BUILD_ID ${this.distDir}/static/__BUILD_ID`, + ...(isNextDeploy + ? // since we can't get the build id as a build artifact, + // add it in build logs + { + 'post-build': `node -e 'console.log("BUILD" + "_ID: " + require("fs").readFileSync("${this.distDir}/BUILD_ID"))'`, + } + : {}), ...pkgScripts, build: (pkgScripts['build'] || this.buildCommand || 'next build') + diff --git a/test/lib/next-modes/next-deploy.ts b/test/lib/next-modes/next-deploy.ts index 967376721092d..b26fe119ba6a5 100644 --- a/test/lib/next-modes/next-deploy.ts +++ b/test/lib/next-modes/next-deploy.ts @@ -8,7 +8,6 @@ import { TEST_TEAM_NAME, TEST_TOKEN, } from '../../../scripts/reset-project.mjs' -import fetch from 'node-fetch' import { Span } from 'next/dist/trace' export class NextDeployInstance extends NextInstance { @@ -141,6 +140,9 @@ export class NextDeployInstance extends NextInstance { if (process.env.IS_WEBPACK_TEST) { additionalEnv.push(`IS_WEBPACK_TEST=1`) } + if (process.env.NEXT_ENABLE_ADAPTER) { + additionalEnv.push(`NEXT_ENABLE_ADAPTER=1`) + } const deployRes = await execa( 'vercel', @@ -214,20 +216,6 @@ export class NextDeployInstance extends NextInstance { } require('console').log(`Deployment URL: ${this._url}`) - const buildIdUrl = `${this._url}${ - this.basePath || '' - }/_next/static/__BUILD_ID` - - const buildIdRes = await fetch(buildIdUrl) - - if (!buildIdRes.ok) { - require('console').error( - `Failed to load buildId ${buildIdUrl} (${buildIdRes.status})` - ) - } - this._buildId = (await buildIdRes.text()).trim() - - require('console').log(`Got buildId: ${this._buildId}`) // Use the vercel inspect command to get the CLI output from the build. const buildLogs = await execa( @@ -241,13 +229,20 @@ export class NextDeployInstance extends NextInstance { if (buildLogs.exitCode !== 0) { throw new Error(`Failed to get build output logs: ${buildLogs.stderr}`) } - - // Use the stdout from the logs command as the CLI output. The CLI will - // output other unrelated logs to stderr. - // TODO: Combine with runtime logs (via `vercel logs`) // Build logs seem to be piped to stderr, so we'll combine them to make sure we get all the logs. this._cliOutput = buildLogs.stdout + buildLogs.stderr + + const buildId = this._cliOutput.match(/BUILD_ID: (.+)/)?.[1]?.trim() + + if (!buildId) { + throw new Error(`Failed to get buildId from logs ${this._cliOutput}`) + } + this._buildId = buildId + + require('console').log(`Got buildId: ${this._buildId}`) + // Use the stdout from the logs command as the CLI output. The CLI will + // output other unrelated logs to stderr. } public async destroy() { diff --git a/test/production/adapter-config/my-adapter.mjs b/test/production/adapter-config/my-adapter.mjs index 988e762ebdccb..f196783f2e889 100644 --- a/test/production/adapter-config/my-adapter.mjs +++ b/test/production/adapter-config/my-adapter.mjs @@ -63,7 +63,7 @@ const myAdapter = { ) } } else if (!output.fallback.postponedState) { - throw new Error( + console.error( `Missing postponed state or filePath for prerender ${output.id} ${JSON.stringify(output, null, 2)}` ) } diff --git a/test/rspack-build-tests-manifest.json b/test/rspack-build-tests-manifest.json index 4a75d19d3663d..1ebb6faf4b0d4 100644 --- a/test/rspack-build-tests-manifest.json +++ b/test/rspack-build-tests-manifest.json @@ -7113,7 +7113,6 @@ "runtime prefetching in a page includes headers, but not dynamic content", "runtime prefetching in a page includes root params, but not dynamic content", "runtime prefetching in a page includes search params, but not dynamic content", - "runtime prefetching in a private cache can completely prefetch a page that uses cookies and no uncached IO", "runtime prefetching in a private cache includes cookies, but not dynamic content", "runtime prefetching in a private cache includes dynamic params, but not dynamic content", "runtime prefetching in a private cache includes headers, but not dynamic content", @@ -7129,7 +7128,9 @@ "runtime prefetching should not cache runtime prefetch responses in the browser cache or server-side different cookies should return different prefetch results - in a private cache", "runtime prefetching should not cache runtime prefetch responses in the browser cache or server-side private caches should return new results on each request" ], - "failed": [], + "failed": [ + "runtime prefetching in a private cache can completely prefetch a page that uses cookies and no uncached IO" + ], "pending": [], "flakey": [], "runtimeError": false @@ -8384,21 +8385,6 @@ "flakey": [], "runtimeError": false }, - "test/e2e/deployment-id-function/deployment-id-function.test.ts": { - "passed": [ - "deploymentId function support should throw error when deploymentId exceeds 32 characters", - "deploymentId function support should throw error when deploymentId function returns non-string", - "deploymentId function support should throw error when deploymentId function returns string exceeding 32 characters", - "deploymentId function support should work with deploymentId as a function returning string", - "deploymentId function support should work with deploymentId as a string", - "deploymentId function support should work with deploymentId function using environment variable", - "deploymentId function support should work with useSkewCookie and deploymentId function" - ], - "failed": [], - "pending": [], - "flakey": [], - "runtimeError": false - }, "test/e2e/deprecation-warnings/deprecation-warnings.test.ts": { "passed": [ "deprecation-warnings with deprecated config options should emit deprecation warnings for explicitly configured deprecated options", @@ -11052,6 +11038,27 @@ "flakey": [], "runtimeError": false }, + "test/e2e/url-deployment-id/url-deployment-id.test.ts": { + "passed": [], + "failed": [], + "pending": [ + "URL asset references with deploymentId API route should return import src with dpl query", + "URL asset references with deploymentId API route should return new URL with dpl query", + "URL asset references with deploymentId dynamic RSC page (headers) should include dpl query in dynamic RSC page", + "URL asset references with deploymentId dynamic RSC page (headers) should include dpl query in new URL pattern", + "URL asset references with deploymentId dynamic client page (headers in layout) should include dpl query after hydration", + "URL asset references with deploymentId dynamic client page (headers in layout) should include dpl query in dynamic client page", + "URL asset references with deploymentId dynamic client page (headers in layout) should include dpl query in new URL pattern", + "URL asset references with deploymentId import src attribute should include dpl query in RSC page", + "URL asset references with deploymentId import src attribute should include dpl query in client page", + "URL asset references with deploymentId import src attribute should include dpl query in client page (after hydration)", + "URL asset references with deploymentId new URL() pattern should include dpl query in RSC page", + "URL asset references with deploymentId new URL() pattern should include dpl query in client page", + "URL asset references with deploymentId new URL() pattern should include dpl query in client page (after hydration)" + ], + "flakey": [], + "runtimeError": false + }, "test/e2e/url-imports/url-imports.test.ts": { "passed": [ "Handle url imports should allow url import in css", @@ -20115,7 +20122,6 @@ "config telemetry production mode emits telemetry for default React Compiler options", "config telemetry production mode emits telemetry for enabled React Compiler", "config telemetry production mode emits telemetry for filesystem cache in build mode", - "config telemetry production mode emits telemetry for filesystem cache in dev mode", "config telemetry production mode emits telemetry for isolatedDevBuild disabled", "config telemetry production mode emits telemetry for isolatedDevBuild enabled by default", "config telemetry production mode emits telemetry for middleware related options", @@ -20130,7 +20136,9 @@ "config telemetry production mode emits telemetry for usage of swc plugins", "config telemetry production mode emits telemetry for useCache directive" ], - "failed": [], + "failed": [ + "config telemetry production mode emits telemetry for filesystem cache in dev mode" + ], "pending": [], "flakey": [], "runtimeError": false diff --git a/test/rspack-dev-tests-manifest.json b/test/rspack-dev-tests-manifest.json index 6a724455f305b..4b02cdae6179c 100644 --- a/test/rspack-dev-tests-manifest.json +++ b/test/rspack-dev-tests-manifest.json @@ -1251,14 +1251,13 @@ }, "test/development/app-hmr/hmr.test.ts": { "passed": [ + "app-dir-hmr filesystem changes can navigate cleanly to a page that requires a change in the Webpack runtime", "app-dir-hmr filesystem changes should have no unexpected action error for hmr", "app-dir-hmr filesystem changes should not break when renaming a folder", "app-dir-hmr filesystem changes should not continously poll when hitting a not found page", "app-dir-hmr filesystem changes should update server components after navigating to a page with a different runtime" ], - "failed": [ - "app-dir-hmr filesystem changes can navigate cleanly to a page that requires a change in the Webpack runtime" - ], + "failed": [], "pending": [], "flakey": [], "runtimeError": false @@ -5765,10 +5764,10 @@ "runtimeError": false }, "test/e2e/app-dir/interception-routes-output-export/interception-routes-output-export.test.ts": { - "passed": [], - "failed": [ + "passed": [ "interception-routes-output-export should error when using interception routes with static export" ], + "failed": [], "pending": [], "flakey": [], "runtimeError": false @@ -10471,21 +10470,6 @@ "flakey": [], "runtimeError": false }, - "test/e2e/deployment-id-function/deployment-id-function.test.ts": { - "passed": [ - "deploymentId function support should throw error when deploymentId exceeds 32 characters", - "deploymentId function support should throw error when deploymentId function returns non-string", - "deploymentId function support should throw error when deploymentId function returns string exceeding 32 characters", - "deploymentId function support should work with deploymentId as a function returning string", - "deploymentId function support should work with deploymentId as a string", - "deploymentId function support should work with deploymentId function using environment variable", - "deploymentId function support should work with useSkewCookie and deploymentId function" - ], - "failed": [], - "pending": [], - "flakey": [], - "runtimeError": false - }, "test/e2e/deprecation-warnings/deprecation-warnings.test.ts": { "passed": [ "deprecation-warnings with deprecated config options should emit deprecation warnings for explicitly configured deprecated options", @@ -13100,6 +13084,27 @@ "flakey": [], "runtimeError": false }, + "test/e2e/url-deployment-id/url-deployment-id.test.ts": { + "passed": [], + "failed": [], + "pending": [ + "URL asset references with deploymentId API route should return import src with dpl query", + "URL asset references with deploymentId API route should return new URL with dpl query", + "URL asset references with deploymentId dynamic RSC page (headers) should include dpl query in dynamic RSC page", + "URL asset references with deploymentId dynamic RSC page (headers) should include dpl query in new URL pattern", + "URL asset references with deploymentId dynamic client page (headers in layout) should include dpl query after hydration", + "URL asset references with deploymentId dynamic client page (headers in layout) should include dpl query in dynamic client page", + "URL asset references with deploymentId dynamic client page (headers in layout) should include dpl query in new URL pattern", + "URL asset references with deploymentId import src attribute should include dpl query in RSC page", + "URL asset references with deploymentId import src attribute should include dpl query in client page", + "URL asset references with deploymentId import src attribute should include dpl query in client page (after hydration)", + "URL asset references with deploymentId new URL() pattern should include dpl query in RSC page", + "URL asset references with deploymentId new URL() pattern should include dpl query in client page", + "URL asset references with deploymentId new URL() pattern should include dpl query in client page (after hydration)" + ], + "flakey": [], + "runtimeError": false + }, "test/e2e/url-imports/url-imports.test.ts": { "passed": [ "Handle url imports should allow url import in css", @@ -13533,6 +13538,15 @@ "flakey": [], "runtimeError": false }, + "test/integration/app-config-asset-prefix/test/index.test.ts": { + "passed": [ + "App assetPrefix config should render correctly with assetPrefix: \"/\"" + ], + "failed": [], + "pending": [], + "flakey": [], + "runtimeError": false + }, "test/integration/app-document-add-hmr/test/index.test.ts": { "passed": [], "failed": [], @@ -13699,6 +13713,15 @@ "flakey": [], "runtimeError": false }, + "test/integration/broken-webpack-plugin/test/index.test.ts": { + "passed": [ + "Handles a broken webpack plugin (precompile) should render error correctly" + ], + "failed": [], + "pending": [], + "flakey": [], + "runtimeError": false + }, "test/integration/build-output/test/index.test.ts": { "passed": [], "failed": [], @@ -13952,6 +13975,31 @@ "flakey": [], "runtimeError": false }, + "test/integration/config-output-export/test/index.test.ts": { + "passed": [ + "config-output-export should error with \"i18n\" config", + "config-output-export should error with api routes function", + "config-output-export should error with getServerSideProps without fallback", + "config-output-export should error with getStaticPaths and fallback blocking", + "config-output-export should error with getStaticPaths and fallback true", + "config-output-export should error with getStaticProps and revalidate 10 seconds (ISR)", + "config-output-export should error with middleware function", + "config-output-export should work with getStaticPaths and fallback false", + "config-output-export should work with getStaticProps and revalidate false", + "config-output-export should work with getStaticProps and without revalidate", + "config-output-export should work with static homepage", + "config-output-export when hasNextSupport = false should error with \"headers\" config", + "config-output-export when hasNextSupport = false should error with \"redirects\" config", + "config-output-export when hasNextSupport = false should error with \"rewrites\" config", + "config-output-export when hasNextSupport = true should error with \"headers\" config", + "config-output-export when hasNextSupport = true should error with \"redirects\" config", + "config-output-export when hasNextSupport = true should error with \"rewrites\" config" + ], + "failed": [], + "pending": [], + "flakey": [], + "runtimeError": false + }, "test/integration/config-promise-error/test/index.test.ts": { "passed": [], "failed": [], @@ -14124,6 +14172,18 @@ "flakey": [], "runtimeError": false }, + "test/integration/create-next-app/package-manager/yarn.test.ts": { + "passed": [ + "create-next-app with package manager yarn should use yarn for --use-yarn flag", + "create-next-app with package manager yarn should use yarn for --use-yarn flag with example", + "create-next-app with package manager yarn should use yarn when user-agent is yarn", + "create-next-app with package manager yarn should use yarn when user-agent is yarn with example" + ], + "failed": [], + "pending": [], + "flakey": [], + "runtimeError": false + }, "test/integration/create-next-app/prompts.test.ts": { "passed": [ "create-next-app prompts should not prompt user for choice and use defaults if --yes is defined", @@ -14416,6 +14476,28 @@ "flakey": [], "runtimeError": false }, + "test/integration/css/test/css-compilation.test.ts": { + "passed": [], + "failed": [], + "pending": [ + "CSS Property Ordering production mode useLightnincsss(false) should have the border width (property ordering)", + "CSS Property Ordering production mode useLightnincsss(true) should have the border width (property ordering)", + "CSS Support production mode CSS Compilation and Prefixing useLightnincsss(false) should've compiled and prefixed", + "CSS Support production mode CSS Compilation and Prefixing useLightnincsss(true) should've compiled and prefixed", + "CSS Support production mode Good CSS Import from node_modules useLightnincsss(false) should've emitted a single CSS file", + "CSS Support production mode Good CSS Import from node_modules useLightnincsss(true) should've emitted a single CSS file", + "CSS Support production mode Good Nested CSS Import from node_modules useLightnincsss(false) should've emitted a single CSS file", + "CSS Support production mode Good Nested CSS Import from node_modules useLightnincsss(true) should've emitted a single CSS file", + "CSS Support production mode Has CSS in computed styles in Production useLightnincsss(false) should have CSS for page", + "CSS Support production mode Has CSS in computed styles in Production useLightnincsss(false) should've preloaded the CSS file and injected it in ", + "CSS Support production mode Has CSS in computed styles in Production useLightnincsss(true) should have CSS for page", + "CSS Support production mode Has CSS in computed styles in Production useLightnincsss(true) should've preloaded the CSS file and injected it in ", + "CSS Support production mode React Lifecyce Order (production) useLightnincsss(false) should have the correct color on mount after navigation", + "CSS Support production mode React Lifecyce Order (production) useLightnincsss(true) should have the correct color on mount after navigation" + ], + "flakey": [], + "runtimeError": false + }, "test/integration/css/test/css-modules.test.ts": { "passed": [ "Basic CSS Modules Ordering useLightnincsss(false) Development Mode should have correct color on index page (on hover)", @@ -14910,6 +14992,13 @@ "flakey": [], "runtimeError": false }, + "test/integration/development-hmr-refresh/test/index.test.ts": { + "passed": ["page should not reload when the file is not changed"], + "failed": [], + "pending": [], + "flakey": [], + "runtimeError": false + }, "test/integration/disable-js/test/index.test.ts": { "passed": [ "disabled runtime JS development mode should have a script for each preload link", @@ -15502,6 +15591,31 @@ "flakey": [], "runtimeError": false }, + "test/integration/edge-runtime-module-errors/test/module-imports.test.ts": { + "passed": [ + "Edge runtime code with imports Edge API dynamically importing 3rd party module throws not-found module error in dev at runtime and highlights the faulty line", + "Edge runtime code with imports Edge API importing unused 3rd party module throws not-found module error in dev at runtime and highlights the faulty line", + "Edge runtime code with imports Edge API importing unused node.js module does not throw in dev at runtime", + "Edge runtime code with imports Edge API statically importing node.js module throws unsupported module error in dev at runtime and highlights the faulty line", + "Edge runtime code with imports Middleware dynamically importing 3rd party module throws not-found module error in dev at runtime and highlights the faulty line", + "Edge runtime code with imports Middleware importing unused 3rd party module throws not-found module error in dev at runtime and highlights the faulty line", + "Edge runtime code with imports Middleware importing unused node.js module does not throw in dev at runtime", + "Edge runtime code with imports Middleware statically importing node.js module throws unsupported module error in dev at runtime and highlights the faulty line" + ], + "failed": [], + "pending": [ + "Edge runtime code with imports Edge API dynamically importing 3rd party module production mode does not build and reports module not found error", + "Edge runtime code with imports Edge API importing unused 3rd party module production mode does not build and reports module not found error", + "Edge runtime code with imports Edge API importing unused node.js module production mode does not throw in production at runtime", + "Edge runtime code with imports Edge API statically importing node.js module production mode throws unsupported module error in production at runtime and prints error on logs", + "Edge runtime code with imports Middleware dynamically importing 3rd party module production mode does not build and reports module not found error", + "Edge runtime code with imports Middleware importing unused 3rd party module production mode does not build and reports module not found error", + "Edge runtime code with imports Middleware importing unused node.js module production mode does not throw in production at runtime", + "Edge runtime code with imports Middleware statically importing node.js module production mode throws unsupported module error in production at runtime and prints error on logs" + ], + "flakey": [], + "runtimeError": false + }, "test/integration/edge-runtime-response-error/test/index.test.ts": { "passed": [ "Edge runtime code with imports test error if response is not Response type Edge API dev test Response", @@ -15759,6 +15873,15 @@ "flakey": [], "runtimeError": false }, + "test/integration/export-image-default/test/index.test.ts": { + "passed": [], + "failed": [], + "pending": [ + "Export with default loader next/image component production mode should error during next build" + ], + "flakey": [], + "runtimeError": false + }, "test/integration/export-image-loader-legacy/test/index.test.ts": { "passed": [], "failed": [], @@ -17270,6 +17393,16 @@ "flakey": [], "runtimeError": false }, + "test/integration/firebase-grpc/test/index.test.ts": { + "passed": [], + "failed": [], + "pending": [ + "Building Firebase production mode Throws an error when building with firebase dependency with worker_threads", + "Building Firebase production mode Throws no error when building with firebase dependency without worker_threads" + ], + "flakey": [], + "runtimeError": false + }, "test/integration/future/test/index.test.ts": { "passed": [], "failed": [], @@ -17551,6 +17684,191 @@ "flakey": [], "runtimeError": false }, + "test/integration/i18n-support-base-path/test/index.test.ts": { + "passed": [ + "i18n Support basePath development mode should 404 for GSP pages that returned notFound", + "i18n Support basePath development mode should 404 for GSP that returned notFound on client-transition", + "i18n Support basePath development mode should 404 for locale prefixed public folder files", + "i18n Support basePath development mode should 404 for locale prefixed static assets correctly", + "i18n Support basePath development mode should apply headers correctly", + "i18n Support basePath development mode should apply redirects correctly", + "i18n Support basePath development mode should apply rewrites correctly", + "i18n Support basePath development mode should apply trailingSlash redirect correctly", + "i18n Support basePath development mode should generate auto-export page with all locales", + "i18n Support basePath development mode should generate fallbacks with all locales", + "i18n Support basePath development mode should generate non-dynamic GSP page with all locales", + "i18n Support basePath development mode should handle basePath like pathname", + "i18n Support basePath development mode should handle locales with domain for domain example.com should handle locale do-BE", + "i18n Support basePath development mode should handle locales with domain for domain example.com should handle locale go-BE", + "i18n Support basePath development mode should handle locales with domain for domain example.do should handle locale do-BE", + "i18n Support basePath development mode should handle locales with domain for domain example.do should handle locale go-BE", + "i18n Support basePath development mode should handle navigating back to different casing of locale", + "i18n Support basePath development mode should have correct initial query values for fallback", + "i18n Support basePath development mode should have correct values for non-prefixed path", + "i18n Support basePath development mode should have domainLocales available on useRouter", + "i18n Support basePath development mode should load dynamic getServerSideProps page correctly SSR", + "i18n Support basePath development mode should load getServerSideProps page correctly SSR", + "i18n Support basePath development mode should load getServerSideProps page correctly SSR (default locale no prefix)", + "i18n Support basePath development mode should load getStaticProps fallback non-prerender page another locale correctly", + "i18n Support basePath development mode should load getStaticProps fallback non-prerender page correctly", + "i18n Support basePath development mode should load getStaticProps fallback non-prerender page correctly (default locale no prefix", + "i18n Support basePath development mode should load getStaticProps fallback prerender page correctly SSR", + "i18n Support basePath development mode should load getStaticProps fallback prerender page correctly SSR (default locale no prefix)", + "i18n Support basePath development mode should load getStaticProps non-fallback correctly", + "i18n Support basePath development mode should load getStaticProps non-fallback correctly another locale", + "i18n Support basePath development mode should load getStaticProps non-fallback correctly another locale via cookie", + "i18n Support basePath development mode should load getStaticProps page correctly SSR", + "i18n Support basePath development mode should load getStaticProps page correctly SSR (default locale no prefix)", + "i18n Support basePath development mode should navigate client side for default locale with no prefix", + "i18n Support basePath development mode should navigate through history with query correctly", + "i18n Support basePath development mode should navigate to another page and back correctly with locale", + "i18n Support basePath development mode should navigate to auto-export dynamic page", + "i18n Support basePath development mode should navigate to getStaticProps page and back correctly with locale", + "i18n Support basePath development mode should navigate to page with same name as development buildId", + "i18n Support basePath development mode should navigate with locale false correctly", + "i18n Support basePath development mode should navigate with locale false correctly GSP", + "i18n Support basePath development mode should navigate with locale prop correctly", + "i18n Support basePath development mode should navigate with locale prop correctly GSP", + "i18n Support basePath development mode should not add duplicate locale key when navigating back to root path with hash", + "i18n Support basePath development mode should not add duplicate locale key when navigating back to root path with query params", + "i18n Support basePath development mode should not error with similar named cookie to locale cookie", + "i18n Support basePath development mode should not have hydration mis-match from hash", + "i18n Support basePath development mode should not redirect to accept-lang preferred locale with locale cookie", + "i18n Support basePath development mode should not remove locale prefix for default locale", + "i18n Support basePath development mode should not strip locale prefix for default locale with locale domains", + "i18n Support basePath development mode should prerender with the correct href for locale domain", + "i18n Support basePath development mode should provide defaultLocale correctly for locale domain", + "i18n Support basePath development mode should redirect external domain correctly", + "i18n Support basePath development mode should redirect to correct locale domain", + "i18n Support basePath development mode should redirect to locale prefixed route for /", + "i18n Support basePath development mode should render 404 for blocking fallback page that returned 404", + "i18n Support basePath development mode should render 404 for blocking fallback page that returned 404 on client transition", + "i18n Support basePath development mode should render 404 for fallback page that returned 404", + "i18n Support basePath development mode should render 404 for fallback page that returned 404 on client transition", + "i18n Support basePath development mode should render the correct href with locale domains but not on a locale domain", + "i18n Support basePath development mode should resolve auto-export dynamic route correctly", + "i18n Support basePath development mode should resolve href correctly when dynamic route matches locale prefixed", + "i18n Support basePath development mode should rewrite to API route correctly for do locale", + "i18n Support basePath development mode should rewrite to API route correctly for do-BE locale", + "i18n Support basePath development mode should rewrite to API route correctly for en locale", + "i18n Support basePath development mode should rewrite to API route correctly for en-US locale", + "i18n Support basePath development mode should rewrite to API route correctly for fr locale", + "i18n Support basePath development mode should rewrite to API route correctly for fr-BE locale", + "i18n Support basePath development mode should rewrite to API route correctly for go locale", + "i18n Support basePath development mode should rewrite to API route correctly for go-BE locale", + "i18n Support basePath development mode should rewrite to API route correctly for nl locale", + "i18n Support basePath development mode should rewrite to API route correctly for nl-BE locale", + "i18n Support basePath development mode should rewrite to API route correctly for nl-NL locale", + "i18n Support basePath development mode should serve public file on locale domain", + "i18n Support basePath development mode should show error for redirect and notFound returned at same time", + "i18n Support basePath development mode should transition on client properly for page that starts with locale", + "i18n Support basePath development mode should update asPath on the client correctly", + "i18n Support basePath development mode should use correct default locale for locale domains", + "i18n Support basePath development mode should use default locale for / without accept-language", + "i18n Support basePath development mode should use default locale when no locale is in href with locale false", + "i18n Support basePath development mode should visit API route directly correctly", + "i18n Support basePath development mode should visit dynamic API route directly correctly" + ], + "failed": [], + "pending": [ + "i18n Support basePath development mode should redirect to locale domain correctly client-side", + "i18n Support basePath development mode should render the correct href for locale domain", + "i18n Support basePath production mode should 404 for GSP pages that returned notFound", + "i18n Support basePath production mode should 404 for GSP that returned notFound on client-transition", + "i18n Support basePath production mode should 404 for locale prefixed public folder files", + "i18n Support basePath production mode should 404 for locale prefixed static assets correctly", + "i18n Support basePath production mode should add i18n config to routes-manifest", + "i18n Support basePath production mode should apply headers correctly", + "i18n Support basePath production mode should apply redirects correctly", + "i18n Support basePath production mode should apply rewrites correctly", + "i18n Support basePath production mode should apply trailingSlash redirect correctly", + "i18n Support basePath production mode should generate auto-export page with all locales", + "i18n Support basePath production mode should generate fallbacks with all locales", + "i18n Support basePath production mode should generate non-dynamic GSP page with all locales", + "i18n Support basePath production mode should handle basePath like pathname", + "i18n Support basePath production mode should handle fallback correctly after generating", + "i18n Support basePath production mode should handle locales with domain for domain example.com should handle locale do-BE", + "i18n Support basePath production mode should handle locales with domain for domain example.com should handle locale go-BE", + "i18n Support basePath production mode should handle locales with domain for domain example.do should handle locale do-BE", + "i18n Support basePath production mode should handle locales with domain for domain example.do should handle locale go-BE", + "i18n Support basePath production mode should handle navigating back to different casing of locale", + "i18n Support basePath production mode should have correct initial query values for fallback", + "i18n Support basePath production mode should have correct values for non-prefixed path", + "i18n Support basePath production mode should have domainLocales available on useRouter", + "i18n Support basePath production mode should load dynamic getServerSideProps page correctly SSR", + "i18n Support basePath production mode should load getServerSideProps page correctly SSR", + "i18n Support basePath production mode should load getServerSideProps page correctly SSR (default locale no prefix)", + "i18n Support basePath production mode should load getStaticProps fallback non-prerender page another locale correctly", + "i18n Support basePath production mode should load getStaticProps fallback non-prerender page correctly", + "i18n Support basePath production mode should load getStaticProps fallback non-prerender page correctly (default locale no prefix", + "i18n Support basePath production mode should load getStaticProps fallback prerender page correctly SSR", + "i18n Support basePath production mode should load getStaticProps fallback prerender page correctly SSR (default locale no prefix)", + "i18n Support basePath production mode should load getStaticProps non-fallback correctly", + "i18n Support basePath production mode should load getStaticProps non-fallback correctly another locale", + "i18n Support basePath production mode should load getStaticProps non-fallback correctly another locale via cookie", + "i18n Support basePath production mode should load getStaticProps page correctly SSR", + "i18n Support basePath production mode should load getStaticProps page correctly SSR (default locale no prefix)", + "i18n Support basePath production mode should navigate client side for default locale with no prefix", + "i18n Support basePath production mode should navigate through history with query correctly", + "i18n Support basePath production mode should navigate to another page and back correctly with locale", + "i18n Support basePath production mode should navigate to auto-export dynamic page", + "i18n Support basePath production mode should navigate to getStaticProps page and back correctly with locale", + "i18n Support basePath production mode should navigate to page with same name as development buildId", + "i18n Support basePath production mode should navigate with locale false correctly", + "i18n Support basePath production mode should navigate with locale false correctly GSP", + "i18n Support basePath production mode should navigate with locale prop correctly", + "i18n Support basePath production mode should navigate with locale prop correctly GSP", + "i18n Support basePath production mode should not add duplicate locale key when navigating back to root path with hash", + "i18n Support basePath production mode should not add duplicate locale key when navigating back to root path with query params", + "i18n Support basePath production mode should not contain backslashes in pages-manifest", + "i18n Support basePath production mode should not error with similar named cookie to locale cookie", + "i18n Support basePath production mode should not have hydration mis-match from hash", + "i18n Support basePath production mode should not output GSP pages that returned notFound", + "i18n Support basePath production mode should not redirect to accept-lang preferred locale with locale cookie", + "i18n Support basePath production mode should not remove locale prefix for default locale", + "i18n Support basePath production mode should not strip locale prefix for default locale with locale domains", + "i18n Support basePath production mode should output correct prerender-manifest", + "i18n Support basePath production mode should preload all locales data correctly", + "i18n Support basePath production mode should prerender with the correct href for locale domain", + "i18n Support basePath production mode should provide defaultLocale correctly for locale domain", + "i18n Support basePath production mode should redirect external domain correctly", + "i18n Support basePath production mode should redirect to correct locale domain", + "i18n Support basePath production mode should redirect to locale domain correctly client-side", + "i18n Support basePath production mode should redirect to locale prefixed route for /", + "i18n Support basePath production mode should render 404 for blocking fallback page that returned 404", + "i18n Support basePath production mode should render 404 for blocking fallback page that returned 404 on client transition", + "i18n Support basePath production mode should render 404 for fallback page that returned 404", + "i18n Support basePath production mode should render 404 for fallback page that returned 404 on client transition", + "i18n Support basePath production mode should render the correct href for locale domain", + "i18n Support basePath production mode should render the correct href with locale domains but not on a locale domain", + "i18n Support basePath production mode should resolve auto-export dynamic route correctly", + "i18n Support basePath production mode should resolve href correctly when dynamic route matches locale prefixed", + "i18n Support basePath production mode should rewrite to API route correctly for do locale", + "i18n Support basePath production mode should rewrite to API route correctly for do-BE locale", + "i18n Support basePath production mode should rewrite to API route correctly for en locale", + "i18n Support basePath production mode should rewrite to API route correctly for en-US locale", + "i18n Support basePath production mode should rewrite to API route correctly for fr locale", + "i18n Support basePath production mode should rewrite to API route correctly for fr-BE locale", + "i18n Support basePath production mode should rewrite to API route correctly for go locale", + "i18n Support basePath production mode should rewrite to API route correctly for go-BE locale", + "i18n Support basePath production mode should rewrite to API route correctly for nl locale", + "i18n Support basePath production mode should rewrite to API route correctly for nl-BE locale", + "i18n Support basePath production mode should rewrite to API route correctly for nl-NL locale", + "i18n Support basePath production mode should serve public file on locale domain", + "i18n Support basePath production mode should transition on client properly for page that starts with locale", + "i18n Support basePath production mode should update asPath on the client correctly", + "i18n Support basePath production mode should use correct default locale for locale domains", + "i18n Support basePath production mode should use default locale for / without accept-language", + "i18n Support basePath production mode should use default locale when no locale is in href with locale false", + "i18n Support basePath production mode should visit API route directly correctly", + "i18n Support basePath production mode should visit dynamic API route directly correctly", + "i18n Support basePath with localeDetection disabled production mode should have localeDetection in routes-manifest", + "i18n Support basePath with localeDetection disabled production mode should not detect locale from accept-language", + "i18n Support basePath with localeDetection disabled production mode should set locale from detected path" + ], + "flakey": [], + "runtimeError": false + }, "test/integration/i18n-support-catchall/test/index.test.ts": { "passed": [ "i18n Support Root Catch-all development mode should load the index route correctly CSR", @@ -19014,6 +19332,299 @@ "flakey": [], "runtimeError": false }, + "test/integration/image-optimizer/test/sharp.test.ts": { + "passed": [ + "with latest sharp dev support w/o next.config.js recursive url is not allowed should fail with absolute next image url", + "with latest sharp dev support w/o next.config.js recursive url is not allowed should fail with encoded relative image url", + "with latest sharp dev support w/o next.config.js recursive url is not allowed should fail with relative image url with assetPrefix", + "with latest sharp dev support w/o next.config.js recursive url is not allowed should fail with relative next image url", + "with latest sharp dev support w/o next.config.js should downlevel avif format to jpeg for old Safari", + "with latest sharp dev support w/o next.config.js should downlevel webp format to jpeg for old Safari", + "with latest sharp dev support w/o next.config.js should emit blur svg when width is 8 in dev but not prod", + "with latest sharp dev support w/o next.config.js should emit blur svg when width is less than 8 in dev but not prod", + "with latest sharp dev support w/o next.config.js should error if the image file does not exist", + "with latest sharp dev support w/o next.config.js should error if the resource isn't a valid image", + "with latest sharp dev support w/o next.config.js should fail when domain is not defined in next.config.js", + "with latest sharp dev support w/o next.config.js should fail when internal url is not an image", + "with latest sharp dev support w/o next.config.js should fail when q is greater than 100", + "with latest sharp dev support w/o next.config.js should fail when q is less than 1", + "with latest sharp dev support w/o next.config.js should fail when q is missing", + "with latest sharp dev support w/o next.config.js should fail when q is not a number", + "with latest sharp dev support w/o next.config.js should fail when q is not an integer", + "with latest sharp dev support w/o next.config.js should fail when url has file protocol", + "with latest sharp dev support w/o next.config.js should fail when url has ftp protocol", + "with latest sharp dev support w/o next.config.js should fail when url is missing", + "with latest sharp dev support w/o next.config.js should fail when url is protocol relative", + "with latest sharp dev support w/o next.config.js should fail when url is too long", + "with latest sharp dev support w/o next.config.js should fail when w is 0", + "with latest sharp dev support w/o next.config.js should fail when w is less than 0", + "with latest sharp dev support w/o next.config.js should fail when w is missing", + "with latest sharp dev support w/o next.config.js should fail when w is not a number", + "with latest sharp dev support w/o next.config.js should fail when w is not an integer", + "with latest sharp dev support w/o next.config.js should fail when width is not in next.config.js", + "with latest sharp dev support w/o next.config.js should handle non-ascii characters in image url", + "with latest sharp dev support w/o next.config.js should maintain animated gif", + "with latest sharp dev support w/o next.config.js should maintain animated png", + "with latest sharp dev support w/o next.config.js should maintain animated png 2", + "with latest sharp dev support w/o next.config.js should maintain animated webp", + "with latest sharp dev support w/o next.config.js should maintain bmp", + "with latest sharp dev support w/o next.config.js should maintain heic", + "with latest sharp dev support w/o next.config.js should maintain icns", + "with latest sharp dev support w/o next.config.js should maintain ico format", + "with latest sharp dev support w/o next.config.js should maintain jp2", + "with latest sharp dev support w/o next.config.js should maintain jpg format for old Safari", + "with latest sharp dev support w/o next.config.js should maintain jxl", + "with latest sharp dev support w/o next.config.js should maintain png format for old Safari", + "with latest sharp dev support w/o next.config.js should not allow pdf format", + "with latest sharp dev support w/o next.config.js should not allow svg with application header", + "with latest sharp dev support w/o next.config.js should not allow svg with comma header", + "with latest sharp dev support w/o next.config.js should not allow svg with uppercase header", + "with latest sharp dev support w/o next.config.js should not allow svg with wrong header", + "with latest sharp dev support w/o next.config.js should not allow vector svg", + "with latest sharp dev support w/o next.config.js should not forward cookie header", + "with latest sharp dev support w/o next.config.js should not resize if requested width is larger than original source image", + "with latest sharp dev support w/o next.config.js should resize avif", + "with latest sharp dev support w/o next.config.js should resize gif (not animated)", + "with latest sharp dev support w/o next.config.js should resize relative url and old Chrome accept header as webp", + "with latest sharp dev support w/o next.config.js should resize relative url and png accept header", + "with latest sharp dev support w/o next.config.js should resize relative url and webp Firefox accept header", + "with latest sharp dev support w/o next.config.js should resize relative url with invalid accept header as gif", + "with latest sharp dev support w/o next.config.js should resize relative url with invalid accept header as png", + "with latest sharp dev support w/o next.config.js should resize relative url with invalid accept header as tiff", + "with latest sharp dev support w/o next.config.js should resize tiff", + "with latest sharp dev support w/o next.config.js should return home page", + "with latest sharp dev support w/o next.config.js should set 304 status without body when etag matches if-none-match", + "with latest sharp dev support w/o next.config.js should set cache-control to immutable for static images", + "with latest sharp dev support w/o next.config.js should use cache and stale-while-revalidate when query is the same for internal image", + "with latest sharp dev support w/o next.config.js should use cached image file when parameters are the same for animated gif", + "with latest sharp dev support with next.config.js recursive url is not allowed should fail with encoded relative image url", + "with latest sharp dev support with next.config.js recursive url is not allowed should fail with relative image url with assetPrefix", + "with latest sharp dev support with next.config.js recursive url is not allowed should fail with relative next image url", + "with latest sharp dev support with next.config.js recursive url is not allowed should pass with absolute next image url", + "with latest sharp dev support with next.config.js should automatically detect image type when content-type is octet-stream", + "with latest sharp dev support with next.config.js should compress avif smaller than webp at q=100", + "with latest sharp dev support with next.config.js should compress avif smaller than webp at q=50", + "with latest sharp dev support with next.config.js should compress avif smaller than webp at q=75", + "with latest sharp dev support with next.config.js should downlevel avif format to jpeg for old Safari", + "with latest sharp dev support with next.config.js should downlevel webp format to jpeg for old Safari", + "with latest sharp dev support with next.config.js should emit blur svg when width is 8 in dev but not prod", + "with latest sharp dev support with next.config.js should emit blur svg when width is less than 8 in dev but not prod", + "with latest sharp dev support with next.config.js should error if the image file does not exist", + "with latest sharp dev support with next.config.js should error if the resource isn't a valid image", + "with latest sharp dev support with next.config.js should fail when domain is not defined in next.config.js", + "with latest sharp dev support with next.config.js should fail when internal url is not an image", + "with latest sharp dev support with next.config.js should fail when q is greater than 100", + "with latest sharp dev support with next.config.js should fail when q is less than 1", + "with latest sharp dev support with next.config.js should fail when q is missing", + "with latest sharp dev support with next.config.js should fail when q is not a number", + "with latest sharp dev support with next.config.js should fail when q is not an integer", + "with latest sharp dev support with next.config.js should fail when q is not in config", + "with latest sharp dev support with next.config.js should fail when url fails to load an image", + "with latest sharp dev support with next.config.js should fail when url has file protocol", + "with latest sharp dev support with next.config.js should fail when url has ftp protocol", + "with latest sharp dev support with next.config.js should fail when url is missing", + "with latest sharp dev support with next.config.js should fail when url is protocol relative", + "with latest sharp dev support with next.config.js should fail when url is too long", + "with latest sharp dev support with next.config.js should fail when w is 0", + "with latest sharp dev support with next.config.js should fail when w is less than 0", + "with latest sharp dev support with next.config.js should fail when w is missing", + "with latest sharp dev support with next.config.js should fail when w is not a number", + "with latest sharp dev support with next.config.js should fail when w is not an integer", + "with latest sharp dev support with next.config.js should fail when width is not in next.config.js", + "with latest sharp dev support with next.config.js should follow redirect from http to https when maximumRedirects > 0", + "with latest sharp dev support with next.config.js should follow redirect when dangerouslyAllowLocalIP enabled", + "with latest sharp dev support with next.config.js should handle concurrent requests", + "with latest sharp dev support with next.config.js should handle non-ascii characters in image url", + "with latest sharp dev support with next.config.js should maintain animated gif", + "with latest sharp dev support with next.config.js should maintain animated png", + "with latest sharp dev support with next.config.js should maintain animated png 2", + "with latest sharp dev support with next.config.js should maintain animated webp", + "with latest sharp dev support with next.config.js should maintain bmp", + "with latest sharp dev support with next.config.js should maintain heic", + "with latest sharp dev support with next.config.js should maintain icns", + "with latest sharp dev support with next.config.js should maintain ico format", + "with latest sharp dev support with next.config.js should maintain jp2", + "with latest sharp dev support with next.config.js should maintain jpg format for old Safari", + "with latest sharp dev support with next.config.js should maintain jxl", + "with latest sharp dev support with next.config.js should maintain png format for old Safari", + "with latest sharp dev support with next.config.js should normalize invalid status codes", + "with latest sharp dev support with next.config.js should not allow pdf format", + "with latest sharp dev support with next.config.js should not allow svg with application header", + "with latest sharp dev support with next.config.js should not allow svg with comma header", + "with latest sharp dev support with next.config.js should not allow svg with uppercase header", + "with latest sharp dev support with next.config.js should not allow svg with wrong header", + "with latest sharp dev support with next.config.js should not allow vector svg", + "with latest sharp dev support with next.config.js should not forward cookie header", + "with latest sharp dev support with next.config.js should not resize if requested width is larger than original source image", + "with latest sharp dev support with next.config.js should resize absolute url from localhost", + "with latest sharp dev support with next.config.js should resize avif", + "with latest sharp dev support with next.config.js should resize avif and maintain format", + "with latest sharp dev support with next.config.js should resize gif (not animated)", + "with latest sharp dev support with next.config.js should resize relative url and new Chrome accept header as avif", + "with latest sharp dev support with next.config.js should resize relative url and old Chrome accept header as webp", + "with latest sharp dev support with next.config.js should resize relative url and png accept header", + "with latest sharp dev support with next.config.js should resize relative url and webp Firefox accept header", + "with latest sharp dev support with next.config.js should resize relative url with invalid accept header as gif", + "with latest sharp dev support with next.config.js should resize relative url with invalid accept header as png", + "with latest sharp dev support with next.config.js should resize relative url with invalid accept header as tiff", + "with latest sharp dev support with next.config.js should resize tiff", + "with latest sharp dev support with next.config.js should return 508 after redirecting too many times", + "with latest sharp dev support with next.config.js should return home page", + "with latest sharp dev support with next.config.js should set 304 status without body when etag matches if-none-match", + "with latest sharp dev support with next.config.js should set cache-control to immutable for static images", + "with latest sharp dev support with next.config.js should timeout for upstream image exceeding 7 seconds", + "with latest sharp dev support with next.config.js should use cache and stale-while-revalidate when query is the same for external image", + "with latest sharp dev support with next.config.js should use cache and stale-while-revalidate when query is the same for internal image", + "with latest sharp dev support with next.config.js should use cached image file when parameters are the same for animated gif" + ], + "failed": [], + "pending": [ + "with latest sharp Production Mode Server support w/o next.config.js recursive url is not allowed should fail with absolute next image url", + "with latest sharp Production Mode Server support w/o next.config.js recursive url is not allowed should fail with encoded relative image url", + "with latest sharp Production Mode Server support w/o next.config.js recursive url is not allowed should fail with relative image url with assetPrefix", + "with latest sharp Production Mode Server support w/o next.config.js recursive url is not allowed should fail with relative next image url", + "with latest sharp Production Mode Server support w/o next.config.js should downlevel avif format to jpeg for old Safari", + "with latest sharp Production Mode Server support w/o next.config.js should downlevel webp format to jpeg for old Safari", + "with latest sharp Production Mode Server support w/o next.config.js should emit blur svg when width is 8 in dev but not prod", + "with latest sharp Production Mode Server support w/o next.config.js should emit blur svg when width is less than 8 in dev but not prod", + "with latest sharp Production Mode Server support w/o next.config.js should error if the image file does not exist", + "with latest sharp Production Mode Server support w/o next.config.js should error if the resource isn't a valid image", + "with latest sharp Production Mode Server support w/o next.config.js should fail when domain is not defined in next.config.js", + "with latest sharp Production Mode Server support w/o next.config.js should fail when internal url is not an image", + "with latest sharp Production Mode Server support w/o next.config.js should fail when q is greater than 100", + "with latest sharp Production Mode Server support w/o next.config.js should fail when q is less than 1", + "with latest sharp Production Mode Server support w/o next.config.js should fail when q is missing", + "with latest sharp Production Mode Server support w/o next.config.js should fail when q is not a number", + "with latest sharp Production Mode Server support w/o next.config.js should fail when q is not an integer", + "with latest sharp Production Mode Server support w/o next.config.js should fail when url has file protocol", + "with latest sharp Production Mode Server support w/o next.config.js should fail when url has ftp protocol", + "with latest sharp Production Mode Server support w/o next.config.js should fail when url is missing", + "with latest sharp Production Mode Server support w/o next.config.js should fail when url is protocol relative", + "with latest sharp Production Mode Server support w/o next.config.js should fail when url is too long", + "with latest sharp Production Mode Server support w/o next.config.js should fail when w is 0", + "with latest sharp Production Mode Server support w/o next.config.js should fail when w is less than 0", + "with latest sharp Production Mode Server support w/o next.config.js should fail when w is missing", + "with latest sharp Production Mode Server support w/o next.config.js should fail when w is not a number", + "with latest sharp Production Mode Server support w/o next.config.js should fail when w is not an integer", + "with latest sharp Production Mode Server support w/o next.config.js should fail when width is not in next.config.js", + "with latest sharp Production Mode Server support w/o next.config.js should handle non-ascii characters in image url", + "with latest sharp Production Mode Server support w/o next.config.js should maintain animated gif", + "with latest sharp Production Mode Server support w/o next.config.js should maintain animated png", + "with latest sharp Production Mode Server support w/o next.config.js should maintain animated png 2", + "with latest sharp Production Mode Server support w/o next.config.js should maintain animated webp", + "with latest sharp Production Mode Server support w/o next.config.js should maintain bmp", + "with latest sharp Production Mode Server support w/o next.config.js should maintain heic", + "with latest sharp Production Mode Server support w/o next.config.js should maintain icns", + "with latest sharp Production Mode Server support w/o next.config.js should maintain ico format", + "with latest sharp Production Mode Server support w/o next.config.js should maintain jp2", + "with latest sharp Production Mode Server support w/o next.config.js should maintain jpg format for old Safari", + "with latest sharp Production Mode Server support w/o next.config.js should maintain jxl", + "with latest sharp Production Mode Server support w/o next.config.js should maintain png format for old Safari", + "with latest sharp Production Mode Server support w/o next.config.js should not allow pdf format", + "with latest sharp Production Mode Server support w/o next.config.js should not allow svg with application header", + "with latest sharp Production Mode Server support w/o next.config.js should not allow svg with comma header", + "with latest sharp Production Mode Server support w/o next.config.js should not allow svg with uppercase header", + "with latest sharp Production Mode Server support w/o next.config.js should not allow svg with wrong header", + "with latest sharp Production Mode Server support w/o next.config.js should not allow vector svg", + "with latest sharp Production Mode Server support w/o next.config.js should not forward cookie header", + "with latest sharp Production Mode Server support w/o next.config.js should not resize if requested width is larger than original source image", + "with latest sharp Production Mode Server support w/o next.config.js should resize avif", + "with latest sharp Production Mode Server support w/o next.config.js should resize gif (not animated)", + "with latest sharp Production Mode Server support w/o next.config.js should resize relative url and old Chrome accept header as webp", + "with latest sharp Production Mode Server support w/o next.config.js should resize relative url and png accept header", + "with latest sharp Production Mode Server support w/o next.config.js should resize relative url and webp Firefox accept header", + "with latest sharp Production Mode Server support w/o next.config.js should resize relative url with invalid accept header as gif", + "with latest sharp Production Mode Server support w/o next.config.js should resize relative url with invalid accept header as png", + "with latest sharp Production Mode Server support w/o next.config.js should resize relative url with invalid accept header as tiff", + "with latest sharp Production Mode Server support w/o next.config.js should resize tiff", + "with latest sharp Production Mode Server support w/o next.config.js should return home page", + "with latest sharp Production Mode Server support w/o next.config.js should set 304 status without body when etag matches if-none-match", + "with latest sharp Production Mode Server support w/o next.config.js should set cache-control to immutable for static images", + "with latest sharp Production Mode Server support w/o next.config.js should use cache and stale-while-revalidate when query is the same for internal image", + "with latest sharp Production Mode Server support w/o next.config.js should use cached image file when parameters are the same for animated gif", + "with latest sharp Production Mode Server support with next.config.js recursive url is not allowed should fail with encoded relative image url", + "with latest sharp Production Mode Server support with next.config.js recursive url is not allowed should fail with relative image url with assetPrefix", + "with latest sharp Production Mode Server support with next.config.js recursive url is not allowed should fail with relative next image url", + "with latest sharp Production Mode Server support with next.config.js recursive url is not allowed should pass with absolute next image url", + "with latest sharp Production Mode Server support with next.config.js should automatically detect image type when content-type is octet-stream", + "with latest sharp Production Mode Server support with next.config.js should compress avif smaller than webp at q=100", + "with latest sharp Production Mode Server support with next.config.js should compress avif smaller than webp at q=50", + "with latest sharp Production Mode Server support with next.config.js should compress avif smaller than webp at q=75", + "with latest sharp Production Mode Server support with next.config.js should downlevel avif format to jpeg for old Safari", + "with latest sharp Production Mode Server support with next.config.js should downlevel webp format to jpeg for old Safari", + "with latest sharp Production Mode Server support with next.config.js should emit blur svg when width is 8 in dev but not prod", + "with latest sharp Production Mode Server support with next.config.js should emit blur svg when width is less than 8 in dev but not prod", + "with latest sharp Production Mode Server support with next.config.js should error if the image file does not exist", + "with latest sharp Production Mode Server support with next.config.js should error if the resource isn't a valid image", + "with latest sharp Production Mode Server support with next.config.js should fail when domain is not defined in next.config.js", + "with latest sharp Production Mode Server support with next.config.js should fail when internal url is not an image", + "with latest sharp Production Mode Server support with next.config.js should fail when q is greater than 100", + "with latest sharp Production Mode Server support with next.config.js should fail when q is less than 1", + "with latest sharp Production Mode Server support with next.config.js should fail when q is missing", + "with latest sharp Production Mode Server support with next.config.js should fail when q is not a number", + "with latest sharp Production Mode Server support with next.config.js should fail when q is not an integer", + "with latest sharp Production Mode Server support with next.config.js should fail when q is not in config", + "with latest sharp Production Mode Server support with next.config.js should fail when url fails to load an image", + "with latest sharp Production Mode Server support with next.config.js should fail when url has file protocol", + "with latest sharp Production Mode Server support with next.config.js should fail when url has ftp protocol", + "with latest sharp Production Mode Server support with next.config.js should fail when url is missing", + "with latest sharp Production Mode Server support with next.config.js should fail when url is protocol relative", + "with latest sharp Production Mode Server support with next.config.js should fail when url is too long", + "with latest sharp Production Mode Server support with next.config.js should fail when w is 0", + "with latest sharp Production Mode Server support with next.config.js should fail when w is less than 0", + "with latest sharp Production Mode Server support with next.config.js should fail when w is missing", + "with latest sharp Production Mode Server support with next.config.js should fail when w is not a number", + "with latest sharp Production Mode Server support with next.config.js should fail when w is not an integer", + "with latest sharp Production Mode Server support with next.config.js should fail when width is not in next.config.js", + "with latest sharp Production Mode Server support with next.config.js should follow redirect from http to https when maximumRedirects > 0", + "with latest sharp Production Mode Server support with next.config.js should follow redirect when dangerouslyAllowLocalIP enabled", + "with latest sharp Production Mode Server support with next.config.js should handle concurrent requests", + "with latest sharp Production Mode Server support with next.config.js should handle non-ascii characters in image url", + "with latest sharp Production Mode Server support with next.config.js should maintain animated gif", + "with latest sharp Production Mode Server support with next.config.js should maintain animated png", + "with latest sharp Production Mode Server support with next.config.js should maintain animated png 2", + "with latest sharp Production Mode Server support with next.config.js should maintain animated webp", + "with latest sharp Production Mode Server support with next.config.js should maintain bmp", + "with latest sharp Production Mode Server support with next.config.js should maintain heic", + "with latest sharp Production Mode Server support with next.config.js should maintain icns", + "with latest sharp Production Mode Server support with next.config.js should maintain ico format", + "with latest sharp Production Mode Server support with next.config.js should maintain jp2", + "with latest sharp Production Mode Server support with next.config.js should maintain jpg format for old Safari", + "with latest sharp Production Mode Server support with next.config.js should maintain jxl", + "with latest sharp Production Mode Server support with next.config.js should maintain png format for old Safari", + "with latest sharp Production Mode Server support with next.config.js should normalize invalid status codes", + "with latest sharp Production Mode Server support with next.config.js should not allow pdf format", + "with latest sharp Production Mode Server support with next.config.js should not allow svg with application header", + "with latest sharp Production Mode Server support with next.config.js should not allow svg with comma header", + "with latest sharp Production Mode Server support with next.config.js should not allow svg with uppercase header", + "with latest sharp Production Mode Server support with next.config.js should not allow svg with wrong header", + "with latest sharp Production Mode Server support with next.config.js should not allow vector svg", + "with latest sharp Production Mode Server support with next.config.js should not forward cookie header", + "with latest sharp Production Mode Server support with next.config.js should not resize if requested width is larger than original source image", + "with latest sharp Production Mode Server support with next.config.js should resize absolute url from localhost", + "with latest sharp Production Mode Server support with next.config.js should resize avif", + "with latest sharp Production Mode Server support with next.config.js should resize avif and maintain format", + "with latest sharp Production Mode Server support with next.config.js should resize gif (not animated)", + "with latest sharp Production Mode Server support with next.config.js should resize relative url and new Chrome accept header as avif", + "with latest sharp Production Mode Server support with next.config.js should resize relative url and old Chrome accept header as webp", + "with latest sharp Production Mode Server support with next.config.js should resize relative url and png accept header", + "with latest sharp Production Mode Server support with next.config.js should resize relative url and webp Firefox accept header", + "with latest sharp Production Mode Server support with next.config.js should resize relative url with invalid accept header as gif", + "with latest sharp Production Mode Server support with next.config.js should resize relative url with invalid accept header as png", + "with latest sharp Production Mode Server support with next.config.js should resize relative url with invalid accept header as tiff", + "with latest sharp Production Mode Server support with next.config.js should resize tiff", + "with latest sharp Production Mode Server support with next.config.js should return 508 after redirecting too many times", + "with latest sharp Production Mode Server support with next.config.js should return home page", + "with latest sharp Production Mode Server support with next.config.js should set 304 status without body when etag matches if-none-match", + "with latest sharp Production Mode Server support with next.config.js should set cache-control to immutable for static images", + "with latest sharp Production Mode Server support with next.config.js should timeout for upstream image exceeding 7 seconds", + "with latest sharp Production Mode Server support with next.config.js should use cache and stale-while-revalidate when query is the same for external image", + "with latest sharp Production Mode Server support with next.config.js should use cache and stale-while-revalidate when query is the same for internal image", + "with latest sharp Production Mode Server support with next.config.js should use cached image file when parameters are the same for animated gif" + ], + "flakey": [], + "runtimeError": false + }, "test/integration/import-assertion/test/index.test.ts": { "passed": ["import-assertion dev should handle json assertions"], "failed": [], @@ -19241,6 +19852,16 @@ "flakey": [], "runtimeError": false }, + "test/integration/jsconfig-paths-wildcard/test/index.test.ts": { + "passed": [ + "jsconfig paths wildcard default behavior should resolve a wildcard alias", + "jsconfig paths without baseurl wildcard default behavior should resolve a wildcard alias" + ], + "failed": [], + "pending": [], + "flakey": [], + "runtimeError": false + }, "test/integration/jsconfig-paths/test/index.test.ts": { "passed": [ "jsconfig paths default behavior should alias components", @@ -19449,6 +20070,18 @@ "flakey": [], "runtimeError": false }, + "test/integration/mixed-ssg-serverprops-error/test/index.test.ts": { + "passed": [], + "failed": [], + "pending": [ + "Mixed getStaticProps and getServerSideProps error production mode should error when exporting both getStaticPaths and getServerSideProps", + "Mixed getStaticProps and getServerSideProps error production mode should error when exporting both getStaticProps and getServerSideProps", + "Mixed getStaticProps and getServerSideProps error production mode should error when exporting getStaticPaths on a non-dynamic page", + "Mixed getStaticProps and getServerSideProps error production mode should error with getStaticProps but no default export" + ], + "flakey": [], + "runtimeError": false + }, "test/integration/module-ids/test/index.test.ts": { "passed": [], "failed": [], @@ -19788,6 +20421,15 @@ "flakey": [], "runtimeError": false }, + "test/integration/next-image-legacy/react-virtualized/test/index.test.ts": { + "passed": [], + "failed": [], + "pending": [ + "react-virtualized wrapping next/legacy/image production mode should not cancel requests for images" + ], + "flakey": [], + "runtimeError": false + }, "test/integration/next-image-legacy/trailing-slash/test/index.test.ts": { "passed": [ "Image Component Trailing Slash Tests development mode should include trailing slash when trailingSlash is set on config file during next dev" @@ -20271,6 +20913,15 @@ "flakey": [], "runtimeError": false }, + "test/integration/next-image-new/export-config/test/index.test.ts": { + "passed": [ + "next/image with output export config development mode should error" + ], + "failed": [], + "pending": [], + "flakey": [], + "runtimeError": false + }, "test/integration/next-image-new/image-from-node-modules/test/index.test.ts": { "passed": [ "Image Component from node_modules development mode should apply image config for node_modules", @@ -20468,6 +21119,23 @@ "flakey": [], "runtimeError": false }, + "test/integration/node-fetch-keep-alive/test/index.test.ts": { + "passed": [ + "node-fetch-keep-alive dev should send keep-alive for getServerSideProps", + "node-fetch-keep-alive dev should send keep-alive for getStaticPaths", + "node-fetch-keep-alive dev should send keep-alive for getStaticProps", + "node-fetch-keep-alive dev should send keep-alive for json API" + ], + "failed": [], + "pending": [ + "node-fetch-keep-alive production mode should send keep-alive for getServerSideProps", + "node-fetch-keep-alive production mode should send keep-alive for getStaticPaths", + "node-fetch-keep-alive production mode should send keep-alive for getStaticProps", + "node-fetch-keep-alive production mode should send keep-alive for json API" + ], + "flakey": [], + "runtimeError": false + }, "test/integration/non-next-dist-exclude/test/index.test.ts": { "passed": [], "failed": [], @@ -20661,6 +21329,27 @@ "flakey": [], "runtimeError": false }, + "test/integration/prerender-fallback-encoding/test/index.test.ts": { + "passed": [ + "Fallback path encoding development mode should navigate client-side correctly with interpolating", + "Fallback path encoding development mode should navigate client-side correctly with string href", + "Fallback path encoding development mode should render correctly in the browser for prerender paths", + "Fallback path encoding development mode should respond with the prerendered data correctly", + "Fallback path encoding development mode should respond with the prerendered pages correctly" + ], + "failed": [], + "pending": [ + "Fallback path encoding production mode should handle non-prerendered paths correctly", + "Fallback path encoding production mode should navigate client-side correctly with interpolating", + "Fallback path encoding production mode should navigate client-side correctly with string href", + "Fallback path encoding production mode should output paths correctly", + "Fallback path encoding production mode should render correctly in the browser for prerender paths", + "Fallback path encoding production mode should respond with the prerendered data correctly", + "Fallback path encoding production mode should respond with the prerendered pages correctly" + ], + "flakey": [], + "runtimeError": false + }, "test/integration/prerender-invalid-catchall-params/test/index.test.ts": { "passed": [], "failed": [], @@ -20899,6 +21588,17 @@ "flakey": [], "runtimeError": false }, + "test/integration/read-only-source-hmr/test/index.test.ts": { + "passed": [ + "Read-only source HMR should detect a new page", + "Read-only source HMR should detect changes to a page", + "Read-only source HMR should handle page deletion and subsequent recreation" + ], + "failed": [], + "pending": [], + "flakey": [], + "runtimeError": false + }, "test/integration/relay-graphql-swc-multi-project/test/index.test.ts": { "passed": [ "Relay Compiler Transform - Multi Project Config development mode project-a should resolve index page correctly", @@ -21143,6 +21843,47 @@ "flakey": [], "runtimeError": false }, + "test/integration/route-indexes/test/index.test.ts": { + "passed": [ + "Route indexes handling development mode should handle / correctly", + "Route indexes handling development mode should handle /api/sub correctly", + "Route indexes handling development mode should handle /api/sub/another correctly", + "Route indexes handling development mode should handle /api/sub/another/index correctly", + "Route indexes handling development mode should handle /api/sub/index correctly", + "Route indexes handling development mode should handle /api/sub/index/index correctly", + "Route indexes handling development mode should handle /index correctly", + "Route indexes handling development mode should handle /index/index correctly", + "Route indexes handling development mode should handle /nested-index correctly", + "Route indexes handling development mode should handle /nested-index/index correctly", + "Route indexes handling development mode should handle /nested-index/index/index correctly", + "Route indexes handling development mode should handle /sub correctly", + "Route indexes handling development mode should handle /sub/another correctly", + "Route indexes handling development mode should handle /sub/another/index correctly", + "Route indexes handling development mode should handle /sub/index correctly", + "Route indexes handling development mode should handle /sub/index/index correctly" + ], + "failed": [], + "pending": [ + "Route indexes handling production mode should handle / correctly", + "Route indexes handling production mode should handle /api/sub correctly", + "Route indexes handling production mode should handle /api/sub/another correctly", + "Route indexes handling production mode should handle /api/sub/another/index correctly", + "Route indexes handling production mode should handle /api/sub/index correctly", + "Route indexes handling production mode should handle /api/sub/index/index correctly", + "Route indexes handling production mode should handle /index correctly", + "Route indexes handling production mode should handle /index/index correctly", + "Route indexes handling production mode should handle /nested-index correctly", + "Route indexes handling production mode should handle /nested-index/index correctly", + "Route indexes handling production mode should handle /nested-index/index/index correctly", + "Route indexes handling production mode should handle /sub correctly", + "Route indexes handling production mode should handle /sub/another correctly", + "Route indexes handling production mode should handle /sub/another/index correctly", + "Route indexes handling production mode should handle /sub/index correctly", + "Route indexes handling production mode should handle /sub/index/index correctly" + ], + "flakey": [], + "runtimeError": false + }, "test/integration/route-load-cancel-css/test/index.test.ts": { "passed": [], "failed": [], @@ -21374,6 +22115,17 @@ "flakey": [], "runtimeError": false }, + "test/integration/ssg-data-404/test/index.test.ts": { + "passed": [ + "SSG data 404 development mode should hard navigate when a new deployment occurs" + ], + "failed": [], + "pending": [ + "SSG data 404 production mode should hard navigate when a new deployment occurs" + ], + "flakey": [], + "runtimeError": false + }, "test/integration/ssg-dynamic-routes-404-page/test/index.test.ts": { "passed": [ "Custom 404 Page for static site generation with dynamic routes development mode should respond to a not existing page with 404" @@ -21599,6 +22351,18 @@ "flakey": [], "runtimeError": false }, + "test/integration/typescript-app-type-declarations/test/index.test.ts": { + "passed": [ + "TypeScript App Type Declarations should not touch an existing correct next-env.d.ts" + ], + "failed": [ + "TypeScript App Type Declarations should overwrite next-env.d.ts if an incorrect one exists", + "TypeScript App Type Declarations should write a new next-env.d.ts if none exist" + ], + "pending": [], + "flakey": [], + "runtimeError": false + }, "test/integration/typescript-baseurl/test/index.test.ts": { "passed": ["TypeScript Features default behavior should render the page"], "failed": [], @@ -21773,6 +22537,15 @@ "flakey": [], "runtimeError": false }, + "test/integration/with-electron/test/index.test.ts": { + "passed": [ + "Should skip testing electron without process.env.TEST_ELECTRON set" + ], + "failed": [], + "pending": [], + "flakey": [], + "runtimeError": false + }, "test/integration/worker-webpack5/test/index.test.ts": { "passed": [ "Web Workers with webpack 5 development mode should pass on both client and worker"