v16.2.0
Breaking Changes📦 next-jsView on GitHub →
⚠ 2 breaking✨ 13 features🐛 26 fixes⚡ 1 deprecations🔧 10 symbols
Summary
This release focuses heavily on improving type safety within the App Router via the new `experimental.strictRouteTypes` configuration, alongside numerous stability fixes and performance improvements in Turbopack. It also introduces new developer tooling like CPU profiling and an agents-md command.
⚠️ Breaking Changes
- feat(next/image)!: add `images.maximumResponseBody` config: This introduces a new configuration option `images.maximumResponseBody` which might affect image optimization behavior if you were relying on the previous default size limit.
- fetch(next/image): reduce maximumResponseBody from 300MB to 50MB: The default maximum response body size for image fetching has been reduced from 300MB to 50MB. If you fetch large images, you may need to update your configuration using the new `images.maximumResponseBody` setting.
Migration Steps
- If you rely on image response sizes exceeding 50MB, configure `images.maximumResponseBody`.
- If you were using `url.parse`, update your code to use alternatives.
✨ New Features
- Add experimental routing package for resolving adapter routes.
- Add experimental `strictRouteTypes` config under `experimental.strictRouteTypes`.
- Add `images.maximumResponseBody` config for next/image.
- Add maximum size limit for postponed body parsing.
- Add `--experimental-cpu-prof` flag for dev, build, and start commands.
- Add experimental option to use no-cache instead of no-store in dev.
- next/image: support custom cache handlers.
- Add Claude Code plugin marketplace with Cache Components skill.
- Add `NEXT_DEPLOYMENT_ID` global.
- Add `experimental_gesturePush` to App Router.
- Implement LRU cache with invocation ID scoping for minimal mode response cache.
- Add hydration diff indicator for diff lines in devtools.
- feat(next-codemod): add agents-md command for AI coding agents.
🐛 Bug Fixes
- Ensure outputs are correct with cache components in deployment adapters.
- fix: revalidateTag with profile should not trigger client cache invalidation.
- prevent browser cache from using stale RSC responses from previous builds.
- fix overlay frames cannot be opened sometimes.
- Handle pnpm-workspace.yaml while searching for monorepo root.
- Omit unused arguments from `'use cache'` function calls.
- Only log `pending revalidates...` debug log if applicable.
- fix(next/image): bump sharp@0.34.5.
- Disallow javascript urls in router methods and redirects.
- Fix relative same host redirects in node middleware.
- fix: use RDC for server action requests.
- Warn when overriding Cache-Control header on `/_next/` routes.
- fix(build): prevent route handler manifests from inheriting unrelated client components.
- Fix incorrect 'Ready in' time for next start.
- fix: make RedirectType constant properties literal types.
- fix: capture promisified setImmediate separately.
- fix: setImmediate[util.promisify.custom] access fails in edge runtime.
- Fix `--debug-build-paths` bracket escaping for glob patterns.
- Add negation pattern support to `--debug-build-paths`.
- [Devtool Indicator] Fix cross alignment.
- Use rewritten pathname for implicit cache tags.
- Fix `revalidatePath` with params and trailing slash when deployed.
- fix: preserve cache behavior for PPR fallback shells with root params.
- [CC] Fix dev validation error from server action bound args.
- [devtools] Wrap long file names of stack frames in the error overlay.
- [devtools] Fix notch coloring of error overlay in forced colors mode.
Affected Symbols
⚡ Deprecations
- Move off of deprecated url.parse: Code is moving away from the deprecated `url.parse` function.