diff --git a/benefit-finder/package-lock.json b/benefit-finder/package-lock.json index d159fc905..134d3315c 100644 --- a/benefit-finder/package-lock.json +++ b/benefit-finder/package-lock.json @@ -11,8 +11,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "react-modal": "^3.16.1", - "react-router": "^6.26.2", - "react-router-dom": "^6.26.2" + "react-router": "^7.0.2" }, "devDependencies": { "@babel/preset-env": "^7.25.3", @@ -3420,15 +3419,6 @@ "node": ">=14" } }, - "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==", - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@rollup/pluginutils": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.3.tgz", @@ -4545,6 +4535,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", @@ -6575,6 +6571,15 @@ "dev": true, "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-compat": { "version": "3.39.0", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.39.0.tgz", @@ -17427,35 +17432,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.2", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.0.2.tgz", + "integrity": "sha512-m5AcPfTRUcjwmhBzOJGEl6Y7+Crqyju0+TgTQxoS4SO+BkWbhOrcfZNq6wSWdl2BBbJbsAoBUb8ZacOFT+/JlA==", "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==", - "license": "MIT", - "dependencies": { - "@remix-run/router": "1.21.0", - "react-router": "6.28.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/readable-stream": { @@ -18623,6 +18620,12 @@ "upper-case-first": "^2.0.2" } }, + "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", @@ -19883,6 +19886,12 @@ "node": "*" } }, + "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/tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", diff --git a/benefit-finder/package.json b/benefit-finder/package.json index fa86276f5..6aa8732b2 100644 --- a/benefit-finder/package.json +++ b/benefit-finder/package.json @@ -37,8 +37,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "react-modal": "^3.16.1", - "react-router": "^6.26.2", - "react-router-dom": "^6.26.2" + "react-router": "^7.0.2" }, "devDependencies": { "@babel/preset-env": "^7.25.3", diff --git a/benefit-finder/src/App/index.jsx b/benefit-finder/src/App/index.jsx index 055af2497..6d0db9b2f 100644 --- a/benefit-finder/src/App/index.jsx +++ b/benefit-finder/src/App/index.jsx @@ -1,5 +1,5 @@ import { useState, createContext, useEffect, useMemo } from 'react' -import { BrowserRouter, Routes, Route } from 'react-router-dom' +import { BrowserRouter, Routes, Route } from 'react-router' import { version } from '../../package.json' import { useResetElement } from '@hooks' import * as apiCalls from '@api/apiCalls' diff --git a/benefit-finder/src/Routes/Intro/__tests__/index.spec.jsx b/benefit-finder/src/Routes/Intro/__tests__/index.spec.jsx index 4c57dba3e..8b55475ec 100644 --- a/benefit-finder/src/Routes/Intro/__tests__/index.spec.jsx +++ b/benefit-finder/src/Routes/Intro/__tests__/index.spec.jsx @@ -1,5 +1,5 @@ import { render } from '@testing-library/react' -import { BrowserRouter } from 'react-router-dom' +import { BrowserRouter } from 'react-router' import Intro from '../index.jsx' import * as en from '@locales/en/en.json' import content from '@api/mock-data/current.js' diff --git a/benefit-finder/src/Routes/Intro/index.jsx b/benefit-finder/src/Routes/Intro/index.jsx index 799c92a54..7d9a901b4 100644 --- a/benefit-finder/src/Routes/Intro/index.jsx +++ b/benefit-finder/src/Routes/Intro/index.jsx @@ -1,5 +1,5 @@ import { useEffect, useContext } from 'react' -import { useNavigate, useLocation } from 'react-router-dom' +import { useNavigate, useLocation } from 'react-router' import { RouteContext } from '@/App' import { dataLayerUtils } from '@utils' import { useResetElement } from '@hooks' diff --git a/benefit-finder/src/Routes/LifeEventSection/__tests__/index.spec.jsx b/benefit-finder/src/Routes/LifeEventSection/__tests__/index.spec.jsx index 383cc9d38..6cfed6fc4 100644 --- a/benefit-finder/src/Routes/LifeEventSection/__tests__/index.spec.jsx +++ b/benefit-finder/src/Routes/LifeEventSection/__tests__/index.spec.jsx @@ -1,5 +1,5 @@ import { render, screen } from '@testing-library/react' -import { BrowserRouter } from 'react-router-dom' +import { BrowserRouter } from 'react-router' import { RouteContext } from '@/App' import { cleanString } from '@utils' import LifeEventSection from '../index.jsx' diff --git a/benefit-finder/src/Routes/LifeEventSection/index.jsx b/benefit-finder/src/Routes/LifeEventSection/index.jsx index 3b732fb4c..1272c0cac 100644 --- a/benefit-finder/src/Routes/LifeEventSection/index.jsx +++ b/benefit-finder/src/Routes/LifeEventSection/index.jsx @@ -1,6 +1,6 @@ import { useState, useEffect, useRef, useContext, Fragment } from 'react' import { RouteContext } from '@/App' -import { useNavigate, useLocation } from 'react-router-dom' +import { useNavigate, useLocation } from 'react-router' import PropTypes from 'prop-types' import { dateInputValidation, diff --git a/benefit-finder/src/Routes/ResultsView/__tests__/index.spec.jsx b/benefit-finder/src/Routes/ResultsView/__tests__/index.spec.jsx index 10b6fa63c..378c3fdd8 100644 --- a/benefit-finder/src/Routes/ResultsView/__tests__/index.spec.jsx +++ b/benefit-finder/src/Routes/ResultsView/__tests__/index.spec.jsx @@ -1,5 +1,5 @@ import { render, screen } from '@testing-library/react' -import { BrowserRouter } from 'react-router-dom' +import { BrowserRouter } from 'react-router' import ResultsView from '../index.jsx' import * as apiCalls from '@api/apiCalls.js' import * as en from '@locales/en/en.json' diff --git a/benefit-finder/src/Routes/ResultsView/components/Results/__tests__/index.spec.jsx b/benefit-finder/src/Routes/ResultsView/components/Results/__tests__/index.spec.jsx index 2570c57af..36759327f 100644 --- a/benefit-finder/src/Routes/ResultsView/components/Results/__tests__/index.spec.jsx +++ b/benefit-finder/src/Routes/ResultsView/components/Results/__tests__/index.spec.jsx @@ -1,5 +1,5 @@ import { render } from '@testing-library/react' -import { BrowserRouter } from 'react-router-dom' +import { BrowserRouter } from 'react-router' import Results from '../index.jsx' import * as en from '@locales/en/en.json' diff --git a/benefit-finder/src/Routes/ResultsView/components/Results/index.jsx b/benefit-finder/src/Routes/ResultsView/components/Results/index.jsx index ddf9c8cf2..d8a8cb373 100644 --- a/benefit-finder/src/Routes/ResultsView/components/Results/index.jsx +++ b/benefit-finder/src/Routes/ResultsView/components/Results/index.jsx @@ -1,7 +1,7 @@ import { useContext } from 'react' import PropTypes from 'prop-types' import { RouteContext } from '@/App' -import { useNavigate } from 'react-router-dom' +import { useNavigate } from 'react-router' import { BenefitAccordionGroup, Button, diff --git a/benefit-finder/src/Routes/ResultsView/components/blocks/ZeroBenefitsHeading/__tests__/index.spec.jsx b/benefit-finder/src/Routes/ResultsView/components/blocks/ZeroBenefitsHeading/__tests__/index.spec.jsx index d89b2275d..498d93dde 100644 --- a/benefit-finder/src/Routes/ResultsView/components/blocks/ZeroBenefitsHeading/__tests__/index.spec.jsx +++ b/benefit-finder/src/Routes/ResultsView/components/blocks/ZeroBenefitsHeading/__tests__/index.spec.jsx @@ -1,5 +1,5 @@ import { render } from '@testing-library/react' -import { BrowserRouter } from 'react-router-dom' +import { BrowserRouter } from 'react-router' import ZeroBenefitsHeading from '../index.jsx' import * as en from '@locales/en/en.json' const { resultsView } = en diff --git a/benefit-finder/src/Routes/ResultsView/components/blocks/ZeroBenefitsHeading/index.jsx b/benefit-finder/src/Routes/ResultsView/components/blocks/ZeroBenefitsHeading/index.jsx index b1f767021..608a676b9 100644 --- a/benefit-finder/src/Routes/ResultsView/components/blocks/ZeroBenefitsHeading/index.jsx +++ b/benefit-finder/src/Routes/ResultsView/components/blocks/ZeroBenefitsHeading/index.jsx @@ -1,7 +1,7 @@ import PropTypes from 'prop-types' import { useContext } from 'react' import { RouteContext } from '@/App' -import { useNavigate } from 'react-router-dom' +import { useNavigate } from 'react-router' import { Button, Heading, StepBackButton } from '@components' import { createMarkup } from '@utils' diff --git a/benefit-finder/src/Routes/VerifySelectionsView/__tests__/index.spec.jsx b/benefit-finder/src/Routes/VerifySelectionsView/__tests__/index.spec.jsx index 86255194b..28a133023 100644 --- a/benefit-finder/src/Routes/VerifySelectionsView/__tests__/index.spec.jsx +++ b/benefit-finder/src/Routes/VerifySelectionsView/__tests__/index.spec.jsx @@ -1,5 +1,5 @@ import { render } from '@testing-library/react' -import { BrowserRouter } from 'react-router-dom' +import { BrowserRouter } from 'react-router' import VerifySelectionsView from '../index.jsx' import * as en from '@locales/en/en.json' diff --git a/benefit-finder/src/shared/components/RelativeBenefitList/__tests__/index.spec.jsx b/benefit-finder/src/shared/components/RelativeBenefitList/__tests__/index.spec.jsx index 910b3b248..47f63729d 100644 --- a/benefit-finder/src/shared/components/RelativeBenefitList/__tests__/index.spec.jsx +++ b/benefit-finder/src/shared/components/RelativeBenefitList/__tests__/index.spec.jsx @@ -32,7 +32,6 @@ describe('RelativeBenefitList', () => { expect(links[0].href).toContain(relativeBenefits[0].lifeEvent.lifeEventId) expect(links[1].href).toContain(relativeBenefits[1].lifeEvent.lifeEventId) // ensure the icons that contain values from the lifeEventId are in the dom - console.log(relativeBenefits[0].lifeEvent.lifeEventId) expect( screen.getByTestId( `benefit-finder-icon--${relativeBenefits[0].lifeEvent.lifeEventId}` diff --git a/benefit-finder/src/shared/components/StepIndicator/__tests__/index.spec.jsx b/benefit-finder/src/shared/components/StepIndicator/__tests__/index.spec.jsx index 7198af9e9..4d0c2039a 100644 --- a/benefit-finder/src/shared/components/StepIndicator/__tests__/index.spec.jsx +++ b/benefit-finder/src/shared/components/StepIndicator/__tests__/index.spec.jsx @@ -1,5 +1,5 @@ import { render } from '@testing-library/react' -import { BrowserRouter } from 'react-router-dom' +import { BrowserRouter } from 'react-router' import StepIndicator from '../index.jsx' import content from '@api/mock-data/current.js' // import * as en from '@locales/en/en.json'