Next.js Change
revalidateTag now requires a second profile argument. The old single-argument form revalidateTag(tag) is deprecated and causes a TypeScript build error in Next.js 16. The new signature is revalidateTag(tag, profile) where profile controls stale-while-revalidate semantics (e.g. 'max').
Upstream commit: vercel/next.js@e586cda
This commit updates 14 call sites across 6 docs files from revalidateTag(tag) to revalidateTag(tag, 'max'). The actual function signature change happened in an earlier commit but this confirms the API is now stable and documented.
Impact on vinext
The revalidateTag shim in vinext (likely in shims/ or server/) needs to:
- Accept the new two-argument signature
revalidateTag(tag: string, profile: string)
- Use the
profile parameter to control revalidation behavior (e.g. 'max' for stale-while-revalidate)
- Maintain backward compatibility with the single-argument form if desired, or match Next.js behavior and require both arguments
The ISR cache layer (isr-cache.ts) and CacheHandler may also need updates if the profile parameter affects cache invalidation strategy.
References
- Next.js commit message states: "The
revalidateTag API now requires a second profile argument. Using the old single-argument form causes a TypeScript build error: 'Expected 2 arguments, but got 1'."
Next.js Change
revalidateTagnow requires a secondprofileargument. The old single-argument formrevalidateTag(tag)is deprecated and causes a TypeScript build error in Next.js 16. The new signature isrevalidateTag(tag, profile)whereprofilecontrols stale-while-revalidate semantics (e.g.'max').Upstream commit: vercel/next.js@e586cda
This commit updates 14 call sites across 6 docs files from
revalidateTag(tag)torevalidateTag(tag, 'max'). The actual function signature change happened in an earlier commit but this confirms the API is now stable and documented.Impact on vinext
The
revalidateTagshim in vinext (likely inshims/orserver/) needs to:revalidateTag(tag: string, profile: string)profileparameter to control revalidation behavior (e.g.'max'for stale-while-revalidate)The ISR cache layer (
isr-cache.ts) andCacheHandlermay also need updates if theprofileparameter affects cache invalidation strategy.References
revalidateTagAPI now requires a secondprofileargument. Using the old single-argument form causes a TypeScript build error: 'Expected 2 arguments, but got 1'."