Skip to content

Commit a1294a8

Browse files
committed
chore(deps): upgrade Next.js to 16.2.4 and React to 19.2.5
- next, eslint-config-next → 16.2.4 (latest stable) - react, react-dom → 19.2.5 - @types/react → 19.2.14, @types/react-dom → 19.2.3 - Rename src/middleware.ts → src/proxy.ts and export `proxy` to match the Next.js 16 file-convention rename - Migrate eslint.config.mjs to flat config via eslint-config-next/core-web-vitals and /typescript; drop FlatCompat - Downgrade new react-hooks v7 compiler rules (set-state-in-effect, error-boundaries, immutability, purity, refs, preserve-manual-memoization, incompatible-library) to warnings to keep lint green while the pre-existing patterns are migrated incrementally - Fix tv/[coinAddress] page params type to Promise<{ coinAddress: string }> to align with Next.js 16 fully-async dynamic params - Update CLAUDE.md layout doc to reference proxy.ts Validation: pnpm lint (0 errors), tsc --noEmit (clean), next dev (Ready in ~400ms), proxy rewrite returns 200 for Accept: text/markdown on "/". Compile step of pnpm build succeeds in 41s with Turbopack (prerender failures in this sandbox are external subgraph allowlist 403s, not upgrade-related). https://claude.ai/code/session_01QVjceB1PFubwe6TCpRq3xx
1 parent 4d8efe5 commit a1294a8

6 files changed

Lines changed: 1396 additions & 1218 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ src/
4545
├── types/ # shared TS interfaces
4646
├── utils/abis/ # contract ABIs (gnarsLootboxV4Abi, erc20, …)
4747
├── workers/ # client-side search workers (blog, proposal)
48-
└── middleware.ts # Accept: text/markdown → rewrite to /md/*
48+
└── proxy.ts # Accept: text/markdown → rewrite to /md/* (Next.js 16 proxy convention, formerly middleware.ts)
4949
```
5050

5151
### Hook naming (drift to be aware of)

eslint.config.mjs

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
import { dirname } from "path";
2-
import { fileURLToPath } from "url";
3-
import { FlatCompat } from "@eslint/eslintrc";
4-
5-
const __filename = fileURLToPath(import.meta.url);
6-
const __dirname = dirname(__filename);
7-
8-
const compat = new FlatCompat({
9-
baseDirectory: __dirname,
10-
});
1+
import nextCoreWebVitals from "eslint-config-next/core-web-vitals";
2+
import nextTypescript from "eslint-config-next/typescript";
3+
import prettierConfig from "eslint-config-prettier/flat";
114

125
const eslintConfig = [
13-
...compat.extends("next/core-web-vitals", "next/typescript"),
6+
...nextCoreWebVitals,
7+
...nextTypescript,
148
{
159
ignores: [
1610
"node_modules/**",
@@ -22,8 +16,22 @@ const eslintConfig = [
2216
"subgraphs/**",
2317
],
2418
},
19+
{
20+
// React Compiler rules shipped with eslint-plugin-react-hooks v7 (bundled with
21+
// Next.js 16) are new and surface many pre-existing patterns. Keep them visible
22+
// as warnings so regressions can be addressed incrementally without blocking CI.
23+
rules: {
24+
"react-hooks/set-state-in-effect": "warn",
25+
"react-hooks/error-boundaries": "warn",
26+
"react-hooks/immutability": "warn",
27+
"react-hooks/purity": "warn",
28+
"react-hooks/refs": "warn",
29+
"react-hooks/preserve-manual-memoization": "warn",
30+
"react-hooks/incompatible-library": "warn",
31+
},
32+
},
2533
// Disable rules that conflict with Prettier's formatting
26-
...compat.extends("prettier"),
34+
prettierConfig,
2735
];
2836

2937
export default eslintConfig;

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@
5757
"leaflet.markercluster": "^1.5.3",
5858
"lucide-react": "^0.542.0",
5959
"minisearch": "^7.1.2",
60-
"next": "15.5.7",
60+
"next": "16.2.4",
6161
"next-themes": "^0.4.6",
6262
"ogl": "^1.0.11",
63-
"react": "19.1.0",
64-
"react-dom": "19.1.0",
63+
"react": "19.2.5",
64+
"react-dom": "19.2.5",
6565
"react-globe.gl": "^2.37.0",
6666
"react-hook-form": "^7.62.0",
6767
"react-icons": "^5.5.0",
@@ -97,11 +97,11 @@
9797
"@types/leaflet-draw": "^1.0.13",
9898
"@types/leaflet.markercluster": "^1.5.6",
9999
"@types/node": "^20",
100-
"@types/react": "^19",
101-
"@types/react-dom": "^19.1.9",
100+
"@types/react": "^19.2.14",
101+
"@types/react-dom": "^19.2.3",
102102
"@types/three": "^0.182.0",
103103
"eslint": "^9",
104-
"eslint-config-next": "15.5.7",
104+
"eslint-config-next": "16.2.4",
105105
"eslint-config-prettier": "^10.1.8",
106106
"prettier": "^3.6.2",
107107
"shadcn": "^3.6.2",

0 commit comments

Comments
 (0)