mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
## Summary - add production-route-shape fixture coverage for `/[teamSlug]/[project]/settings/domains` - add revalidation helpers (API and server action) and browser controls used by the regression test - reproduce the failing production sequence by priming, revalidating, then loading a page with in-view `next/link` and navigating repeatedly x-ref: https://github.com/vercel/next.js/pull/91627 x-ref: https://github.com/vercel/next.js/pull/91603 ## Testing - `IS_WEBPACK_TEST=1 NEXT_SKIP_ISOLATE=1 NEXT_TEST_MODE=start pnpm testheadless test/e2e/app-dir/segment-cache/vary-params-base-dynamic/vary-params-base-dynamic.test.ts -t "production route shape"` (passes) - `NEXT_ENABLE_ADAPTER=1 pnpm test-deploy test/e2e/app-dir/segment-cache/vary-params-base-dynamic/vary-params-base-dynamic.test.ts -t "production route shape"` - `NEXT_ENABLE_ADAPTER=1 pnpm test-deploy test/e2e/app-dir/segment-cache/vary-params-base-dynamic/vary-params-base-dynamic.test.ts` (fails in the two production-shape cases) --------- Co-authored-by: Zack Tanner <[email protected]>
30 lines
706 B
TypeScript
30 lines
706 B
TypeScript
'use server'
|
|
|
|
import { revalidateTag } from 'next/cache'
|
|
|
|
export async function revalidateLayoutByTagExpireNowAction() {
|
|
revalidateTag('_N_T_/layout', 'expireNow')
|
|
return {
|
|
mode: 'server-action-tag-layout-expireNow',
|
|
revalidated: true,
|
|
}
|
|
}
|
|
|
|
export async function revalidateLayoutByTagMaxAction() {
|
|
revalidateTag('_N_T_/layout', 'max')
|
|
return {
|
|
mode: 'server-action-tag-layout-max',
|
|
revalidated: true,
|
|
}
|
|
}
|
|
|
|
export async function revalidateLayoutByTagLegacyAction() {
|
|
// Intentionally test the deprecated call shape without a profile arg.
|
|
// @ts-expect-error
|
|
revalidateTag('_N_T_/layout')
|
|
return {
|
|
mode: 'server-action-tag-layout-legacy',
|
|
revalidated: true,
|
|
}
|
|
}
|