From 6147131aad3fc944b07260523d9cc29b35547b6b Mon Sep 17 00:00:00 2001 From: BOHA Date: Tue, 9 Jun 2026 06:51:43 +0200 Subject: [PATCH] chore(deps): upgrade React 18.3 -> 19.2.7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit react / react-dom 18.3.1 -> 19.2.7; @types/react 18.3.31 -> 19.2.17; @types/react-dom 18.3.7 -> 19.2.3 (latest stable 19.2.x). Only breaking change hitting our code: React 19 removed the no-arg useRef() overload. AppShell's logoutTimer -> useRef(undefined) — the same transform the official `types-react-codemod preset-19` (useRef-required-initial) applies. No other preset-19 transforms were relevant (already on createRoot; no ReactDOM.render, string refs, propTypes/defaultProps on function components). No Next.js / RSC in this project (it's a Vite SPA served by Fastify), so those React 19 concerns don't apply here. MUI v7, framer-motion 12, TanStack Query 5, react-router-dom 6 and react-quill-new all installed cleanly against React 19 (no peer-dependency conflicts). Gates: tsc 0 | build 0 | vitest 247/247 | eslint 0 errors. Co-Authored-By: Claude Opus 4.8 (1M context) --- package-lock.json | 54 +++++++++++++++++---------------------- package.json | 8 +++--- src/admin/ui/AppShell.tsx | 4 ++- 3 files changed, 30 insertions(+), 36 deletions(-) diff --git a/package-lock.json b/package-lock.json index d69d2c8..cea5b52 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,8 +42,8 @@ "prisma": "^6.19.2", "puppeteer": "^24.40.0", "qrcode": "^1.5.4", - "react": "^18.3.1", - "react-dom": "^18.3.1", + "react": "^19.2.7", + "react-dom": "^19.2.7", "react-quill-new": "^3.8.3", "react-router-dom": "^6.30.3", "zod": "^4.3.6" @@ -58,8 +58,8 @@ "@types/node-cron": "^3.0.11", "@types/nodemailer": "^7.0.11", "@types/qrcode": "^1.5.6", - "@types/react": "^18.3.31", - "@types/react-dom": "^18.3.7", + "@types/react": "^19.2.17", + "@types/react-dom": "^19.2.3", "@types/supertest": "^7.2.0", "@vitejs/plugin-react": "^6.0.1", "concurrently": "^9.2.1", @@ -2791,23 +2791,22 @@ } }, "node_modules/@types/react": { - "version": "18.3.31", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.31.tgz", - "integrity": "sha512-vfEqpXTvwT91yhmwdfouStN2hSKwTvyRs8qpLfADyrq/kxDw0hZM7Wk9Ug1FELj8hIby+S/+kQCSRFF32nv2Qw==", + "version": "19.2.17", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.17.tgz", + "integrity": "sha512-MXfmqaVPEVgkBT/aY0aGCkRWWtByiYQXo3xdQ8r5RzuFrPiRn8Gar2tQdXSUQ2GKV3bkXckek89V8wQBY2Q/Aw==", "license": "MIT", "dependencies": { - "@types/prop-types": "*", "csstype": "^3.2.2" } }, "node_modules/@types/react-dom": { - "version": "18.3.7", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz", - "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==", + "version": "19.2.3", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz", + "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", "dev": true, "license": "MIT", "peerDependencies": { - "@types/react": "^18.0.0" + "@types/react": "^19.2.0" } }, "node_modules/@types/react-transition-group": { @@ -7363,28 +7362,24 @@ } }, "node_modules/react": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", - "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "version": "19.2.7", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.7.tgz", + "integrity": "sha512-HNe9WslTbXmFK8o8cmwgAeJFSBvt1bPdHCVKtaaV+WlAN36mpT4hcRpwbf3fY56ar2oIXzsBpOAiIRHAdY0OlQ==", "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0" - }, "engines": { "node": ">=0.10.0" } }, "node_modules/react-dom": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", - "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "version": "19.2.7", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.7.tgz", + "integrity": "sha512-t0BRVXvbiE/o20Hfw669rLbMCDWtYZLvmJigy2f0MxsXF+71pxhR3xOkspmsO8h3ZlNzyibAmtCa3l4lYKk6gQ==", "license": "MIT", "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.2" + "scheduler": "^0.27.0" }, "peerDependencies": { - "react": "^18.3.1" + "react": "^19.2.7" } }, "node_modules/react-is": { @@ -7720,13 +7715,10 @@ } }, "node_modules/scheduler": { - "version": "0.23.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", - "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", - "license": "MIT", - "dependencies": { - "loose-envify": "^1.1.0" - } + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", + "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "license": "MIT" }, "node_modules/secure-json-parse": { "version": "4.1.0", diff --git a/package.json b/package.json index 80dc4e3..bfb30df 100644 --- a/package.json +++ b/package.json @@ -66,8 +66,8 @@ "prisma": "^6.19.2", "puppeteer": "^24.40.0", "qrcode": "^1.5.4", - "react": "^18.3.1", - "react-dom": "^18.3.1", + "react": "^19.2.7", + "react-dom": "^19.2.7", "react-quill-new": "^3.8.3", "react-router-dom": "^6.30.3", "zod": "^4.3.6" @@ -82,8 +82,8 @@ "@types/node-cron": "^3.0.11", "@types/nodemailer": "^7.0.11", "@types/qrcode": "^1.5.6", - "@types/react": "^18.3.31", - "@types/react-dom": "^18.3.7", + "@types/react": "^19.2.17", + "@types/react-dom": "^19.2.3", "@types/supertest": "^7.2.0", "@vitejs/plugin-react": "^6.0.1", "concurrently": "^9.2.1", diff --git a/src/admin/ui/AppShell.tsx b/src/admin/ui/AppShell.tsx index c3347c8..efa9606 100644 --- a/src/admin/ui/AppShell.tsx +++ b/src/admin/ui/AppShell.tsx @@ -19,7 +19,9 @@ export default function AppShell() { const [mobileOpen, setMobileOpen] = useState(false); const [loggingOut, setLoggingOut] = useState(false); const location = useLocation(); - const logoutTimer = useRef>(); + const logoutTimer = useRef | undefined>( + undefined, + ); const handleLogout = useCallback(() => { setLoggingOut(true);