diff --git a/horreum-web/package-lock.json b/horreum-web/package-lock.json index 0ee35e259..eea3d9a76 100644 --- a/horreum-web/package-lock.json +++ b/horreum-web/package-lock.json @@ -35,8 +35,8 @@ "react-dom": "19.1.1", "react-markdown": "10.1.0", "react-redux": "9.2.0", - "react-router": "6.24.1", - "react-router-dom": "6.24.1", + "react-router": "7.9.1", + "react-router-dom": "7.9.1", "react-to-print": "3.1.1", "recharts": "3.1.2", "redux": "5.0.1", @@ -1069,14 +1069,6 @@ } } }, - "node_modules/@remix-run/router": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.17.1.tgz", - "integrity": "sha512-mCOMec4BKd6BRGBZeSnGiIgwsbLGp3yhVqAD8H+PxiRNEHgDpZb8J1TnrSDlg97t0ySKMQJTHCWBCmBpSmkF6Q==", - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@rolldown/pluginutils": { "version": "1.0.0-beta.32", "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.32.tgz", @@ -2138,6 +2130,15 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "license": "MIT" }, + "node_modules/cookie": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.0.2.tgz", + "integrity": "sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", @@ -4666,33 +4667,41 @@ } }, "node_modules/react-router": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.24.1.tgz", - "integrity": "sha512-PTXFXGK2pyXpHzVo3rR9H7ip4lSPZZc0bHG5CARmj65fTT6qG7sTngmb6lcYu1gf3y/8KxORoy9yn59pGpCnpg==", + "version": "7.9.1", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.9.1.tgz", + "integrity": "sha512-pfAByjcTpX55mqSDGwGnY9vDCpxqBLASg0BMNAuMmpSGESo/TaOUG6BllhAtAkCGx8Rnohik/XtaqiYUJtgW2g==", + "license": "MIT", "dependencies": { - "@remix-run/router": "1.17.1" + "cookie": "^1.0.1", + "set-cookie-parser": "^2.6.0" }, "engines": { - "node": ">=14.0.0" + "node": ">=20.0.0" }, "peerDependencies": { - "react": ">=16.8" + "react": ">=18", + "react-dom": ">=18" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } } }, "node_modules/react-router-dom": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.24.1.tgz", - "integrity": "sha512-U19KtXqooqw967Vw0Qcn5cOvrX5Ejo9ORmOtJMzYWtCT4/WOfFLIZGGsVLxcd9UkBO0mSTZtXqhZBsWlHr7+Sg==", + "version": "7.9.1", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.9.1.tgz", + "integrity": "sha512-U9WBQssBE9B1vmRjo9qTM7YRzfZ3lUxESIZnsf4VjR/lXYz9MHjvOxHzr/aUm4efpktbVOrF09rL/y4VHa8RMw==", + "license": "MIT", "dependencies": { - "@remix-run/router": "1.17.1", - "react-router": "6.24.1" + "react-router": "7.9.1" }, "engines": { - "node": ">=14.0.0" + "node": ">=20.0.0" }, "peerDependencies": { - "react": ">=16.8", - "react-dom": ">=16.8" + "react": ">=18", + "react-dom": ">=18" } }, "node_modules/react-themeable": { @@ -4961,6 +4970,12 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "node_modules/set-cookie-parser": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz", + "integrity": "sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==", + "license": "MIT" + }, "node_modules/shallow-equal": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/shallow-equal/-/shallow-equal-1.2.1.tgz", diff --git a/horreum-web/package.json b/horreum-web/package.json index 09b5fa44f..8fdb285c2 100644 --- a/horreum-web/package.json +++ b/horreum-web/package.json @@ -31,8 +31,8 @@ "react-dom": "19.1.1", "react-markdown": "10.1.0", "react-redux": "9.2.0", - "react-router": "6.24.1", - "react-router-dom": "6.24.1", + "react-router": "7.9.1", + "react-router-dom": "7.9.1", "react-to-print": "3.1.1", "recharts": "3.1.2", "redux": "5.0.1", diff --git a/horreum-web/src/App.tsx b/horreum-web/src/App.tsx index 4189ec142..90edafd15 100644 --- a/horreum-web/src/App.tsx +++ b/horreum-web/src/App.tsx @@ -65,7 +65,22 @@ const router = createBrowserRouter( }/> }/> - ) + ), { + future: { + // loaders will no longer revalidate by default after an action throws/returns a Response with a 4xx/5xx status code + v7_skipActionErrorRevalidation: true, + // it is also useful if you are using lazy to load your route modules + v7_partialHydration: true, + // This normalizes formMethod fields as uppercase HTTP methods to align with the fetch() behavior + v7_normalizeFormMethod: true, + // The fetcher lifecycle is now based on when it returns to an idle state rather than when its owner component unmounts + v7_fetcherPersist: true, + // This uses React.useTransition instead of React.useState for Router state updates + v7_startTransition: true, + // Changes the relative path matching and linking for multi-segment splats paths like dashboard/* (vs. just *) + v7_relativeSplatPath: true, + }, + } ); export default function App() {