Commit Graph

2 Commits

Author SHA1 Message Date
Hendrik Liebau a3500c3227 [test] Fix deploy test of cache-components.server-action.test.ts (#88854)
When deployed, the sentinels where showing `at runtime` instead of `at
buildtime`. There are two reasons for this:

1. The page sentinel was accidentally rendered in a client component,
which causes a hydration mismatch, and the value toggling from `at
buildtime` to `at runtime` when the page is hydrated before the
assertion is done.
2. The middleware was setting sentinel cookies that are intended for the
`/cookies/*` pages, but not for the `/server-action-inline` page. This
caused the server action (which is triggered in the second test) to
consider the page as revalidated, which then led the client router to
refetch the page. With `next start` this is not a problem because the
RSC response is prerendered at build time, and returned as a static
file, which contains the correct sentinel values. However, when deployed
on Vercel, the RSC request results in an ISR cache miss for some reason,
which causes the page to be revalidated (with runtime sentinel values),
and then the third test fails when it receives the regenerated response
instead of the build-time prerender result. This needs to be
investigated separately, but for now we disable the middleware from
setting cookies on this page to prevent the ISR revalidation request.

closes #88817
closes NAR-740

> [!TIP]
> Best reviewed with hidden whitespace changes.
2026-01-21 17:18:44 +01:00
Wyatt Johnson 8abbb3dc2e refactor: rename experimental.dynamicIO to experimental.cacheComponents (#81562)
## What?

Rename `experimental.dynamicIO` to `experimental.cacheComponents` across
the Next.js codebase.

## Why?

We're going to be merging the functionality of the `ppr`, `dynamicIO`
and `useCache` experimental flags into the singular `cacheComponents`
flag to reduce complexity of the codebase and simplify adoption for
users wanting to experiment with experimental features.

## How?

- Renamed the configuration option from `experimental.dynamicIO` to
`experimental.cacheComponents`
- Added deprecation handling with automatic migration for the old option
name
- Updated all documentation, tests, and internal references
- Updated Rust code in SWC transforms and Turbopack
- Maintained backward compatibility with deprecation warnings

NAR-158
2025-07-17 19:30:28 -06:00