From a4097a5f84c8d67d9774a55f4c73247d900e36d2 Mon Sep 17 00:00:00 2001 From: Arnei Date: Mon, 6 Jan 2025 10:52:41 +0100 Subject: [PATCH] Update react-router to 7.1.1 Updates the dependency "react-router-dom" to "react-router". --- package-lock.json | 99 +++++++++---------- package.json | 3 +- src/App.tsx | 2 +- src/components/About.tsx | 2 +- src/components/Footer.tsx | 2 +- src/components/Header.tsx | 2 +- src/components/configuration/Themes.tsx | 2 +- src/components/events/Events.tsx | 2 +- src/components/events/Series.tsx | 2 +- .../events/partials/SeriesTitleCell.tsx | 2 +- src/components/recordings/Recordings.tsx | 2 +- .../partials/RecordingsNameCell.tsx | 2 +- src/components/shared/MainNav.tsx | 2 +- src/components/statistics/Statistics.tsx | 2 +- src/components/systems/Jobs.tsx | 2 +- src/components/systems/Servers.tsx | 2 +- src/components/systems/Services.tsx | 2 +- src/components/users/Acls.tsx | 2 +- src/components/users/Groups.tsx | 2 +- src/components/users/Users.tsx | 2 +- 20 files changed, 63 insertions(+), 75 deletions(-) diff --git a/package-lock.json b/package-lock.json index a354922e28..abc71b180b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,6 @@ "@mui/x-date-pickers": "^7.23.1", "@reduxjs/toolkit": "^2.5.0", "@types/dompurify": "^3.0.5", - "@types/react-router-dom": "^5.3.3", "array-move": "^4.0.0", "axios": "^1.7.9", "bourbon": "^7.3.0", @@ -37,7 +36,7 @@ "react-i18next": "^15.4.0", "react-icons": "^5.3.0", "react-redux": "^9.2.0", - "react-router-dom": "^6.27.0", + "react-router": "^7.1.1", "react-select": "^5.8.0", "redux": "^5.0.1", "redux-persist": "^6.0.0", @@ -3389,14 +3388,6 @@ } } }, - "node_modules/@remix-run/router": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.20.0.tgz", - "integrity": "sha512-mUnk8rPJBI9loFDZ+YzPGdeniYK+FTmRD1TMCz7ev2SNIozyKKpnGgsxO34u6Z4z/t0ITuu7voi/AshfsGsgFg==", - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@rollup/pluginutils": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", @@ -4092,6 +4083,12 @@ "@swc/counter": "^0.1.3" } }, + "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/dompurify": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/@types/dompurify/-/dompurify-3.0.5.tgz", @@ -4106,11 +4103,6 @@ "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "dev": true }, - "node_modules/@types/history": { - "version": "4.7.11", - "resolved": "https://registry.npmjs.org/@types/history/-/history-4.7.11.tgz", - "integrity": "sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA==" - }, "node_modules/@types/hoist-non-react-statics": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", @@ -4184,25 +4176,6 @@ "@types/react": "*" } }, - "node_modules/@types/react-router": { - "version": "5.1.20", - "resolved": "https://registry.npmjs.org/@types/react-router/-/react-router-5.1.20.tgz", - "integrity": "sha512-jGjmu/ZqS7FjSH6owMcD5qpq19+1RS9DeVRqfl1FeBMxTDQAGwlMWOcs52NDoXaNKyG3d1cYQFMs9rCrb88o9Q==", - "dependencies": { - "@types/history": "^4.7.11", - "@types/react": "*" - } - }, - "node_modules/@types/react-router-dom": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.3.3.tgz", - "integrity": "sha512-kpqnYK4wcdm5UaWI3fLcELopqLrHgLqNsdpHauzlQktfkHL3npOSwtj1Uz9oKBAzs7lFtVkV8j83voAz2D8fhw==", - "dependencies": { - "@types/history": "^4.7.11", - "@types/react": "*", - "@types/react-router": "*" - } - }, "node_modules/@types/react-transition-group": { "version": "4.4.12", "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.12.tgz", @@ -5782,6 +5755,15 @@ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" }, + "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-compat": { "version": "3.37.1", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.37.1.tgz", @@ -7971,6 +7953,7 @@ "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" } ], + "license": "MIT", "dependencies": { "@babel/runtime": "^7.23.2" }, @@ -9402,33 +9385,27 @@ } }, "node_modules/react-router": { - "version": "6.27.0", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.27.0.tgz", - "integrity": "sha512-YA+HGZXz4jaAkVoYBE98VQl+nVzI+cVI2Oj/06F5ZM+0u3TgedN9Y9kmMRo2mnkSK2nCpNQn0DVob4HCsY/WLw==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.1.1.tgz", + "integrity": "sha512-39sXJkftkKWRZ2oJtHhCxmoCrBCULr/HAH4IT5DHlgu/Q0FCPV0S4Lx+abjDTx/74xoZzNYDYbOZWlJjruyuDQ==", + "license": "MIT", "dependencies": { - "@remix-run/router": "1.20.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.27.0", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.27.0.tgz", - "integrity": "sha512-+bvtFWMC0DgAFrfKXKG9Fc+BcXWRUO1aJIihbB79xaeq0v5UzfvnM5houGUm1Y461WVRcgAQ+Clh5rdb1eCx4g==", - "dependencies": { - "@remix-run/router": "1.20.0", - "react-router": "6.27.0" - }, - "engines": { - "node": ">=14.0.0" + "react": ">=18", + "react-dom": ">=18" }, - "peerDependencies": { - "react": ">=16.8", - "react-dom": ">=16.8" + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } } }, "node_modules/react-select": { @@ -9817,6 +9794,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", @@ -10345,6 +10328,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/package.json b/package.json index 279730675a..b27df24be2 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "@mui/x-date-pickers": "^7.23.1", "@reduxjs/toolkit": "^2.5.0", "@types/dompurify": "^3.0.5", - "@types/react-router-dom": "^5.3.3", "array-move": "^4.0.0", "axios": "^1.7.9", "bourbon": "^7.3.0", @@ -34,7 +33,7 @@ "react-i18next": "^15.4.0", "react-icons": "^5.3.0", "react-redux": "^9.2.0", - "react-router-dom": "^6.27.0", + "react-router": "^7.1.1", "react-select": "^5.8.0", "redux": "^5.0.1", "redux-persist": "^6.0.0", diff --git a/src/App.tsx b/src/App.tsx index 26742260bf..3acd3833e9 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,5 +1,5 @@ import React, { useEffect } from "react"; -import { HashRouter, Navigate, Route, Routes } from "react-router-dom"; +import { HashRouter, Navigate, Route, Routes } from "react-router"; import "./App.scss"; import Events from "./components/events/Events"; import Recordings from "./components/recordings/Recordings"; diff --git a/src/components/About.tsx b/src/components/About.tsx index 0fbe18e67e..6dc5c1f264 100644 --- a/src/components/About.tsx +++ b/src/components/About.tsx @@ -4,7 +4,7 @@ import NavBar from "./NavBar"; import Footer from "./Footer"; import MainNav from "./shared/MainNav"; import { useTranslation } from "react-i18next"; -import { Link, useLocation } from "react-router-dom"; +import { Link, useLocation } from "react-router"; import cn from "classnames"; import axios from 'axios'; import i18n from "../i18n/i18n"; diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 226d33f36e..40074a48f4 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -4,7 +4,7 @@ import { getUserInformation, } from "../selectors/userInfoSelectors"; import { useAppSelector } from "../store"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import { useTranslation } from "react-i18next"; import { Tooltip } from "./shared/Tooltip"; diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 6fc6a2a0e8..9ef6ec5ee3 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import i18n from "../i18n/i18n"; import languages from "../i18n/languages"; import opencastLogo from "../img/opencast-white.svg?url"; diff --git a/src/components/configuration/Themes.tsx b/src/components/configuration/Themes.tsx index fa4fab200c..28bb30321c 100644 --- a/src/components/configuration/Themes.tsx +++ b/src/components/configuration/Themes.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import MainNav from "../shared/MainNav"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import cn from "classnames"; import TableFilters from "../shared/TableFilters"; import Table from "../shared/Table"; diff --git a/src/components/events/Events.tsx b/src/components/events/Events.tsx index 0e1337a4f6..12a3528298 100644 --- a/src/components/events/Events.tsx +++ b/src/components/events/Events.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import cn from "classnames"; -import { Link, useLocation } from "react-router-dom"; +import { Link, useLocation } from "react-router"; import TableFilters from "../shared/TableFilters"; import MainNav from "../shared/MainNav"; import Stats from "../shared/Stats"; diff --git a/src/components/events/Series.tsx b/src/components/events/Series.tsx index 4dcce7f070..9152c24d4f 100644 --- a/src/components/events/Series.tsx +++ b/src/components/events/Series.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react"; import MainNav from "../shared/MainNav"; import { useTranslation } from "react-i18next"; import cn from "classnames"; -import { Link, useLocation } from "react-router-dom"; +import { Link, useLocation } from "react-router"; import TableFilters from "../shared/TableFilters"; import Table from "../shared/Table"; import Notifications from "../shared/Notifications"; diff --git a/src/components/events/partials/SeriesTitleCell.tsx b/src/components/events/partials/SeriesTitleCell.tsx index 27eeede05a..7b1b8fe3bc 100644 --- a/src/components/events/partials/SeriesTitleCell.tsx +++ b/src/components/events/partials/SeriesTitleCell.tsx @@ -2,7 +2,7 @@ import React from "react"; import { useTranslation } from "react-i18next"; import { loadEventsIntoTable } from "../../../thunks/tableThunks"; import { setSpecificEventFilter } from "../../../slices/tableFilterSlice"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import { useAppDispatch } from "../../../store"; import { Tooltip } from "../../shared/Tooltip"; import { Series } from "../../../slices/seriesSlice"; diff --git a/src/components/recordings/Recordings.tsx b/src/components/recordings/Recordings.tsx index fa8c11cb27..b004339195 100644 --- a/src/components/recordings/Recordings.tsx +++ b/src/components/recordings/Recordings.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from "react"; import MainNav from "../shared/MainNav"; import { useTranslation } from "react-i18next"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import cn from "classnames"; import TableFilters from "../shared/TableFilters"; import Table from "../shared/Table"; diff --git a/src/components/recordings/partials/RecordingsNameCell.tsx b/src/components/recordings/partials/RecordingsNameCell.tsx index 2b91e8e9db..113ad479dc 100644 --- a/src/components/recordings/partials/RecordingsNameCell.tsx +++ b/src/components/recordings/partials/RecordingsNameCell.tsx @@ -1,6 +1,6 @@ import React from "react"; import { useTranslation } from "react-i18next"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import { setSpecificEventFilter } from "../../../slices/tableFilterSlice"; import { loadEventsIntoTable } from "../../../thunks/tableThunks"; import { useAppDispatch } from "../../../store"; diff --git a/src/components/shared/MainNav.tsx b/src/components/shared/MainNav.tsx index e0d40ab02a..2207141cd8 100644 --- a/src/components/shared/MainNav.tsx +++ b/src/components/shared/MainNav.tsx @@ -1,6 +1,6 @@ import React from "react"; import { useTranslation } from "react-i18next"; -import { Link, useNavigate } from "react-router-dom"; +import { Link, useNavigate } from "react-router"; import { loadAclsIntoTable, loadEventsIntoTable, diff --git a/src/components/statistics/Statistics.tsx b/src/components/statistics/Statistics.tsx index 2d1b46dba8..9591f1f66f 100644 --- a/src/components/statistics/Statistics.tsx +++ b/src/components/statistics/Statistics.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from "react"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import { useTranslation } from "react-i18next"; import cn from "classnames"; import Header from "../Header"; diff --git a/src/components/systems/Jobs.tsx b/src/components/systems/Jobs.tsx index ea81b0afa0..5278ad93e1 100644 --- a/src/components/systems/Jobs.tsx +++ b/src/components/systems/Jobs.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from "react"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import { useTranslation } from "react-i18next"; import cn from "classnames"; import TableFilters from "../shared/TableFilters"; diff --git a/src/components/systems/Servers.tsx b/src/components/systems/Servers.tsx index dea50ec9a2..a5bb5ddbe9 100644 --- a/src/components/systems/Servers.tsx +++ b/src/components/systems/Servers.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import MainNav from "../shared/MainNav"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import cn from "classnames"; import TableFilters from "../shared/TableFilters"; import Table from "../shared/Table"; diff --git a/src/components/systems/Services.tsx b/src/components/systems/Services.tsx index 672561ef44..93dd7ef4ea 100644 --- a/src/components/systems/Services.tsx +++ b/src/components/systems/Services.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import cn from "classnames"; import TableFilters from "../shared/TableFilters"; import Table from "../shared/Table"; diff --git a/src/components/users/Acls.tsx b/src/components/users/Acls.tsx index e018947ae0..b6db16719c 100644 --- a/src/components/users/Acls.tsx +++ b/src/components/users/Acls.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import MainNav from "../shared/MainNav"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import cn from "classnames"; import TableFilters from "../shared/TableFilters"; import Table from "../shared/Table"; diff --git a/src/components/users/Groups.tsx b/src/components/users/Groups.tsx index b6e267309c..9dc6f25cdf 100644 --- a/src/components/users/Groups.tsx +++ b/src/components/users/Groups.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import MainNav from "../shared/MainNav"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import cn from "classnames"; import TableFilters from "../shared/TableFilters"; import Table from "../shared/Table"; diff --git a/src/components/users/Users.tsx b/src/components/users/Users.tsx index f3c1f8ff1e..2368105f72 100644 --- a/src/components/users/Users.tsx +++ b/src/components/users/Users.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; -import { Link } from "react-router-dom"; +import { Link } from "react-router"; import cn from "classnames"; import MainNav from "../shared/MainNav"; import TableFilters from "../shared/TableFilters";