build(deps): upgrade to Next.js 16 - #12
Merged
Merged
Conversation
Next.js 15.5.20 -> 16.3.4, with React 19.2.8 and the matching @types and eslint-config-next majors. Turbopack is the default bundler in 16, so `next dev --turbopack` loses the flag. The build already ran through Turbopack and there is no webpack config here, so nothing needs `--webpack`. The one real break was ESLint. @next/eslint-plugin-next now ships flat config only, and the old `FlatCompat.extends('next/core-web-vitals', 'next/typescript')` call throws a circular-structure error against it. The two configs are imported directly as flat arrays instead, which drops the last consumer of @eslint/eslintrc. Verified the Next rules still fire (no-img-element) and that the same 20 files are linted as before. tsconfig changes are the ones `next build` writes itself: `jsx` must be `react-jsx` in 16, and `.next/dev/types` joins `include` now that dev and build write to separate output directories. The nextjs-agent-rules block in AGENTS.md is generated and re-added by `next dev`; committing it keeps the tree clean. None of the other version 16 breaking changes apply — no middleware, no images.domains, no AMP, no serverRuntimeConfig/publicRuntimeConfig, no sync params or searchParams, no parallel routes, and `next lint` was never used. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrades the template from Next.js 15.5.20 to 16.3.4.
Changes
next15.5.20 → 16.3.4,react/react-dom→ 19.2.8,@types/react,@types/react-dom,eslint-config-next→ 16.3.4--turbopackfrom thedevscriptdevandbuildin 16. There is no webpack config here, so nothing needs the--webpackescape hatch.eslint.config.mjsto importeslint-config-next/core-web-vitalsandeslint-config-next/typescriptdirectly@next/eslint-plugin-nextnow ships flat config only, and the oldFlatCompat.extends('next/core-web-vitals', 'next/typescript')call throwsTypeError: Converting circular structure to JSONagainst it.@eslint/eslintrcFlatCompatwas its last consumer.tsconfig.json:jsx→react-jsx,.next/dev/types/**/*.tsadded toincludenext builditself.devandbuilduse separate output directories in 16.AGENTS.mdgained anextjs-agent-rulesblocknext dev. Committing it keeps the tree clean; deleting it just re-creates an uncommitted change.README.md,AGENTS.md,src/app/page.tsx,e2e/example.spec.tsBreaking changes that did not apply
Checked each item in the version 16 upgrade guide against the tree. None of these are present:
middleware(→proxy),images.domains, AMP,serverRuntimeConfig/publicRuntimeConfig, synchronousparams/searchParams/cookies()/headers()/draftMode(), parallel routes needingdefault.js,next/legacy/image,unstable_cache imports, single-argumentrevalidateTag,experimental_ppr,experimental.dynamicIO/useCache, removeddevIndicatorsoptions.next lintwas never used — thelintscript already calledeslintdirectly.next.config.tsalready used the stable top-levelturbopackkey.Node is already on 24 via
.nvmrc, above the new 20.9 floor.Verification
All run in the worktree against 16.3.4:
pnpm type-check— cleanpnpm lint— cleanpnpm format:check— cleanpnpm test— 2/2pnpm build— succeeds, both routes prerendered staticpnpm test:e2e --project=chromium— 4/4, including the@elirobinson/ai-patternscontract checks (touch targets, visible focus, WCAG AA contrast) in light and darkpnpm dev— Next 16.3.4 boots, home page renders, no browser console errors and no dev-indicator errorsAfter the ESLint rewrite I confirmed the Next rules still fire by linting a throwaway file with a bare
<img>;@next/next/no-img-elementcaught it. The same 20 files are linted before and after.Visual diff
The only rendered change is one card label: "Next.js 15" → "Next.js 16". Layout, spacing, type, and color are untouched, and the design system contract E2E specs pass unchanged. Skipping a before/after screenshot pair for a one-word text delta.
🤖 Generated with Claude Code