diff --git a/packages/frontend/__tests__/App.test.tsx b/packages/frontend/__tests__/App.test.tsx index 1d828ad00..879d5b8f6 100644 --- a/packages/frontend/__tests__/App.test.tsx +++ b/packages/frontend/__tests__/App.test.tsx @@ -1,6 +1,6 @@ import { render } from "@testing-library/react"; import { mocked } from "jest-mock"; -import { MemoryRouter } from "react-router-dom"; +import { MemoryRouter } from "react-router"; import * as swr from "swr"; import { App } from "../src/App"; diff --git a/packages/frontend/__tests__/components/AppNavigation.test.tsx b/packages/frontend/__tests__/components/AppNavigation.test.tsx index 92d6fae6f..e4eeea8a9 100644 --- a/packages/frontend/__tests__/components/AppNavigation.test.tsx +++ b/packages/frontend/__tests__/components/AppNavigation.test.tsx @@ -1,5 +1,5 @@ import { render } from "@testing-library/react"; -import { MemoryRouter } from "react-router-dom"; +import { MemoryRouter } from "react-router"; import { AppNavigation } from "../../src/components/AppNavigation"; diff --git a/packages/frontend/__tests__/components/Issue.test.tsx b/packages/frontend/__tests__/components/Issue.test.tsx index defdb599d..34236bee9 100644 --- a/packages/frontend/__tests__/components/Issue.test.tsx +++ b/packages/frontend/__tests__/components/Issue.test.tsx @@ -1,5 +1,5 @@ import { render } from "@testing-library/react"; -import { MemoryRouter } from "react-router-dom"; +import { MemoryRouter } from "react-router"; import { Issue } from "../../src/components/Issue"; import { getIssueWithProject } from "../../src/utils/getIssueWithProject"; diff --git a/packages/frontend/__tests__/components/IssuesList.test.tsx b/packages/frontend/__tests__/components/IssuesList.test.tsx index 9056a1693..5e4ce1f03 100644 --- a/packages/frontend/__tests__/components/IssuesList.test.tsx +++ b/packages/frontend/__tests__/components/IssuesList.test.tsx @@ -1,5 +1,5 @@ import { render } from "@testing-library/react"; -import { MemoryRouter } from "react-router-dom"; +import { MemoryRouter } from "react-router"; import { IssuesList } from "../../src/components/IssuesList"; import { testData } from "../testData"; diff --git a/packages/frontend/__tests__/components/Navigation.test.tsx b/packages/frontend/__tests__/components/Navigation.test.tsx index 69a9efec3..7d3d8cc46 100644 --- a/packages/frontend/__tests__/components/Navigation.test.tsx +++ b/packages/frontend/__tests__/components/Navigation.test.tsx @@ -1,5 +1,5 @@ import { render } from "@testing-library/react"; -import { MemoryRouter } from "react-router-dom"; +import { MemoryRouter } from "react-router"; import { Navigation } from "../../src/components/Navigation"; diff --git a/packages/frontend/__tests__/components/Project.test.tsx b/packages/frontend/__tests__/components/Project.test.tsx index 7b7fbef83..38fb00574 100644 --- a/packages/frontend/__tests__/components/Project.test.tsx +++ b/packages/frontend/__tests__/components/Project.test.tsx @@ -1,5 +1,5 @@ import { render } from "@testing-library/react"; -import { MemoryRouter } from "react-router-dom"; +import { MemoryRouter } from "react-router"; import { Project } from "../../src/components/Project"; import { testData } from "../testData"; diff --git a/packages/frontend/__tests__/components/ProjectLinks.test.tsx b/packages/frontend/__tests__/components/ProjectLinks.test.tsx index f540c7668..75598924f 100644 --- a/packages/frontend/__tests__/components/ProjectLinks.test.tsx +++ b/packages/frontend/__tests__/components/ProjectLinks.test.tsx @@ -1,5 +1,5 @@ import { render } from "@testing-library/react"; -import { MemoryRouter } from "react-router-dom"; +import { MemoryRouter } from "react-router"; import { ProjectLinks } from "../../src/components/ProjectLinks"; import { testData } from "../testData"; diff --git a/packages/frontend/__tests__/components/ScrollToTop.test.tsx b/packages/frontend/__tests__/components/ScrollToTop.test.tsx index c087589e6..b9d85584a 100644 --- a/packages/frontend/__tests__/components/ScrollToTop.test.tsx +++ b/packages/frontend/__tests__/components/ScrollToTop.test.tsx @@ -1,6 +1,6 @@ import { render } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; -import { Link, MemoryRouter, Route, Routes } from "react-router-dom"; +import { Link, MemoryRouter, Route, Routes } from "react-router"; import { ScrollToTop } from "../../src/components/ScrollToTop"; diff --git a/packages/frontend/__tests__/pages/IssueDetail.test.tsx b/packages/frontend/__tests__/pages/IssueDetail.test.tsx index f1aab5c14..3c00d4661 100644 --- a/packages/frontend/__tests__/pages/IssueDetail.test.tsx +++ b/packages/frontend/__tests__/pages/IssueDetail.test.tsx @@ -1,5 +1,5 @@ import { render } from "@testing-library/react"; -import { MemoryRouter, Route, Routes } from "react-router-dom"; +import { MemoryRouter, Route, Routes } from "react-router"; import { IssueDetail } from "../../src/pages/IssueDetail"; import { testData } from "../testData"; diff --git a/packages/frontend/__tests__/pages/IssuesList.test.tsx b/packages/frontend/__tests__/pages/IssuesList.test.tsx index a0be23f67..ffbf1a7a4 100644 --- a/packages/frontend/__tests__/pages/IssuesList.test.tsx +++ b/packages/frontend/__tests__/pages/IssuesList.test.tsx @@ -1,5 +1,5 @@ import { render } from "@testing-library/react"; -import { MemoryRouter } from "react-router-dom"; +import { MemoryRouter } from "react-router"; import { IssuesList } from "../../src/pages/IssuesList"; import { testData } from "../testData"; diff --git a/packages/frontend/__tests__/pages/ProjectDetail.test.tsx b/packages/frontend/__tests__/pages/ProjectDetail.test.tsx index 54586c43a..38617d94d 100644 --- a/packages/frontend/__tests__/pages/ProjectDetail.test.tsx +++ b/packages/frontend/__tests__/pages/ProjectDetail.test.tsx @@ -1,5 +1,5 @@ import { render } from "@testing-library/react"; -import { MemoryRouter, Route, Routes } from "react-router-dom"; +import { MemoryRouter, Route, Routes } from "react-router"; import { ProjectDetail } from "../../src/pages/ProjectDetail"; import { testData } from "../testData"; diff --git a/packages/frontend/__tests__/pages/ProjectsList.test.tsx b/packages/frontend/__tests__/pages/ProjectsList.test.tsx index cd48d9b91..d70db62d6 100644 --- a/packages/frontend/__tests__/pages/ProjectsList.test.tsx +++ b/packages/frontend/__tests__/pages/ProjectsList.test.tsx @@ -1,5 +1,5 @@ import { render } from "@testing-library/react"; -import { MemoryRouter } from "react-router-dom"; +import { MemoryRouter } from "react-router"; import { ProjectsList } from "../../src/pages/ProjectsList"; import { testData } from "../testData"; diff --git a/packages/frontend/package-lock.json b/packages/frontend/package-lock.json index 0fa88988a..e64dce772 100644 --- a/packages/frontend/package-lock.json +++ b/packages/frontend/package-lock.json @@ -14,7 +14,7 @@ "react-dom": "^18.3.1", "react-icons": "^5.2.1", "react-markdown": "^9.0.1", - "react-router-dom": "^6.28.0", + "react-router": "^7.0.1", "remark-gfm": "^4.0.0", "string-to-color": "^2.2.2", "swr": "^2.2.5" @@ -3258,14 +3258,6 @@ "url": "https://opencollective.com/unts" } }, - "node_modules/@remix-run/router": { - "version": "1.21.0", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.21.0.tgz", - "integrity": "sha512-xfSkCAchbdG5PnbrKqFWwia4Bi61nH+wm8wLEqfHDyp7Y3dZzgqS2itV8i4gAq9pC2HsTpwyBC6Ds8VHZ96JlA==", - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.22.4", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.4.tgz", @@ -3668,6 +3660,12 @@ "@babel/types": "^7.20.7" } }, + "node_modules/@types/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==", + "license": "MIT" + }, "node_modules/@types/debug": { "version": "4.1.12", "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", @@ -5078,6 +5076,15 @@ "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", "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-js": { "version": "3.38.1", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.38.1.tgz", @@ -10971,33 +10978,27 @@ } }, "node_modules/react-router": { - "version": "6.28.0", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.28.0.tgz", - "integrity": "sha512-HrYdIFqdrnhDw0PqG/AKjAqEqM7AvxCz0DQ4h2W8k6nqmc5uRBYDag0SBxx9iYz5G8gnuNVLzUe13wl9eAsXXg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.0.1.tgz", + "integrity": "sha512-WVAhv9oWCNsja5AkK6KLpXJDSJCQizOIyOd4vvB/+eHGbYx5vkhcmcmwWjQ9yqkRClogi+xjEg9fNEOd5EX/tw==", + "license": "MIT", "dependencies": { - "@remix-run/router": "1.21.0" + "@types/cookie": "^0.6.0", + "cookie": "^1.0.1", + "set-cookie-parser": "^2.6.0", + "turbo-stream": "2.4.0" }, "engines": { - "node": ">=14.0.0" + "node": ">=20.0.0" }, "peerDependencies": { - "react": ">=16.8" - } - }, - "node_modules/react-router-dom": { - "version": "6.28.0", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.28.0.tgz", - "integrity": "sha512-kQ7Unsl5YdyOltsPGl31zOjLrDv+m2VcIEcIHqYYD3Lp0UppLjrzcfJqDJwXxFw3TH/yvapbnUvPlAj7Kx5nbg==", - "dependencies": { - "@remix-run/router": "1.21.0", - "react-router": "6.28.0" + "react": ">=18", + "react-dom": ">=18" }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "react": ">=16.8", - "react-dom": ">=16.8" + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } } }, "node_modules/read-pkg": { @@ -11517,6 +11518,12 @@ "semver": "bin/semver.js" } }, + "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/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -12319,6 +12326,12 @@ "dev": true, "license": "0BSD" }, + "node_modules/turbo-stream": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/turbo-stream/-/turbo-stream-2.4.0.tgz", + "integrity": "sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==", + "license": "ISC" + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", diff --git a/packages/frontend/package.json b/packages/frontend/package.json index c96d85e91..73c2eed49 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -35,7 +35,7 @@ "react-dom": "^18.3.1", "react-icons": "^5.2.1", "react-markdown": "^9.0.1", - "react-router-dom": "^6.28.0", + "react-router": "^7.0.1", "remark-gfm": "^4.0.0", "string-to-color": "^2.2.2", "swr": "^2.2.5" diff --git a/packages/frontend/src/App.tsx b/packages/frontend/src/App.tsx index 2528a6945..c98d226d9 100644 --- a/packages/frontend/src/App.tsx +++ b/packages/frontend/src/App.tsx @@ -1,7 +1,7 @@ /** @jsxImportSource @emotion/react */ import type React from "react"; -import { Route, Routes } from "react-router-dom"; +import { Route, Routes } from "react-router"; import useSWR from "swr"; import type { ProjectListings } from "./interfaces/ProjectListings"; diff --git a/packages/frontend/src/components/ArticleBox.tsx b/packages/frontend/src/components/ArticleBox.tsx index 34adb5b05..48179389b 100644 --- a/packages/frontend/src/components/ArticleBox.tsx +++ b/packages/frontend/src/components/ArticleBox.tsx @@ -2,7 +2,7 @@ import type React from "react"; import styled from "@emotion/styled"; import ReactMarkdown from "react-markdown"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import remarkGfm from "remark-gfm"; import { ColoredTag } from "./ColoredTag"; diff --git a/packages/frontend/src/components/Container.tsx b/packages/frontend/src/components/Container.tsx index 93e2e5c53..a0ce7b3b0 100644 --- a/packages/frontend/src/components/Container.tsx +++ b/packages/frontend/src/components/Container.tsx @@ -2,7 +2,7 @@ import type React from "react"; import { Global } from "@emotion/react"; import styled from "@emotion/styled"; -import { Link, Outlet } from "react-router-dom"; +import { Link, Outlet } from "react-router"; import { globalStyles } from "../globalStyles"; import logo from "../images/logo.svg"; diff --git a/packages/frontend/src/components/IssuesList.tsx b/packages/frontend/src/components/IssuesList.tsx index 47d232fe6..b465eb673 100644 --- a/packages/frontend/src/components/IssuesList.tsx +++ b/packages/frontend/src/components/IssuesList.tsx @@ -3,7 +3,7 @@ import type React from "react"; import { css } from "@emotion/react"; import ReactMarkdown from "react-markdown"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import remarkGfm from "remark-gfm"; import type { Project } from "../interfaces/Project"; diff --git a/packages/frontend/src/components/Navigation.tsx b/packages/frontend/src/components/Navigation.tsx index d7562ecd5..dd501ff5c 100644 --- a/packages/frontend/src/components/Navigation.tsx +++ b/packages/frontend/src/components/Navigation.tsx @@ -1,7 +1,7 @@ import type React from "react"; import styled from "@emotion/styled"; -import { NavLink } from "react-router-dom"; +import { NavLink } from "react-router"; import { theme } from "../theme"; diff --git a/packages/frontend/src/components/ScrollToTop.tsx b/packages/frontend/src/components/ScrollToTop.tsx index 5cebac1e1..bb19c98cc 100644 --- a/packages/frontend/src/components/ScrollToTop.tsx +++ b/packages/frontend/src/components/ScrollToTop.tsx @@ -1,5 +1,5 @@ import { useEffect } from "react"; -import { useLocation } from "react-router-dom"; +import { useLocation } from "react-router"; export const ScrollToTop = (): null => { const location = useLocation(); diff --git a/packages/frontend/src/index.tsx b/packages/frontend/src/index.tsx index de296f931..dc8e1618c 100644 --- a/packages/frontend/src/index.tsx +++ b/packages/frontend/src/index.tsx @@ -1,6 +1,6 @@ import React from "react"; import { createRoot } from "react-dom/client"; -import { BrowserRouter as Router } from "react-router-dom"; +import { BrowserRouter as Router } from "react-router"; import { App } from "./App"; diff --git a/packages/frontend/src/pages/IssueDetail.tsx b/packages/frontend/src/pages/IssueDetail.tsx index d401ed4b0..96e8abc93 100644 --- a/packages/frontend/src/pages/IssueDetail.tsx +++ b/packages/frontend/src/pages/IssueDetail.tsx @@ -4,7 +4,7 @@ import type React from "react"; import { css } from "@emotion/react"; import { AiFillGithub } from "react-icons/ai"; import ReactMarkdown from "react-markdown"; -import { Link, useParams } from "react-router-dom"; +import { Link, useParams } from "react-router"; import remarkGfm from "remark-gfm"; import type { ProjectListings } from "../interfaces/ProjectListings"; diff --git a/packages/frontend/src/pages/ProjectDetail.tsx b/packages/frontend/src/pages/ProjectDetail.tsx index 25f6cc174..1e28d5661 100644 --- a/packages/frontend/src/pages/ProjectDetail.tsx +++ b/packages/frontend/src/pages/ProjectDetail.tsx @@ -3,7 +3,7 @@ import type React from "react"; import { css } from "@emotion/react"; import ReactMarkdown from "react-markdown"; -import { useParams } from "react-router-dom"; +import { useParams } from "react-router"; import remarkGfm from "remark-gfm"; import type { ProjectListings } from "../interfaces/ProjectListings";