Skip to content

Commit 89c307e

Browse files
Bump react-router-dom from 6.26.2 to 7.1.5 (#166)
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: seladb <[email protected]>
1 parent 9fdb222 commit 89c307e

File tree

10 files changed

+52
-26
lines changed

10 files changed

+52
-26
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"react-github-btn": "^1.4.0",
3030
"react-plotly.js": "^2.6.0",
3131
"react-responsive": "^10.0.0",
32-
"react-router-dom": "^6.26.2",
32+
"react-router-dom": "^7.1.5",
3333
"react-scripts": "5.0.1",
3434
"typescript": "^5.7.2",
3535
"web-vitals": "^4.2.4",

src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22
import ReactGA from "react-ga";
3-
import { RouterProvider, createHashRouter } from "react-router-dom";
3+
import { RouterProvider, createHashRouter } from "react-router";
44
import MainPage from "./routes/MainPage";
55
import Preload from "./routes/Preload";
66
import ErrorPage from "./routes/ErrorPage";

src/components/MainContainer/MainContainer.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { ForecastInfo } from "../Forecast";
88

99
const mockLocation = jest.fn();
1010

11-
jest.mock("react-router-dom", () => ({
12-
...jest.requireActual("react-router-dom"),
11+
jest.mock("react-router", () => ({
12+
...jest.requireActual("react-router"),
1313
useLocation: () => {
1414
return mockLocation() ?? { state: null };
1515
},

src/components/MainContainer/MainContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import RepoStats from "../RepoStats";
1111
import URLBox from "../URLBox";
1212
import { Box, Stack } from "@mui/material";
1313
import { ForecastProps, NotEnoughDataError, calcForecast } from "../../utils/StargazerStats";
14-
import { useLocation } from "react-router-dom";
14+
import { useLocation } from "react-router";
1515
import { getRepoStargazerCount } from "../../utils/GitHubUtils";
1616
import { Forecast, ForecastInfo } from "../Forecast";
1717

src/routes/ErrorPage/ErrorPage.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { render, screen, fireEvent, waitFor } from "@testing-library/react";
22
import ErrorPage from "./ErrorPage";
3-
import { Outlet, RouterProvider, createMemoryRouter } from "react-router-dom";
3+
import { Outlet, RouterProvider, createMemoryRouter } from "react-router";
44
import { createTheme } from "@mui/material";
55
import { ThemeProvider } from "@mui/styles";
66

src/routes/ErrorPage/ErrorPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Button, Typography, Box, Grid } from "@mui/material";
22
import { Illustration } from "./Illustration";
33
import { createStyles, makeStyles } from "@mui/styles";
4-
import { Link } from "react-router-dom";
4+
import { Link } from "react-router";
55
import { Theme } from "@mui/material/styles";
66

77
const useStyles = makeStyles((theme: Theme) => {

src/routes/Preload/Preload.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ jest.mock("./RepoLoader", () => ({
3838
const mockNavigate = jest.fn();
3939
const mockLocation = jest.fn();
4040

41-
jest.mock("react-router-dom", () => ({
42-
...jest.requireActual("react-router-dom"),
41+
jest.mock("react-router", () => ({
42+
...jest.requireActual("react-router"),
4343
useNavigate: () => mockNavigate,
4444
useLocation: () => {
4545
return mockLocation() ?? { search: "" };

src/routes/Preload/Preload.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react";
2-
import { useNavigate, useLocation } from "react-router-dom";
2+
import { useNavigate, useLocation } from "react-router";
33
import { ProgressProvider } from "../../shared/ProgressContext";
44
import RepoLoader from "./RepoLoader";
55
import { RepoMetadata } from "./PreloadTypes";

src/setupTests.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,12 @@
33
// expect(element).toHaveTextContent(/react/i)
44
// learn more: https://github.com/testing-library/jest-dom
55
import "@testing-library/jest-dom";
6+
import { TextEncoder, TextDecoder } from "node:util";
7+
8+
if (!global.TextEncoder) {
9+
global.TextEncoder = TextEncoder;
10+
}
11+
12+
if (!global.TextDecoder) {
13+
global.TextDecoder = TextDecoder;
14+
}

yarn.lock

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2580,11 +2580,6 @@
25802580
resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.8.tgz#6b79032e760a0899cd4204710beede972a3a185f"
25812581
integrity sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==
25822582

2583-
"@remix-run/[email protected]":
2584-
version "1.19.2"
2585-
resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.19.2.tgz#0c896535473291cb41f152c180bedd5680a3b273"
2586-
integrity sha512-baiMx18+IMuD1yyvOGaHM9QrVUPGGG0jC+z+IPHnRJWUAUvaKuWKyE8gjDj2rzv3sz9zOGoRSPgeBVHRhZnBlA==
2587-
25882583
"@rollup/plugin-babel@^5.2.0":
25892584
version "5.3.1"
25902585
resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz#04bc0608f4aa4b2e4b1aebf284344d0f68fda283"
@@ -2929,6 +2924,11 @@
29292924
dependencies:
29302925
"@types/node" "*"
29312926

2927+
"@types/cookie@^0.6.0":
2928+
version "0.6.0"
2929+
resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.6.0.tgz#eac397f28bf1d6ae0ae081363eca2f425bedf0d5"
2930+
integrity sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==
2931+
29322932
"@types/css-mediaquery@^0.1.4":
29332933
version "0.1.4"
29342934
resolved "https://registry.yarnpkg.com/@types/css-mediaquery/-/css-mediaquery-0.1.4.tgz#8efbebbc0cebaf34c77db2b63892711e19143c63"
@@ -4813,6 +4813,11 @@ [email protected]:
48134813
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051"
48144814
integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==
48154815

4816+
cookie@^1.0.1:
4817+
version "1.0.2"
4818+
resolved "https://registry.yarnpkg.com/cookie/-/cookie-1.0.2.tgz#27360701532116bd3f1f9416929d176afe1e4610"
4819+
integrity sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==
4820+
48164821
core-js-compat@^3.25.1:
48174822
version "3.27.2"
48184823
resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.27.2.tgz#607c50ad6db8fd8326af0b2883ebb987be3786da"
@@ -11368,20 +11373,22 @@ react-responsive@^10.0.0:
1136811373
prop-types "^15.6.1"
1136911374
shallow-equal "^3.1.0"
1137011375

11371-
react-router-dom@^6.26.2:
11372-
version "6.26.2"
11373-
resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.26.2.tgz#a6e3b0cbd6bfd508e42b9342099d015a0ac59680"
11374-
integrity sha512-z7YkaEW0Dy35T3/QKPYB1LjMK2R1fxnHO8kWpUMTBdfVzZrWOiY9a7CtN8HqdWtDUWd5FY6Dl8HFsqVwH4uOtQ==
11376+
react-router-dom@^7.1.5:
11377+
version "7.1.5"
11378+
resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-7.1.5.tgz#6b706a5503c01d99c1af69336a7de2e21cadd339"
11379+
integrity sha512-/4f9+up0Qv92D3bB8iN5P1s3oHAepSGa9h5k6tpTFlixTTskJZwKGhJ6vRJ277tLD1zuaZTt95hyGWV1Z37csQ==
1137511380
dependencies:
11376-
"@remix-run/router" "1.19.2"
11377-
react-router "6.26.2"
11381+
react-router "7.1.5"
1137811382

11379-
react-router@6.26.2:
11380-
version "6.26.2"
11381-
resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.26.2.tgz#2f0a68999168954431cdc29dd36cec3b6fa44a7e"
11382-
integrity sha512-tvN1iuT03kHgOFnLPfLJ8V95eijteveqdOSk+srqfePtQvqCExB8eHOYnlilbOcyJyKnYkr1vJvf7YqotAJu1A==
11383+
react-router@7.1.5:
11384+
version "7.1.5"
11385+
resolved "https://registry.yarnpkg.com/react-router/-/react-router-7.1.5.tgz#c9e19d329d9ce2215fdae844ab6b023b911094db"
11386+
integrity sha512-8BUF+hZEU4/z/JD201yK6S+UYhsf58bzYIDq2NS1iGpwxSXDu7F+DeGSkIXMFBuHZB21FSiCzEcUb18cQNdRkA==
1138311387
dependencies:
11384-
"@remix-run/router" "1.19.2"
11388+
"@types/cookie" "^0.6.0"
11389+
cookie "^1.0.1"
11390+
set-cookie-parser "^2.6.0"
11391+
turbo-stream "2.4.0"
1138511392

1138611393
1138711394
version "5.0.1"
@@ -12118,6 +12125,11 @@ [email protected]:
1211812125
parseurl "~1.3.3"
1211912126
send "0.19.0"
1212012127

12128+
set-cookie-parser@^2.6.0:
12129+
version "2.7.1"
12130+
resolved "https://registry.yarnpkg.com/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz#3016f150072202dfbe90fadee053573cc89d2943"
12131+
integrity sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==
12132+
1212112133
set-function-length@^1.1.1:
1212212134
version "1.2.0"
1212312135
resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.0.tgz#2f81dc6c16c7059bda5ab7c82c11f03a515ed8e1"
@@ -13156,6 +13168,11 @@ tsutils@^3.21.0:
1315613168
dependencies:
1315713169
tslib "^1.8.1"
1315813170

13171+
13172+
version "2.4.0"
13173+
resolved "https://registry.yarnpkg.com/turbo-stream/-/turbo-stream-2.4.0.tgz#1e4fca6725e90fa14ac4adb782f2d3759a5695f0"
13174+
integrity sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==
13175+
1315913176
type-check@^0.4.0, type-check@~0.4.0:
1316013177
version "0.4.0"
1316113178
resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"

0 commit comments

Comments
 (0)