Skip to content

Commit 0487fe8

Browse files
AI Agentclaude
andcommitted
SDK-613: move the Next.js examples to 16.3.4 and drop node 18 from CI
Follow-up to the 15.5.25 bump: go all the way to the current Next.js major. `npm audit` in both examples now reports nothing against `next` at all (the transitive `postcss` advisories 15.x carried are gone too). Next 16 requires node >= 20.9, so the node 18 leg of the CI matrix is removed; node 22 is added so the matrix still covers three versions. Next 16 also removes `next lint`, and `eslint-config-next@16` is flat-config only and needs ESLint >= 9. So both examples: - replace `.eslintrc.json` with `eslint.config.mjs` re-exporting `eslint-config-next/core-web-vitals` (which already carries the TypeScript setup and the .next/out/build ignores), - move eslint 8 -> 9, and - change their `lint` script from `next lint` to `eslint .`. ESLint is pinned to ^9 rather than ^10 deliberately: eslint-config-next 16 pulls eslint-plugin-react, eslint-plugin-import and eslint-plugin-jsx-a11y, none of which declare ESLint 10 support yet, so ^10 only installs behind three ERESOLVE peer overrides. The root `lint:examples` script still works unchanged -- ESLint 9 still accepts `--ext` -- and both examples lint clean via either invocation. tsconfig `jsx` moves from `preserve` to `react-jsx`, which Next 16 mandates, and the app-router example picks up the `.next/dev/types` include. Verified: both examples build (Turbopack), lint clean, and all six example tests added for this upgrade still pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent f0231b1 commit 0487fe8

12 files changed

Lines changed: 3838 additions & 2431 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ jobs:
1515
strategy:
1616
matrix:
1717
include:
18-
- node: 18
19-
npm: 9
18+
# Next.js 16 (used by the examples) requires node >= 20.9.
2019
- node: 20
2120
npm: 10
2221
- node: 21
2322
npm: 10
23+
- node: 22
24+
npm: 10
2425

2526
continue-on-error: true
2627

examples/nextjs-approuter/.eslintrc.json

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import nextCoreWebVitals from 'eslint-config-next/core-web-vitals';
2+
3+
// Next 16 removed `next lint`, so ESLint runs directly against this flat
4+
// config. `eslint-config-next/core-web-vitals` already brings the TypeScript
5+
// setup and the `.next`/`out`/`build` ignores with it.
6+
/** @type {import('eslint').Linter.Config[]} */
7+
const config = [...nextCoreWebVitals];
8+
9+
export default config;

0 commit comments

Comments
 (0)