Page
+ │ 4 | }
+ │ \`----
+ │
+ │
+ │ Caused by:
+ │ Syntax Error
+ \`\`\`
+
+ ---"
+ `)
+ } else {
expect(strippedErrors).toMatchInlineSnapshot(`
"# Found errors in 1 browser session(s)
diff --git a/test/e2e/app-dir/app-root-params/fixtures/generate-static-params/app/[lang]/[locale]/layout.tsx b/test/e2e/app-dir/app-root-params/fixtures/generate-static-params/app/[lang]/[locale]/layout.tsx
deleted file mode 100644
index 0502ea507ea106..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/generate-static-params/app/[lang]/[locale]/layout.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-import { ReactNode } from 'react'
-
-export default function Root({ children }: { children: ReactNode }) {
- return (
-
- {children}
-
- )
-}
-
-export async function generateStaticParams() {
- return [
- { lang: 'en', locale: 'en-US' },
- { lang: 'es', locale: 'es-ES' },
- ]
-}
diff --git a/test/e2e/app-dir/app-root-params/fixtures/generate-static-params/app/[lang]/[locale]/other/[slug]/layout.tsx b/test/e2e/app-dir/app-root-params/fixtures/generate-static-params/app/[lang]/[locale]/other/[slug]/layout.tsx
deleted file mode 100644
index d75c116266dca1..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/generate-static-params/app/[lang]/[locale]/other/[slug]/layout.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-export default function Layout({ children }) {
- return
{children}
-}
diff --git a/test/e2e/app-dir/app-root-params/fixtures/generate-static-params/app/[lang]/[locale]/other/[slug]/page.tsx b/test/e2e/app-dir/app-root-params/fixtures/generate-static-params/app/[lang]/[locale]/other/[slug]/page.tsx
deleted file mode 100644
index 760aaed24e1438..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/generate-static-params/app/[lang]/[locale]/other/[slug]/page.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-import { headers } from 'next/headers'
-import { unstable_rootParams } from 'next/server'
-
-export default async function Page({ params }) {
- await headers()
- const { slug } = await params
- return (
-
-
{slug}
-
{JSON.stringify(await unstable_rootParams())}
-
- )
-}
diff --git a/test/e2e/app-dir/app-root-params/fixtures/generate-static-params/app/[lang]/[locale]/other/layout.tsx b/test/e2e/app-dir/app-root-params/fixtures/generate-static-params/app/[lang]/[locale]/other/layout.tsx
deleted file mode 100644
index d75c116266dca1..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/generate-static-params/app/[lang]/[locale]/other/layout.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-export default function Layout({ children }) {
- return
{children}
-}
diff --git a/test/e2e/app-dir/app-root-params/fixtures/generate-static-params/app/[lang]/[locale]/other/page.tsx b/test/e2e/app-dir/app-root-params/fixtures/generate-static-params/app/[lang]/[locale]/other/page.tsx
deleted file mode 100644
index 187b8651110662..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/generate-static-params/app/[lang]/[locale]/other/page.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-export default function Page() {
- return
Other Page
-}
diff --git a/test/e2e/app-dir/app-root-params/fixtures/generate-static-params/app/[lang]/[locale]/page.tsx b/test/e2e/app-dir/app-root-params/fixtures/generate-static-params/app/[lang]/[locale]/page.tsx
deleted file mode 100644
index f241e008dc96f4..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/generate-static-params/app/[lang]/[locale]/page.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import { unstable_rootParams } from 'next/server'
-
-export default async function Page() {
- return
hello world {JSON.stringify(await unstable_rootParams())}
-}
diff --git a/test/e2e/app-dir/app-root-params/fixtures/multiple-roots/app/(dashboard)/[id]/data/page.tsx b/test/e2e/app-dir/app-root-params/fixtures/multiple-roots/app/(dashboard)/[id]/data/page.tsx
deleted file mode 100644
index f241e008dc96f4..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/multiple-roots/app/(dashboard)/[id]/data/page.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import { unstable_rootParams } from 'next/server'
-
-export default async function Page() {
- return
hello world {JSON.stringify(await unstable_rootParams())}
-}
diff --git a/test/e2e/app-dir/app-root-params/fixtures/multiple-roots/app/(dashboard)/[id]/layout.tsx b/test/e2e/app-dir/app-root-params/fixtures/multiple-roots/app/(dashboard)/[id]/layout.tsx
deleted file mode 100644
index f7b45d80141e47..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/multiple-roots/app/(dashboard)/[id]/layout.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import { ReactNode } from 'react'
-
-export default function Root({ children }: { children: ReactNode }) {
- return (
-
- Dashboard Root: {children}
-
- )
-}
-
-export const revalidate = 0
-export async function generateStaticParams() {
- return [{ id: '1' }]
-}
diff --git a/test/e2e/app-dir/app-root-params/fixtures/multiple-roots/app/(marketing)/landing/page.tsx b/test/e2e/app-dir/app-root-params/fixtures/multiple-roots/app/(marketing)/landing/page.tsx
deleted file mode 100644
index f241e008dc96f4..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/multiple-roots/app/(marketing)/landing/page.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import { unstable_rootParams } from 'next/server'
-
-export default async function Page() {
- return
hello world {JSON.stringify(await unstable_rootParams())}
-}
diff --git a/test/e2e/app-dir/app-root-params/fixtures/multiple-roots/app/(marketing)/layout.tsx b/test/e2e/app-dir/app-root-params/fixtures/multiple-roots/app/(marketing)/layout.tsx
deleted file mode 100644
index ab9238c0e14de9..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/multiple-roots/app/(marketing)/layout.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-import { ReactNode } from 'react'
-
-export default function Root({ children }: { children: ReactNode }) {
- return (
-
- Marketing Root: {children}
-
- )
-}
diff --git a/test/e2e/app-dir/app-root-params/fixtures/simple/app/[lang]/[locale]/layout.tsx b/test/e2e/app-dir/app-root-params/fixtures/simple/app/[lang]/[locale]/layout.tsx
deleted file mode 100644
index 614e0bf24928dc..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/simple/app/[lang]/[locale]/layout.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import { ReactNode } from 'react'
-
-export default function Root({ children }: { children: ReactNode }) {
- return (
-
- {children}
-
- )
-}
-
-export const revalidate = 0
-export async function generateStaticParams() {
- return [{ lang: 'en', locale: 'us' }]
-}
diff --git a/test/e2e/app-dir/app-root-params/fixtures/simple/app/[lang]/[locale]/other/[slug]/layout.tsx b/test/e2e/app-dir/app-root-params/fixtures/simple/app/[lang]/[locale]/other/[slug]/layout.tsx
deleted file mode 100644
index d75c116266dca1..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/simple/app/[lang]/[locale]/other/[slug]/layout.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-export default function Layout({ children }) {
- return
{children}
-}
diff --git a/test/e2e/app-dir/app-root-params/fixtures/simple/app/[lang]/[locale]/other/[slug]/page.tsx b/test/e2e/app-dir/app-root-params/fixtures/simple/app/[lang]/[locale]/other/[slug]/page.tsx
deleted file mode 100644
index f5dcadb7a7bbe2..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/simple/app/[lang]/[locale]/other/[slug]/page.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-import { cookies } from 'next/headers'
-import { unstable_rootParams } from 'next/server'
-
-export default async function Page({ params }) {
- await cookies()
- const { slug } = await params
- return (
-
-
{slug}
-
{JSON.stringify(await unstable_rootParams())}
-
- )
-}
diff --git a/test/e2e/app-dir/app-root-params/fixtures/simple/app/[lang]/[locale]/other/layout.tsx b/test/e2e/app-dir/app-root-params/fixtures/simple/app/[lang]/[locale]/other/layout.tsx
deleted file mode 100644
index d75c116266dca1..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/simple/app/[lang]/[locale]/other/layout.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-export default function Layout({ children }) {
- return
{children}
-}
diff --git a/test/e2e/app-dir/app-root-params/fixtures/simple/app/[lang]/[locale]/other/page.tsx b/test/e2e/app-dir/app-root-params/fixtures/simple/app/[lang]/[locale]/other/page.tsx
deleted file mode 100644
index 187b8651110662..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/simple/app/[lang]/[locale]/other/page.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-export default function Page() {
- return
Other Page
-}
diff --git a/test/e2e/app-dir/app-root-params/fixtures/simple/app/[lang]/[locale]/page.tsx b/test/e2e/app-dir/app-root-params/fixtures/simple/app/[lang]/[locale]/page.tsx
deleted file mode 100644
index f241e008dc96f4..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/simple/app/[lang]/[locale]/page.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import { unstable_rootParams } from 'next/server'
-
-export default async function Page() {
- return
hello world {JSON.stringify(await unstable_rootParams())}
-}
diff --git a/test/e2e/app-dir/app-root-params/fixtures/use-cache-build/app/[lang]/[locale]/layout.tsx b/test/e2e/app-dir/app-root-params/fixtures/use-cache-build/app/[lang]/[locale]/layout.tsx
deleted file mode 100644
index 0502ea507ea106..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/use-cache-build/app/[lang]/[locale]/layout.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-import { ReactNode } from 'react'
-
-export default function Root({ children }: { children: ReactNode }) {
- return (
-
- {children}
-
- )
-}
-
-export async function generateStaticParams() {
- return [
- { lang: 'en', locale: 'en-US' },
- { lang: 'es', locale: 'es-ES' },
- ]
-}
diff --git a/test/e2e/app-dir/app-root-params/fixtures/use-cache-build/app/[lang]/[locale]/use-cache/page.tsx b/test/e2e/app-dir/app-root-params/fixtures/use-cache-build/app/[lang]/[locale]/use-cache/page.tsx
deleted file mode 100644
index 334d9d6f222e08..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/use-cache-build/app/[lang]/[locale]/use-cache/page.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import { unstable_rootParams } from 'next/server'
-
-export default async function Page() {
- const rootParams = await getCachedParams()
- const data = await fetch(
- 'https://next-data-api-endpoint.vercel.app/api/random'
- ).then((res) => res.text())
-
- return (
-
-
- {rootParams.lang} {rootParams.locale}
- {' '}
- {data}
-
- )
-}
-
-async function getCachedParams() {
- 'use cache'
- return unstable_rootParams()
-}
diff --git a/test/e2e/app-dir/app-root-params/fixtures/use-cache-build/next.config.js b/test/e2e/app-dir/app-root-params/fixtures/use-cache-build/next.config.js
deleted file mode 100644
index 9b469ab0242bf6..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/use-cache-build/next.config.js
+++ /dev/null
@@ -1,5 +0,0 @@
-module.exports = {
- experimental: {
- useCache: true,
- },
-}
diff --git a/test/e2e/app-dir/app-root-params/fixtures/use-cache-runtime/app/[lang]/[locale]/layout.tsx b/test/e2e/app-dir/app-root-params/fixtures/use-cache-runtime/app/[lang]/[locale]/layout.tsx
deleted file mode 100644
index 716a8db36f52c5..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/use-cache-runtime/app/[lang]/[locale]/layout.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-import { ReactNode } from 'react'
-
-export default function Root({ children }: { children: ReactNode }) {
- return (
-
- {children}
-
- )
-}
diff --git a/test/e2e/app-dir/app-root-params/fixtures/use-cache-runtime/app/[lang]/[locale]/request/page.tsx b/test/e2e/app-dir/app-root-params/fixtures/use-cache-runtime/app/[lang]/[locale]/request/page.tsx
deleted file mode 100644
index 44a4d23cad5893..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/use-cache-runtime/app/[lang]/[locale]/request/page.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-import { unstable_rootParams } from 'next/server'
-
-export default async function Page() {
- const rootParams = await unstable_rootParams()
- const data = await fetch(
- 'https://next-data-api-endpoint.vercel.app/api/random'
- ).then((res) => res.text())
-
- return (
-
-
- {rootParams.lang} {rootParams.locale}
- {' '}
- {data}
-
- )
-}
diff --git a/test/e2e/app-dir/app-root-params/fixtures/use-cache-runtime/app/[lang]/[locale]/unstable_cache/page.tsx b/test/e2e/app-dir/app-root-params/fixtures/use-cache-runtime/app/[lang]/[locale]/unstable_cache/page.tsx
deleted file mode 100644
index 2ffdc10ec5fdd5..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/use-cache-runtime/app/[lang]/[locale]/unstable_cache/page.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import { unstable_rootParams } from 'next/server'
-import { unstable_cache as cache } from 'next/cache'
-
-export default async function Page() {
- const rootParams = await getCachedParams()
- const data = await fetch(
- 'https://next-data-api-endpoint.vercel.app/api/random'
- ).then((res) => res.text())
-
- return (
-
-
- {rootParams.lang} {rootParams.locale}
- {' '}
- {data}
-
- )
-}
-
-const getCachedParams = cache(async () => {
- return unstable_rootParams()
-})
diff --git a/test/e2e/app-dir/app-root-params/fixtures/use-cache-runtime/app/[lang]/[locale]/use-cache/page.tsx b/test/e2e/app-dir/app-root-params/fixtures/use-cache-runtime/app/[lang]/[locale]/use-cache/page.tsx
deleted file mode 100644
index 334d9d6f222e08..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/use-cache-runtime/app/[lang]/[locale]/use-cache/page.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import { unstable_rootParams } from 'next/server'
-
-export default async function Page() {
- const rootParams = await getCachedParams()
- const data = await fetch(
- 'https://next-data-api-endpoint.vercel.app/api/random'
- ).then((res) => res.text())
-
- return (
-
-
- {rootParams.lang} {rootParams.locale}
- {' '}
- {data}
-
- )
-}
-
-async function getCachedParams() {
- 'use cache'
- return unstable_rootParams()
-}
diff --git a/test/e2e/app-dir/app-root-params/fixtures/use-cache-runtime/next.config.js b/test/e2e/app-dir/app-root-params/fixtures/use-cache-runtime/next.config.js
deleted file mode 100644
index 9b469ab0242bf6..00000000000000
--- a/test/e2e/app-dir/app-root-params/fixtures/use-cache-runtime/next.config.js
+++ /dev/null
@@ -1,5 +0,0 @@
-module.exports = {
- experimental: {
- useCache: true,
- },
-}
diff --git a/test/e2e/app-dir/app-root-params/generate-static-params.test.ts b/test/e2e/app-dir/app-root-params/generate-static-params.test.ts
deleted file mode 100644
index 12b95cc7ab0159..00000000000000
--- a/test/e2e/app-dir/app-root-params/generate-static-params.test.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-import { nextTestSetup } from 'e2e-utils'
-import { join } from 'path'
-
-describe('app-root-params - generateStaticParams', () => {
- const { next, isNextDeploy, isTurbopack } = nextTestSetup({
- files: join(__dirname, 'fixtures', 'generate-static-params'),
- })
-
- it('should return rootParams', async () => {
- const $ = await next.render$('/en/us')
- expect($('p').text()).toBe('hello world {"lang":"en","locale":"us"}')
- })
-
- it('should only return rootParams and not other params', async () => {
- const $ = await next.render$('/en/us/other/1')
- expect($('#dynamic-params').text()).toBe('1')
- expect($('#root-params').text()).toBe('{"lang":"en","locale":"us"}')
- })
-
- it('should be a cache hit for fully prerendered pages', async () => {
- const response = await next.fetch('/en/us')
- expect(response.status).toBe(200)
- expect(
- response.headers.get(isNextDeploy ? 'x-vercel-cache' : 'x-nextjs-cache')
- ).toBe('HIT')
- })
-
- it("should be a cache miss for pages that aren't prerendered", async () => {
- const response = await next.fetch('/en/us/other/1')
- expect(response.status).toBe(200)
- if (isNextDeploy) {
- expect(response.headers.get('x-vercel-cache')).toBe('MISS')
- } else {
- expect(response.headers.get('x-nextjs-cache')).toBeFalsy()
- }
- })
-
- // `next-types-plugin` currently only runs in Webpack.
- // We skip deployment mode since we don't care about the deploy, we just want to
- // check the file generated at build time.
- if (!isNextDeploy && !isTurbopack) {
- it('should correctly generate types', async () => {
- expect(await next.hasFile('.next/types/server.d.ts')).toBe(true)
- const fileContents = await next.readFile('.next/types/server.d.ts')
- expect(fileContents).toContain(
- `export function unstable_rootParams(): Promise<{ lang: string, locale: string }>`
- )
- })
- }
-})
diff --git a/test/e2e/app-dir/app-root-params/multiple-roots.test.ts b/test/e2e/app-dir/app-root-params/multiple-roots.test.ts
deleted file mode 100644
index 6dc4d6985dc391..00000000000000
--- a/test/e2e/app-dir/app-root-params/multiple-roots.test.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import { nextTestSetup } from 'e2e-utils'
-import { join } from 'path'
-
-describe('app-root-params - multiple roots', () => {
- const { next, isNextDeploy, isTurbopack } = nextTestSetup({
- files: join(__dirname, 'fixtures', 'multiple-roots'),
- })
-
- it('should have root params on dashboard pages', async () => {
- const $ = await next.render$('/1/data')
- expect($('body').text()).toContain('Dashboard Root')
- expect($('p').text()).toBe('hello world {"id":"1"}')
- })
-
- it('should not have root params on marketing pages', async () => {
- const $ = await next.render$('/landing')
- expect($('body').text()).toContain('Marketing Root')
- expect($('p').text()).toBe('hello world {}')
- })
-
- // `next-types-plugin` currently only runs in Webpack.
- // We skip deployment mode since we don't care about the deploy, we just want to
- // check the file generated at build time.
- if (!isNextDeploy && !isTurbopack) {
- it('should correctly generate types', async () => {
- expect(await next.hasFile('.next/types/server.d.ts')).toBe(true)
- const fileContents = await next.readFile('.next/types/server.d.ts')
- expect(fileContents).toContain(
- `export function unstable_rootParams(): Promise<{ id?: string }>`
- )
- })
- }
-})
diff --git a/test/e2e/app-dir/app-root-params/next.config.js b/test/e2e/app-dir/app-root-params/next.config.js
deleted file mode 100644
index 807126e4cf0bf5..00000000000000
--- a/test/e2e/app-dir/app-root-params/next.config.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/**
- * @type {import('next').NextConfig}
- */
-const nextConfig = {}
-
-module.exports = nextConfig
diff --git a/test/e2e/app-dir/app-root-params/simple.test.ts b/test/e2e/app-dir/app-root-params/simple.test.ts
deleted file mode 100644
index ecbf15b4b8d46f..00000000000000
--- a/test/e2e/app-dir/app-root-params/simple.test.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import { nextTestSetup } from 'e2e-utils'
-import { assertNoRedbox } from 'next-test-utils'
-import { join } from 'path'
-
-describe('app-root-params - simple', () => {
- const { next, isNextDeploy, isTurbopack } = nextTestSetup({
- files: join(__dirname, 'fixtures', 'simple'),
- })
-
- it('should return rootParams', async () => {
- const $ = await next.render$('/en/us')
- expect($('p').text()).toBe('hello world {"lang":"en","locale":"us"}')
- })
-
- it('should only return rootParams and not other params', async () => {
- const $ = await next.render$('/en/us/other/1')
- expect($('#dynamic-params').text()).toBe('1')
- expect($('#root-params').text()).toBe('{"lang":"en","locale":"us"}')
- })
-
- it('should render the not found page without errors', async () => {
- const browser = await next.browser('/')
- expect(await browser.elementByCss('h2').text()).toBe(
- 'This page could not be found.'
- )
- await assertNoRedbox(browser)
- })
-
- // `next-types-plugin` currently only runs in Webpack.
- // We skip deployment mode since we don't care about the deploy, we just want to
- // check the file generated at build time.
- if (!isNextDeploy && !isTurbopack) {
- it('should correctly generate types', async () => {
- expect(await next.hasFile('.next/types/server.d.ts')).toBe(true)
- const fileContents = await next.readFile('.next/types/server.d.ts')
- expect(fileContents).toContain(
- `export function unstable_rootParams(): Promise<{ lang: string, locale: string }>`
- )
- })
- }
-})
diff --git a/test/e2e/app-dir/app-root-params/use-cache.test.ts b/test/e2e/app-dir/app-root-params/use-cache.test.ts
deleted file mode 100644
index 7a54ce5c2437d6..00000000000000
--- a/test/e2e/app-dir/app-root-params/use-cache.test.ts
+++ /dev/null
@@ -1,121 +0,0 @@
-import { nextTestSetup } from 'e2e-utils'
-import { join } from 'path'
-import { createSandbox } from 'development-sandbox'
-
-const isPPREnabled = process.env.__NEXT_EXPERIMENTAL_PPR === 'true'
-
-describe('app-root-params - cache - at runtime', () => {
- const { next, isNextDev, skipped } = nextTestSetup({
- files: join(__dirname, 'fixtures', 'use-cache-runtime'),
- skipStart: true,
- // this test asserts on build failure logs, which aren't currently observable in `next.cliOutput`.
- skipDeployment: true,
- })
-
- if (skipped) return
-
- if (isNextDev) {
- it('should error when using rootParams within a "use cache" - dev', async () => {
- await using sandbox = await createSandbox(
- next,
- undefined,
- '/en/us/use-cache'
- )
- const { session } = sandbox
- await session.assertHasRedbox()
- if (isPPREnabled) {
- // When PPR is enabled we verify that we have at least one root param value from generateStaticParams
- // Which this test does not define so we get a different error which preempts the root params error
- expect(await session.getRedboxDescription()).toInclude(
- 'Required root params (lang, locale) were not provided in generateStaticParams'
- )
- } else {
- expect(await session.getRedboxDescription()).toInclude(
- 'Route /[lang]/[locale]/use-cache used `unstable_rootParams()` inside `"use cache"` or `unstable_cache`'
- )
- }
- })
-
- it('should error when using rootParams within `unstable_cache` - dev', async () => {
- await using sandbox = await createSandbox(
- next,
- undefined,
- '/en/us/unstable_cache'
- )
- const { session } = sandbox
- await session.assertHasRedbox()
- if (isPPREnabled) {
- // When PPR is enabled we verify that we have at least one root param value from generateStaticParams
- // Which this test does not define so we get a different error which preempts the root params error
- expect(await session.getRedboxDescription()).toInclude(
- 'Required root params (lang, locale) were not provided in generateStaticParams'
- )
- } else {
- expect(await session.getRedboxDescription()).toInclude(
- 'Route /[lang]/[locale]/unstable_cache used `unstable_rootParams()` inside `"use cache"` or `unstable_cache`'
- )
- }
- })
- } else {
- beforeAll(async () => {
- try {
- await next.start()
- } catch (_) {
- // We expect the build to fail
- }
- })
-
- it('should error when using rootParams within a "use cache" - start', async () => {
- if (isPPREnabled) {
- // When PPR is enabled we verify that we have at least one root param value from generateStaticParams
- // Which this test does not define so we get a different error which preempts the root params error
- expect(next.cliOutput).toInclude(
- 'Required root params (lang, locale) were not provided in generateStaticParams'
- )
- } else {
- await next.render$('/en/us/use-cache')
- expect(next.cliOutput).toInclude(
- 'Error: Route /[lang]/[locale]/use-cache used `unstable_rootParams()` inside `"use cache"` or `unstable_cache`'
- )
- }
- })
-
- it('should error when using rootParams within `unstable_cache` - start', async () => {
- if (isPPREnabled) {
- // When PPR is enabled we verify that we have at least one root param value from generateStaticParams
- // Which this test does not define so we get a different error which preempts the root params error
- expect(next.cliOutput).toInclude(
- 'Required root params (lang, locale) were not provided in generateStaticParams'
- )
- } else {
- await next.render$('/en/us/unstable_cache')
- expect(next.cliOutput).toInclude(
- 'Error: Route /[lang]/[locale]/unstable_cache used `unstable_rootParams()` inside `"use cache"` or `unstable_cache`'
- )
- }
- })
- }
-})
-
-describe('app-root-params - cache - at build', () => {
- const { next, isNextDev } = nextTestSetup({
- files: join(__dirname, 'fixtures', 'use-cache-build'),
- skipStart: true,
- })
-
- if (isNextDev) {
- // we omit these tests in dev because they are duplicates semantically to the runtime fixture tested above
- it('noop in dev', () => {})
- } else {
- it('should error when building a project that uses rootParams within `"use cache"`', async () => {
- try {
- await next.start()
- } catch {
- // we expect the build to fail
- }
- expect(next.cliOutput).toInclude(
- 'Error: Route /[lang]/[locale]/use-cache used `unstable_rootParams()` inside `"use cache"` or `unstable_cache`'
- )
- })
- }
-})
diff --git a/test/e2e/app-dir/cache-components-errors/cache-components-errors.test.ts b/test/e2e/app-dir/cache-components-errors/cache-components-errors.test.ts
index 1b3de92ef9ed85..05718e6e3487c3 100644
--- a/test/e2e/app-dir/cache-components-errors/cache-components-errors.test.ts
+++ b/test/e2e/app-dir/cache-components-errors/cache-components-errors.test.ts
@@ -1199,11 +1199,11 @@ describe('Cache Components Errors', () => {
"description": "Route "/sync-cookies" used \`cookies().get\`. \`cookies()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis",
"environmentLabel": "Prerender",
"label": "Console Error",
- "source": "app/sync-cookies/page.tsx (17:25) @ CookiesReadingComponent
- > 17 | const token = (cookies() as any).get('token')
+ "source": "app/sync-cookies/page.tsx (18:25) @ CookiesReadingComponent
+ > 18 | const token = (cookies() as any).get('token')
| ^",
"stack": [
- "CookiesReadingComponent app/sync-cookies/page.tsx (17:25)",
+ "CookiesReadingComponent app/sync-cookies/page.tsx (18:25)",
"Page app/sync-cookies/page.tsx (11:7)",
],
},
@@ -1211,11 +1211,11 @@ describe('Cache Components Errors', () => {
"description": "(0 ,
.cookies)(...).get is not a function",
"environmentLabel": "Prerender",
"label": "Runtime TypeError",
- "source": "app/sync-cookies/page.tsx (17:36) @ CookiesReadingComponent
- > 17 | const token = (cookies() as any).get('token')
+ "source": "app/sync-cookies/page.tsx (18:36) @ CookiesReadingComponent
+ > 18 | const token = (cookies() as any).get('token')
| ^",
"stack": [
- "CookiesReadingComponent app/sync-cookies/page.tsx (17:36)",
+ "CookiesReadingComponent app/sync-cookies/page.tsx (18:36)",
],
},
]
@@ -1393,11 +1393,11 @@ describe('Cache Components Errors', () => {
"description": "(0 , .cookies)(...).get is not a function",
"environmentLabel": "Server",
"label": "Runtime TypeError",
- "source": "app/sync-cookies-runtime/page.tsx (24:66) @ CookiesReadingComponent
+ "source": "app/sync-cookies-runtime/page.tsx (24:36) @ CookiesReadingComponent
> 24 | const token = (cookies() as any).get('token')
- | ^",
+ | ^",
"stack": [
- "CookiesReadingComponent app/sync-cookies-runtime/page.tsx (24:66)",
+ "CookiesReadingComponent app/sync-cookies-runtime/page.tsx (24:36)",
],
},
]
@@ -1475,11 +1475,11 @@ describe('Cache Components Errors', () => {
"description": "Route "/sync-draft-mode" used \`draftMode().isEnabled\`. \`draftMode()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis",
"environmentLabel": "Prerender",
"label": "Console Error",
- "source": "app/sync-draft-mode/page.tsx (23:31) @ DraftModeReadingComponent
- > 23 | const isEnabled = (draftMode() as any)
+ "source": "app/sync-draft-mode/page.tsx (24:31) @ DraftModeReadingComponent
+ > 24 | const isEnabled = (draftMode() as any).isEnabled
| ^",
"stack": [
- "DraftModeReadingComponent app/sync-draft-mode/page.tsx (23:31)",
+ "DraftModeReadingComponent app/sync-draft-mode/page.tsx (24:31)",
"Page app/sync-draft-mode/page.tsx (13:7)",
],
}
@@ -1550,11 +1550,11 @@ describe('Cache Components Errors', () => {
"description": "Route "/sync-headers" used \`headers().get\`. \`headers()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis",
"environmentLabel": "Prerender",
"label": "Console Error",
- "source": "app/sync-headers/page.tsx (17:29) @ HeadersReadingComponent
- > 17 | const userAgent = (headers() as any).get(
+ "source": "app/sync-headers/page.tsx (18:29) @ HeadersReadingComponent
+ > 18 | const userAgent = (headers() as any).get('user-agent')
| ^",
"stack": [
- "HeadersReadingComponent app/sync-headers/page.tsx (17:29)",
+ "HeadersReadingComponent app/sync-headers/page.tsx (18:29)",
"Page app/sync-headers/page.tsx (11:7)",
],
},
@@ -1562,11 +1562,11 @@ describe('Cache Components Errors', () => {
"description": "(0 , .headers)(...).get is not a function",
"environmentLabel": "Prerender",
"label": "Runtime TypeError",
- "source": "app/sync-headers/page.tsx (17:70) @ HeadersReadingComponent
- > 17 | const userAgent = (headers() as any).get(
- | ^",
+ "source": "app/sync-headers/page.tsx (18:40) @ HeadersReadingComponent
+ > 18 | const userAgent = (headers() as any).get('user-agent')
+ | ^",
"stack": [
- "HeadersReadingComponent app/sync-headers/page.tsx (17:70)",
+ "HeadersReadingComponent app/sync-headers/page.tsx (18:40)",
],
},
]
@@ -1733,7 +1733,7 @@ describe('Cache Components Errors', () => {
"environmentLabel": "Server",
"label": "Console Error",
"source": "app/sync-headers-runtime/page.tsx (24:29) @ HeadersReadingComponent
- > 24 | const userAgent = (headers() as any).get(
+ > 24 | const userAgent = (headers() as any).get('user-agent')
| ^",
"stack": [
"HeadersReadingComponent app/sync-headers-runtime/page.tsx (24:29)",
@@ -1744,11 +1744,11 @@ describe('Cache Components Errors', () => {
"description": "(0 , .headers)(...).get is not a function",
"environmentLabel": "Server",
"label": "Runtime TypeError",
- "source": "app/sync-headers-runtime/page.tsx (24:70) @ HeadersReadingComponent
- > 24 | const userAgent = (headers() as any).get(
- | ^",
+ "source": "app/sync-headers-runtime/page.tsx (24:40) @ HeadersReadingComponent
+ > 24 | const userAgent = (headers() as any).get('user-agent')
+ | ^",
"stack": [
- "HeadersReadingComponent app/sync-headers-runtime/page.tsx (24:70)",
+ "HeadersReadingComponent app/sync-headers-runtime/page.tsx (24:40)",
],
},
]
diff --git a/test/e2e/app-dir/middleware-rewrite-dynamic/app/page.tsx b/test/e2e/app-dir/middleware-rewrite-dynamic/app/page.tsx
index 7a5011548102ab..dc6405889a0447 100644
--- a/test/e2e/app-dir/middleware-rewrite-dynamic/app/page.tsx
+++ b/test/e2e/app-dir/middleware-rewrite-dynamic/app/page.tsx
@@ -2,32 +2,41 @@ import Image from 'next/image'
export default function Home() {
return (
-
-
+
+
-
- -
- Get started by editing{' '}
-
- app/page.tsx
-
- .
-
- -
- Save and see your changes instantly.
-
-
-
-
+
+
+ To get started, edit the page.tsx file.
+
+
+ Looking for a starting point or more instructions? Head over to{' '}
+
+ Template
+ {' '}
+ or the{' '}
+
+ Learning
+ {' '}
+ center.
+
+
+
-
)
}
diff --git a/test/e2e/app-dir/segment-cache/basic/segment-cache-basic.test.ts b/test/e2e/app-dir/segment-cache/basic/segment-cache-basic.test.ts
index bde403f1c58248..dd1647292617ee 100644
--- a/test/e2e/app-dir/segment-cache/basic/segment-cache-basic.test.ts
+++ b/test/e2e/app-dir/segment-cache/basic/segment-cache-basic.test.ts
@@ -93,11 +93,7 @@ describe('segment cache (basic tests)', () => {
)
})
- // TODO(client-param-parsing): With `clientParamParsing` enabled, this test is outdated, because
- // we no longer put the param values in the prefetched RSC response. You'd have to opt into runtime
- // prefetching for this test to pass until we ship the optimization that would mark this as fully static
- // if you don't reference any dynamic params in the server components.
- it.skip('navigate to page with lazily-generated (not at build time) static param', async () => {
+ it('navigate to page with lazily-generated (not at build time) static param', async () => {
let act: ReturnType
const browser = await next.browser('/lazily-generated-params', {
beforePageLoad(page) {
diff --git a/test/e2e/middleware-static-files/app/app/page.tsx b/test/e2e/middleware-static-files/app/app/page.tsx
index 7a5011548102ab..dc6405889a0447 100644
--- a/test/e2e/middleware-static-files/app/app/page.tsx
+++ b/test/e2e/middleware-static-files/app/app/page.tsx
@@ -2,32 +2,41 @@ import Image from 'next/image'
export default function Home() {
return (
-
-
+
+
-
- -
- Get started by editing{' '}
-
- app/page.tsx
-
- .
-
- -
- Save and see your changes instantly.
-
-
-
-
+
+
+ To get started, edit the page.tsx file.
+
+
+ Looking for a starting point or more instructions? Head over to{' '}
+
+ Template
+ {' '}
+ or the{' '}
+
+ Learning
+ {' '}
+ center.
+
+
+
-
)
}
diff --git a/test/e2e/twoslash/app/route.js b/test/e2e/twoslash/app/route.js
new file mode 100644
index 00000000000000..276396ec76dbde
--- /dev/null
+++ b/test/e2e/twoslash/app/route.js
@@ -0,0 +1,24 @@
+import { createTwoslasher } from 'twoslash'
+import ts from 'typescript'
+
+export function GET(request) {
+ try {
+ const options = request.nextUrl.searchParams.has('esnext')
+ ? {
+ target: ts.ScriptTarget.ESNext,
+ lib: ['ESNext', 'DOM', 'esnext', 'dom', 'es2020'],
+ }
+ : {}
+
+ const code = `type X = Promise;
+'hello'.toUpperCase()`
+ const twoslasher = createTwoslasher({
+ compilerOptions: options,
+ })
+ const result = twoslasher(code)
+
+ return Response.json(result)
+ } catch (e) {
+ return Response.json({ error: e })
+ }
+}
diff --git a/test/e2e/twoslash/index.test.ts b/test/e2e/twoslash/index.test.ts
new file mode 100644
index 00000000000000..fa1edcbd20d631
--- /dev/null
+++ b/test/e2e/twoslash/index.test.ts
@@ -0,0 +1,55 @@
+import { nextTestSetup } from 'e2e-utils'
+
+describe('twoslash', () => {
+ const { next } = nextTestSetup({
+ files: __dirname,
+ dependencies: {
+ twoslash: '0.3.4',
+ },
+ })
+
+ it.each(['default', 'esnext'])(
+ 'should annotate twoslash types %s',
+ async (mode) => {
+ const { code, nodes, error } = JSON.parse(await next.render(`/?${mode}`))
+ expect({ code, nodes, error }).toMatchInlineSnapshot(`
+ {
+ "code": "type X = Promise;
+ 'hello'.toUpperCase()",
+ "error": undefined,
+ "nodes": [
+ {
+ "character": 5,
+ "length": 1,
+ "line": 0,
+ "start": 5,
+ "target": "X",
+ "text": "type X = Promise",
+ "type": "hover",
+ },
+ {
+ "character": 9,
+ "docs": "Represents the completion of an asynchronous operation",
+ "length": 7,
+ "line": 0,
+ "start": 9,
+ "target": "Promise",
+ "text": "interface Promise",
+ "type": "hover",
+ },
+ {
+ "character": 8,
+ "docs": "Converts all the alphabetic characters in a string to uppercase.",
+ "length": 11,
+ "line": 1,
+ "start": 34,
+ "target": "toUpperCase",
+ "text": "(method) String.toUpperCase(): string",
+ "type": "hover",
+ },
+ ],
+ }
+ `)
+ }
+ )
+})
diff --git a/test/e2e/twoslash/next.config.js b/test/e2e/twoslash/next.config.js
new file mode 100644
index 00000000000000..241faf5446daf3
--- /dev/null
+++ b/test/e2e/twoslash/next.config.js
@@ -0,0 +1,26 @@
+const path = require('path')
+
+/** @type {import('next').NextConfig} */
+const nextConfig = {
+ // output: 'standalone',
+
+ // TODO ideally, all of these manual includes wouldn't be necessary. Maybe we can improve that for
+ // Turbopack
+ outputFileTracingIncludes: {
+ '/': [
+ path.relative(
+ process.cwd(),
+ path.resolve(
+ require.resolve('typescript/package.json'),
+ '..',
+ 'lib',
+ 'lib.*.d.ts'
+ )
+ ),
+ './node_modules/@types/node/**',
+ ],
+ },
+ serverExternalPackages: ['twoslash'],
+}
+
+module.exports = nextConfig
diff --git a/test/e2e/twoslash/standalone.test.ts b/test/e2e/twoslash/standalone.test.ts
new file mode 100644
index 00000000000000..a5836fba08eb56
--- /dev/null
+++ b/test/e2e/twoslash/standalone.test.ts
@@ -0,0 +1,113 @@
+import { nextTestSetup } from 'e2e-utils'
+import fs from 'fs-extra'
+import os from 'os'
+import path from 'path'
+import {
+ findPort,
+ initNextServerScript,
+ killApp,
+ fetchViaHTTP,
+} from 'next-test-utils'
+
+if (!(globalThis as any).isNextStart) {
+ it('should skip for non-next start', () => {})
+} else {
+ describe('output: standalone with twoslash', () => {
+ const { next, skipped } = nextTestSetup({
+ files: __dirname,
+ dependencies: {
+ twoslash: '0.3.4',
+ },
+ skipStart: true,
+ })
+
+ if (skipped) {
+ return
+ }
+
+ let server: any
+ let appPort: number
+ let tmpFolder: string
+
+ beforeAll(async () => {
+ await next.patchFile(
+ 'next.config.js',
+ (await next.readFile('next.config.js')).replace('// output', 'output')
+ )
+ await next.build()
+
+ tmpFolder = path.join(os.tmpdir(), 'next-standalone-' + Date.now())
+ await fs.mkdirp(tmpFolder)
+ const distFolder = path.join(tmpFolder, 'test')
+ await fs.move(path.join(next.testDir, '.next/standalone'), distFolder)
+ const testServer = path.join(distFolder, 'server.js')
+ appPort = await findPort()
+ server = await initNextServerScript(
+ testServer,
+ /- Local:/,
+ {
+ ...process.env,
+ PORT: appPort.toString(),
+ },
+ undefined,
+ {
+ cwd: distFolder,
+ }
+ )
+ })
+
+ afterAll(async () => {
+ if (server) await killApp(server)
+ if (!process.env.NEXT_TEST_SKIP_CLEANUP) {
+ await fs.remove(tmpFolder)
+ }
+ })
+
+ it.each(['default', 'esnext'])(
+ 'should annotate twoslash types %s',
+ async (mode) => {
+ const { code, nodes, error } = await (
+ await fetchViaHTTP(appPort, `/?${mode}`)
+ ).json()
+ expect({ code, nodes, error }).toMatchInlineSnapshot(`
+ {
+ "code": "type X = Promise;
+ 'hello'.toUpperCase()",
+ "error": undefined,
+ "nodes": [
+ {
+ "character": 5,
+ "length": 1,
+ "line": 0,
+ "start": 5,
+ "target": "X",
+ "text": "type X = Promise",
+ "type": "hover",
+ },
+ {
+ "character": 9,
+ "docs": "Represents the completion of an asynchronous operation",
+ "length": 7,
+ "line": 0,
+ "start": 9,
+ "target": "Promise",
+ "text": "interface Promise",
+ "type": "hover",
+ },
+ {
+ "character": 8,
+ "docs": "Converts all the alphabetic characters in a string to uppercase.",
+ "length": 11,
+ "line": 1,
+ "start": 34,
+ "target": "toUpperCase",
+ "text": "(method) String.toUpperCase(): string",
+ "type": "hover",
+ },
+ ],
+ }
+ `)
+ }
+ )
+ })
+}
diff --git a/test/e2e/yarn-pnp/test/utils.ts b/test/e2e/yarn-pnp/test/utils.ts
index 2f22224669de58..c6b9262f84fbe6 100644
--- a/test/e2e/yarn-pnp/test/utils.ts
+++ b/test/e2e/yarn-pnp/test/utils.ts
@@ -35,10 +35,6 @@ export function runTests(
delete packageJson.dependencies['react']
delete packageJson.dependencies['react-dom']
- if (process.env.NEXT_RSPACK) {
- packageJson.dependencies['@rspack/core'] = 'latest'
- }
-
next = await createNext({
files: srcFiles.reduce(
(prev, file) => {
diff --git a/test/integration/create-next-app/utils.ts b/test/integration/create-next-app/utils.ts
index 1b59e00ad0094e..96ef5a411d1441 100644
--- a/test/integration/create-next-app/utils.ts
+++ b/test/integration/create-next-app/utils.ts
@@ -66,7 +66,15 @@ export async function tryNextDev({
if (isEmpty || isApi) {
expect(await res.text()).toContain('Hello world!')
} else {
- expect(await res.text()).toContain('Get started by editing')
+ const responseText = await res.text()
+ // App Router uses page.tsx/page.js, Pages Router uses index.tsx/index.js
+ const hasAppRouterText =
+ responseText.includes('To get started, edit the page.tsx file.') ||
+ responseText.includes('To get started, edit the page.js file.')
+ const hasPagesRouterText =
+ responseText.includes('To get started, edit the index.tsx file.') ||
+ responseText.includes('To get started, edit the index.js file.')
+ expect(hasAppRouterText || hasPagesRouterText).toBe(true)
}
expect(res.status).toBe(200)
diff --git a/test/production/app-dir/build-output-prerender/build-output-prerender.test.ts b/test/production/app-dir/build-output-prerender/build-output-prerender.test.ts
index 5cfc1cddf9f12e..335377e9a9a53b 100644
--- a/test/production/app-dir/build-output-prerender/build-output-prerender.test.ts
+++ b/test/production/app-dir/build-output-prerender/build-output-prerender.test.ts
@@ -26,8 +26,8 @@ describe('build-output-prerender', () => {
"▲ Next.js x.y.z (Turbopack)
- Experiments (use with caution):
✓ cacheComponents
- ✓ clientParamParsing (enabled by \`experimental.cacheComponents\`)
- ✓ clientSegmentCache (enabled by \`experimental.cacheComponents\`)
+ ✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
+ ✓ clientSegmentCache (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
✓ enablePrerenderSourceMaps (enabled by \`experimental.cacheComponents\`)
✓ ppr (enabled by \`__NEXT_EXPERIMENTAL_CACHE_COMPONENTS\`)
✓ rdcForNavigations (enabled by \`__NEXT_EXPERIMENTAL_CACHE_COMPONENTS\`)"
@@ -37,8 +37,8 @@ describe('build-output-prerender', () => {
"▲ Next.js x.y.z (webpack)
- Experiments (use with caution):
✓ cacheComponents
- ✓ clientParamParsing (enabled by \`experimental.cacheComponents\`)
- ✓ clientSegmentCache (enabled by \`experimental.cacheComponents\`)
+ ✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
+ ✓ clientSegmentCache (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
✓ enablePrerenderSourceMaps (enabled by \`experimental.cacheComponents\`)
✓ ppr (enabled by \`__NEXT_EXPERIMENTAL_CACHE_COMPONENTS\`)
✓ rdcForNavigations (enabled by \`__NEXT_EXPERIMENTAL_CACHE_COMPONENTS\`)"
@@ -61,8 +61,8 @@ describe('build-output-prerender', () => {
"▲ Next.js x.y.z (webpack)
- Experiments (use with caution):
✓ cacheComponents
- ✓ clientParamParsing (enabled by \`experimental.cacheComponents\`)
- ✓ clientSegmentCache (enabled by \`experimental.cacheComponents\`)
+ ✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
+ ✓ clientSegmentCache (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
✓ enablePrerenderSourceMaps (enabled by \`experimental.cacheComponents\`)
✓ ppr (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
✓ rdcForNavigations (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)"
@@ -74,8 +74,6 @@ describe('build-output-prerender', () => {
"▲ Next.js x.y.z (Turbopack)
- Experiments (use with caution):
✓ cacheComponents
- ✓ clientParamParsing (enabled by \`experimental.cacheComponents\`)
- ✓ clientSegmentCache (enabled by \`experimental.cacheComponents\`)
✓ enablePrerenderSourceMaps (enabled by \`experimental.cacheComponents\`)
✓ ppr (enabled by \`experimental.cacheComponents\`)
✓ rdcForNavigations (enabled by \`experimental.ppr\`)"
@@ -85,8 +83,6 @@ describe('build-output-prerender', () => {
"▲ Next.js x.y.z (Rspack)
- Experiments (use with caution):
✓ cacheComponents
- ✓ clientParamParsing (enabled by \`experimental.cacheComponents\`)
- ✓ clientSegmentCache (enabled by \`experimental.cacheComponents\`)
✓ enablePrerenderSourceMaps (enabled by \`experimental.cacheComponents\`)
✓ ppr (enabled by \`experimental.cacheComponents\`)
✓ rdcForNavigations (enabled by \`experimental.ppr\`)"
@@ -96,8 +92,6 @@ describe('build-output-prerender', () => {
"▲ Next.js x.y.z (webpack)
- Experiments (use with caution):
✓ cacheComponents
- ✓ clientParamParsing (enabled by \`experimental.cacheComponents\`)
- ✓ clientSegmentCache (enabled by \`experimental.cacheComponents\`)
✓ enablePrerenderSourceMaps (enabled by \`experimental.cacheComponents\`)
✓ ppr (enabled by \`experimental.cacheComponents\`)
✓ rdcForNavigations (enabled by \`experimental.ppr\`)"
@@ -155,8 +149,8 @@ describe('build-output-prerender', () => {
▲ Next.js x.y.z (Turbopack)
- Experiments (use with caution):
✓ cacheComponents
- ✓ clientParamParsing (enabled by \`experimental.cacheComponents\`)
- ✓ clientSegmentCache (enabled by \`experimental.cacheComponents\`)
+ ✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
+ ✓ clientSegmentCache (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
✓ enablePrerenderSourceMaps (enabled by \`--debug-prerender\`)
✓ ppr (enabled by \`__NEXT_EXPERIMENTAL_CACHE_COMPONENTS\`)
⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
@@ -170,8 +164,8 @@ describe('build-output-prerender', () => {
▲ Next.js x.y.z (webpack)
- Experiments (use with caution):
✓ cacheComponents
- ✓ clientParamParsing (enabled by \`experimental.cacheComponents\`)
- ✓ clientSegmentCache (enabled by \`experimental.cacheComponents\`)
+ ✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
+ ✓ clientSegmentCache (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
✓ enablePrerenderSourceMaps (enabled by \`--debug-prerender\`)
✓ ppr (enabled by \`__NEXT_EXPERIMENTAL_CACHE_COMPONENTS\`)
⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
@@ -202,8 +196,8 @@ describe('build-output-prerender', () => {
▲ Next.js x.y.z (webpack)
- Experiments (use with caution):
✓ cacheComponents
- ✓ clientParamParsing (enabled by \`experimental.cacheComponents\`)
- ✓ clientSegmentCache (enabled by \`experimental.cacheComponents\`)
+ ✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
+ ✓ clientSegmentCache (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
✓ enablePrerenderSourceMaps (enabled by \`--debug-prerender\`)
✓ ppr (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
@@ -219,8 +213,6 @@ describe('build-output-prerender', () => {
▲ Next.js x.y.z (Turbopack)
- Experiments (use with caution):
✓ cacheComponents
- ✓ clientParamParsing (enabled by \`experimental.cacheComponents\`)
- ✓ clientSegmentCache (enabled by \`experimental.cacheComponents\`)
✓ enablePrerenderSourceMaps (enabled by \`--debug-prerender\`)
✓ ppr (enabled by \`experimental.cacheComponents\`)
⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
@@ -234,8 +226,6 @@ describe('build-output-prerender', () => {
▲ Next.js x.y.z (Rspack)
- Experiments (use with caution):
✓ cacheComponents
- ✓ clientParamParsing (enabled by \`experimental.cacheComponents\`)
- ✓ clientSegmentCache (enabled by \`experimental.cacheComponents\`)
✓ enablePrerenderSourceMaps (enabled by \`--debug-prerender\`)
✓ ppr (enabled by \`experimental.cacheComponents\`)
⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
@@ -249,8 +239,6 @@ describe('build-output-prerender', () => {
▲ Next.js x.y.z (webpack)
- Experiments (use with caution):
✓ cacheComponents
- ✓ clientParamParsing (enabled by \`experimental.cacheComponents\`)
- ✓ clientSegmentCache (enabled by \`experimental.cacheComponents\`)
✓ enablePrerenderSourceMaps (enabled by \`--debug-prerender\`)
✓ ppr (enabled by \`experimental.cacheComponents\`)
⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
@@ -309,8 +297,8 @@ describe('build-output-prerender', () => {
"▲ Next.js x.y.z (Turbopack)
- Experiments (use with caution):
✓ cacheComponents (enabled by \`__NEXT_EXPERIMENTAL_CACHE_COMPONENTS\`)
- ✓ clientParamParsing (enabled by \`experimental.cacheComponents\`)
- ✓ clientSegmentCache (enabled by \`experimental.cacheComponents\`)
+ ✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
+ ✓ clientSegmentCache (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
✓ enablePrerenderSourceMaps (enabled by \`experimental.cacheComponents\`)
✓ ppr (enabled by \`__NEXT_EXPERIMENTAL_CACHE_COMPONENTS\`)
✓ rdcForNavigations (enabled by \`__NEXT_EXPERIMENTAL_CACHE_COMPONENTS\`)"
@@ -320,8 +308,8 @@ describe('build-output-prerender', () => {
"▲ Next.js x.y.z (webpack)
- Experiments (use with caution):
✓ cacheComponents (enabled by \`__NEXT_EXPERIMENTAL_CACHE_COMPONENTS\`)
- ✓ clientParamParsing (enabled by \`experimental.cacheComponents\`)
- ✓ clientSegmentCache (enabled by \`experimental.cacheComponents\`)
+ ✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
+ ✓ clientSegmentCache (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
✓ enablePrerenderSourceMaps (enabled by \`experimental.cacheComponents\`)
✓ ppr (enabled by \`__NEXT_EXPERIMENTAL_CACHE_COMPONENTS\`)
✓ rdcForNavigations (enabled by \`__NEXT_EXPERIMENTAL_CACHE_COMPONENTS\`)"
@@ -382,8 +370,8 @@ describe('build-output-prerender', () => {
▲ Next.js x.y.z (Turbopack)
- Experiments (use with caution):
✓ cacheComponents (enabled by \`__NEXT_EXPERIMENTAL_CACHE_COMPONENTS\`)
- ✓ clientParamParsing (enabled by \`experimental.cacheComponents\`)
- ✓ clientSegmentCache (enabled by \`experimental.cacheComponents\`)
+ ✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
+ ✓ clientSegmentCache (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
✓ enablePrerenderSourceMaps (enabled by \`--debug-prerender\`)
✓ ppr (enabled by \`__NEXT_EXPERIMENTAL_CACHE_COMPONENTS\`)
⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
@@ -397,8 +385,8 @@ describe('build-output-prerender', () => {
▲ Next.js x.y.z (webpack)
- Experiments (use with caution):
✓ cacheComponents (enabled by \`__NEXT_EXPERIMENTAL_CACHE_COMPONENTS\`)
- ✓ clientParamParsing (enabled by \`experimental.cacheComponents\`)
- ✓ clientSegmentCache (enabled by \`experimental.cacheComponents\`)
+ ✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
+ ✓ clientSegmentCache (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
✓ enablePrerenderSourceMaps (enabled by \`--debug-prerender\`)
✓ ppr (enabled by \`__NEXT_EXPERIMENTAL_CACHE_COMPONENTS\`)
⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
diff --git a/test/rspack-build-tests-manifest.json b/test/rspack-build-tests-manifest.json
index 6a100e2659626b..6ffbb0a88b20f2 100644
--- a/test/rspack-build-tests-manifest.json
+++ b/test/rspack-build-tests-manifest.json
@@ -893,53 +893,6 @@
"flakey": [],
"runtimeError": false
},
- "test/e2e/app-dir/app-root-params/generate-static-params.test.ts": {
- "passed": [
- "app-root-params - generateStaticParams should be a cache hit for fully prerendered pages",
- "app-root-params - generateStaticParams should be a cache miss for pages that aren't prerendered",
- "app-root-params - generateStaticParams should correctly generate types",
- "app-root-params - generateStaticParams should only return rootParams and not other params",
- "app-root-params - generateStaticParams should return rootParams"
- ],
- "failed": [],
- "pending": [],
- "flakey": [],
- "runtimeError": false
- },
- "test/e2e/app-dir/app-root-params/multiple-roots.test.ts": {
- "passed": [
- "app-root-params - multiple roots should correctly generate types",
- "app-root-params - multiple roots should have root params on dashboard pages",
- "app-root-params - multiple roots should not have root params on marketing pages"
- ],
- "failed": [],
- "pending": [],
- "flakey": [],
- "runtimeError": false
- },
- "test/e2e/app-dir/app-root-params/simple.test.ts": {
- "passed": [
- "app-root-params - simple should correctly generate types",
- "app-root-params - simple should only return rootParams and not other params",
- "app-root-params - simple should render the not found page without errors",
- "app-root-params - simple should return rootParams"
- ],
- "failed": [],
- "pending": [],
- "flakey": [],
- "runtimeError": false
- },
- "test/e2e/app-dir/app-root-params/use-cache.test.ts": {
- "passed": [
- "app-root-params - cache - at build should error when building a project that uses rootParams within `\"use cache\"`",
- "app-root-params - cache - at runtime should error when using rootParams within `unstable_cache` - start",
- "app-root-params - cache - at runtime should error when using rootParams within a \"use cache\" - start"
- ],
- "failed": [],
- "pending": [],
- "flakey": [],
- "runtimeError": false
- },
"test/e2e/app-dir/app-routes-client-component/app-routes-client-component.test.ts": {
"passed": [
"referencing a client component in an app route responds without error"
diff --git a/test/rspack-dev-tests-manifest.json b/test/rspack-dev-tests-manifest.json
index c0518a79cc1d46..f17e4b172520b8 100644
--- a/test/rspack-dev-tests-manifest.json
+++ b/test/rspack-dev-tests-manifest.json
@@ -3283,53 +3283,6 @@
"flakey": [],
"runtimeError": false
},
- "test/e2e/app-dir/app-root-params/generate-static-params.test.ts": {
- "passed": [
- "app-root-params - generateStaticParams should be a cache hit for fully prerendered pages",
- "app-root-params - generateStaticParams should be a cache miss for pages that aren't prerendered",
- "app-root-params - generateStaticParams should correctly generate types",
- "app-root-params - generateStaticParams should only return rootParams and not other params",
- "app-root-params - generateStaticParams should return rootParams"
- ],
- "failed": [],
- "pending": [],
- "flakey": [],
- "runtimeError": false
- },
- "test/e2e/app-dir/app-root-params/multiple-roots.test.ts": {
- "passed": [
- "app-root-params - multiple roots should correctly generate types",
- "app-root-params - multiple roots should have root params on dashboard pages",
- "app-root-params - multiple roots should not have root params on marketing pages"
- ],
- "failed": [],
- "pending": [],
- "flakey": [],
- "runtimeError": false
- },
- "test/e2e/app-dir/app-root-params/simple.test.ts": {
- "passed": [
- "app-root-params - simple should correctly generate types",
- "app-root-params - simple should only return rootParams and not other params",
- "app-root-params - simple should render the not found page without errors",
- "app-root-params - simple should return rootParams"
- ],
- "failed": [],
- "pending": [],
- "flakey": [],
- "runtimeError": false
- },
- "test/e2e/app-dir/app-root-params/use-cache.test.ts": {
- "passed": [
- "app-root-params - cache - at build noop in dev",
- "app-root-params - cache - at runtime should error when using rootParams within `unstable_cache` - dev",
- "app-root-params - cache - at runtime should error when using rootParams within a \"use cache\" - dev"
- ],
- "failed": [],
- "pending": [],
- "flakey": [],
- "runtimeError": false
- },
"test/e2e/app-dir/app-routes-client-component/app-routes-client-component.test.ts": {
"passed": [
"referencing a client component in an app route responds without error"
diff --git a/test/turbopack-build-tests-manifest.json b/test/turbopack-build-tests-manifest.json
index ad0719427ff238..52b2fea7a40b9c 100644
--- a/test/turbopack-build-tests-manifest.json
+++ b/test/turbopack-build-tests-manifest.json
@@ -814,50 +814,6 @@
"flakey": [],
"runtimeError": false
},
- "test/e2e/app-dir/app-root-params/generate-static-params.test.ts": {
- "passed": [
- "app-root-params - generateStaticParams should be a cache hit for fully prerendered pages",
- "app-root-params - generateStaticParams should be a cache miss for pages that aren't prerendered",
- "app-root-params - generateStaticParams should only return rootParams and not other params",
- "app-root-params - generateStaticParams should return rootParams"
- ],
- "failed": [],
- "pending": [],
- "flakey": [],
- "runtimeError": false
- },
- "test/e2e/app-dir/app-root-params/multiple-roots.test.ts": {
- "passed": [
- "app-root-params - multiple roots should have root params on dashboard pages",
- "app-root-params - multiple roots should not have root params on marketing pages"
- ],
- "failed": [],
- "pending": [],
- "flakey": [],
- "runtimeError": false
- },
- "test/e2e/app-dir/app-root-params/simple.test.ts": {
- "passed": [
- "app-root-params - simple should only return rootParams and not other params",
- "app-root-params - simple should render the not found page without errors",
- "app-root-params - simple should return rootParams"
- ],
- "failed": [],
- "pending": [],
- "flakey": [],
- "runtimeError": false
- },
- "test/e2e/app-dir/app-root-params/use-cache.test.ts": {
- "passed": [
- "app-root-params - cache - at build should error when building a project that uses rootParams within `\"use cache\"`",
- "app-root-params - cache - at runtime should error when using rootParams within `unstable_cache` - start",
- "app-root-params - cache - at runtime should error when using rootParams within a \"use cache\" - start"
- ],
- "failed": [],
- "pending": [],
- "flakey": [],
- "runtimeError": false
- },
"test/e2e/app-dir/app-routes-client-component/app-routes-client-component.test.ts": {
"passed": [
"referencing a client component in an app route responds without error"
diff --git a/test/turbopack-dev-tests-manifest.json b/test/turbopack-dev-tests-manifest.json
index 5da92ad76a7b4f..9a77e8a58633c5 100644
--- a/test/turbopack-dev-tests-manifest.json
+++ b/test/turbopack-dev-tests-manifest.json
@@ -4809,50 +4809,6 @@
"flakey": [],
"runtimeError": false
},
- "test/e2e/app-dir/app-root-params/generate-static-params.test.ts": {
- "passed": [
- "app-root-params - generateStaticParams should be a cache hit for fully prerendered pages",
- "app-root-params - generateStaticParams should be a cache miss for pages that aren't prerendered",
- "app-root-params - generateStaticParams should only return rootParams and not other params",
- "app-root-params - generateStaticParams should return rootParams"
- ],
- "failed": [],
- "pending": [],
- "flakey": [],
- "runtimeError": false
- },
- "test/e2e/app-dir/app-root-params/multiple-roots.test.ts": {
- "passed": [
- "app-root-params - multiple roots should have root params on dashboard pages",
- "app-root-params - multiple roots should not have root params on marketing pages"
- ],
- "failed": [],
- "pending": [],
- "flakey": [],
- "runtimeError": false
- },
- "test/e2e/app-dir/app-root-params/simple.test.ts": {
- "passed": [
- "app-root-params - simple should only return rootParams and not other params",
- "app-root-params - simple should render the not found page without errors",
- "app-root-params - simple should return rootParams"
- ],
- "failed": [],
- "pending": [],
- "flakey": [],
- "runtimeError": false
- },
- "test/e2e/app-dir/app-root-params/use-cache.test.ts": {
- "passed": [
- "app-root-params - cache - at build noop in dev",
- "app-root-params - cache - at runtime should error when using rootParams within `unstable_cache` - dev",
- "app-root-params - cache - at runtime should error when using rootParams within a \"use cache\" - dev"
- ],
- "failed": [],
- "pending": [],
- "flakey": [],
- "runtimeError": false
- },
"test/e2e/app-dir/app-routes-client-component/app-routes-client-component.test.ts": {
"passed": [
"referencing a client component in an app route responds without error"