Skip to content

Commit

Permalink
Bump react-router-dom from 6.26.2 to 7.1.5 (#166)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
dependabot[bot] and seladb authored Feb 3, 2025
1 parent 9fdb222 commit 89c307e
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 26 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"react-github-btn": "^1.4.0",
"react-plotly.js": "^2.6.0",
"react-responsive": "^10.0.0",
"react-router-dom": "^6.26.2",
"react-router-dom": "^7.1.5",
"react-scripts": "5.0.1",
"typescript": "^5.7.2",
"web-vitals": "^4.2.4",
Expand Down
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import ReactGA from "react-ga";
import { RouterProvider, createHashRouter } from "react-router-dom";
import { RouterProvider, createHashRouter } from "react-router";
import MainPage from "./routes/MainPage";
import Preload from "./routes/Preload";
import ErrorPage from "./routes/ErrorPage";
Expand Down
4 changes: 2 additions & 2 deletions src/components/MainContainer/MainContainer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { ForecastInfo } from "../Forecast";

const mockLocation = jest.fn();

jest.mock("react-router-dom", () => ({
...jest.requireActual("react-router-dom"),
jest.mock("react-router", () => ({
...jest.requireActual("react-router"),
useLocation: () => {
return mockLocation() ?? { state: null };
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/MainContainer/MainContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import RepoStats from "../RepoStats";
import URLBox from "../URLBox";
import { Box, Stack } from "@mui/material";
import { ForecastProps, NotEnoughDataError, calcForecast } from "../../utils/StargazerStats";
import { useLocation } from "react-router-dom";
import { useLocation } from "react-router";
import { getRepoStargazerCount } from "../../utils/GitHubUtils";
import { Forecast, ForecastInfo } from "../Forecast";

Expand Down
2 changes: 1 addition & 1 deletion src/routes/ErrorPage/ErrorPage.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render, screen, fireEvent, waitFor } from "@testing-library/react";
import ErrorPage from "./ErrorPage";
import { Outlet, RouterProvider, createMemoryRouter } from "react-router-dom";
import { Outlet, RouterProvider, createMemoryRouter } from "react-router";
import { createTheme } from "@mui/material";
import { ThemeProvider } from "@mui/styles";

Expand Down
2 changes: 1 addition & 1 deletion src/routes/ErrorPage/ErrorPage.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Button, Typography, Box, Grid } from "@mui/material";
import { Illustration } from "./Illustration";
import { createStyles, makeStyles } from "@mui/styles";
import { Link } from "react-router-dom";
import { Link } from "react-router";
import { Theme } from "@mui/material/styles";

const useStyles = makeStyles((theme: Theme) => {
Expand Down
4 changes: 2 additions & 2 deletions src/routes/Preload/Preload.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jest.mock("./RepoLoader", () => ({
const mockNavigate = jest.fn();
const mockLocation = jest.fn();

jest.mock("react-router-dom", () => ({
...jest.requireActual("react-router-dom"),
jest.mock("react-router", () => ({
...jest.requireActual("react-router"),
useNavigate: () => mockNavigate,
useLocation: () => {
return mockLocation() ?? { search: "" };
Expand Down
2 changes: 1 addition & 1 deletion src/routes/Preload/Preload.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { useNavigate, useLocation } from "react-router-dom";
import { useNavigate, useLocation } from "react-router";
import { ProgressProvider } from "../../shared/ProgressContext";
import RepoLoader from "./RepoLoader";
import { RepoMetadata } from "./PreloadTypes";
Expand Down
9 changes: 9 additions & 0 deletions src/setupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,12 @@
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import "@testing-library/jest-dom";
import { TextEncoder, TextDecoder } from "node:util";

if (!global.TextEncoder) {
global.TextEncoder = TextEncoder;
}

if (!global.TextDecoder) {
global.TextDecoder = TextDecoder;
}
49 changes: 33 additions & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2580,11 +2580,6 @@
resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.8.tgz#6b79032e760a0899cd4204710beede972a3a185f"
integrity sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==

"@remix-run/[email protected]":
version "1.19.2"
resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.19.2.tgz#0c896535473291cb41f152c180bedd5680a3b273"
integrity sha512-baiMx18+IMuD1yyvOGaHM9QrVUPGGG0jC+z+IPHnRJWUAUvaKuWKyE8gjDj2rzv3sz9zOGoRSPgeBVHRhZnBlA==

"@rollup/plugin-babel@^5.2.0":
version "5.3.1"
resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz#04bc0608f4aa4b2e4b1aebf284344d0f68fda283"
Expand Down Expand Up @@ -2929,6 +2924,11 @@
dependencies:
"@types/node" "*"

"@types/cookie@^0.6.0":
version "0.6.0"
resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.6.0.tgz#eac397f28bf1d6ae0ae081363eca2f425bedf0d5"
integrity sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==

"@types/css-mediaquery@^0.1.4":
version "0.1.4"
resolved "https://registry.yarnpkg.com/@types/css-mediaquery/-/css-mediaquery-0.1.4.tgz#8efbebbc0cebaf34c77db2b63892711e19143c63"
Expand Down Expand Up @@ -4813,6 +4813,11 @@ [email protected]:
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051"
integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==

cookie@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/cookie/-/cookie-1.0.2.tgz#27360701532116bd3f1f9416929d176afe1e4610"
integrity sha512-9Kr/j4O16ISv8zBBhJoi4bXOYNTkFLOqSL3UDB0njXxCXNezjeyVrJyGOWtgfs/q2km1gwBcfH8q1yEGoMYunA==

core-js-compat@^3.25.1:
version "3.27.2"
resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.27.2.tgz#607c50ad6db8fd8326af0b2883ebb987be3786da"
Expand Down Expand Up @@ -11368,20 +11373,22 @@ react-responsive@^10.0.0:
prop-types "^15.6.1"
shallow-equal "^3.1.0"

react-router-dom@^6.26.2:
version "6.26.2"
resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.26.2.tgz#a6e3b0cbd6bfd508e42b9342099d015a0ac59680"
integrity sha512-z7YkaEW0Dy35T3/QKPYB1LjMK2R1fxnHO8kWpUMTBdfVzZrWOiY9a7CtN8HqdWtDUWd5FY6Dl8HFsqVwH4uOtQ==
react-router-dom@^7.1.5:
version "7.1.5"
resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-7.1.5.tgz#6b706a5503c01d99c1af69336a7de2e21cadd339"
integrity sha512-/4f9+up0Qv92D3bB8iN5P1s3oHAepSGa9h5k6tpTFlixTTskJZwKGhJ6vRJ277tLD1zuaZTt95hyGWV1Z37csQ==
dependencies:
"@remix-run/router" "1.19.2"
react-router "6.26.2"
react-router "7.1.5"

react-router@6.26.2:
version "6.26.2"
resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.26.2.tgz#2f0a68999168954431cdc29dd36cec3b6fa44a7e"
integrity sha512-tvN1iuT03kHgOFnLPfLJ8V95eijteveqdOSk+srqfePtQvqCExB8eHOYnlilbOcyJyKnYkr1vJvf7YqotAJu1A==
react-router@7.1.5:
version "7.1.5"
resolved "https://registry.yarnpkg.com/react-router/-/react-router-7.1.5.tgz#c9e19d329d9ce2215fdae844ab6b023b911094db"
integrity sha512-8BUF+hZEU4/z/JD201yK6S+UYhsf58bzYIDq2NS1iGpwxSXDu7F+DeGSkIXMFBuHZB21FSiCzEcUb18cQNdRkA==
dependencies:
"@remix-run/router" "1.19.2"
"@types/cookie" "^0.6.0"
cookie "^1.0.1"
set-cookie-parser "^2.6.0"
turbo-stream "2.4.0"

[email protected]:
version "5.0.1"
Expand Down Expand Up @@ -12118,6 +12125,11 @@ [email protected]:
parseurl "~1.3.3"
send "0.19.0"

set-cookie-parser@^2.6.0:
version "2.7.1"
resolved "https://registry.yarnpkg.com/set-cookie-parser/-/set-cookie-parser-2.7.1.tgz#3016f150072202dfbe90fadee053573cc89d2943"
integrity sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==

set-function-length@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.0.tgz#2f81dc6c16c7059bda5ab7c82c11f03a515ed8e1"
Expand Down Expand Up @@ -13156,6 +13168,11 @@ tsutils@^3.21.0:
dependencies:
tslib "^1.8.1"

[email protected]:
version "2.4.0"
resolved "https://registry.yarnpkg.com/turbo-stream/-/turbo-stream-2.4.0.tgz#1e4fca6725e90fa14ac4adb782f2d3759a5695f0"
integrity sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==

type-check@^0.4.0, type-check@~0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"
Expand Down

0 comments on commit 89c307e

Please sign in to comment.