From 0bb777557c7c5c04f7f508b88147894876016e20 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Mon, 16 Dec 2024 14:51:37 -0500 Subject: [PATCH 1/3] PXBF-1987-update-router-v7: opt into future browser route api features --- benefit-finder/src/App/index.jsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/benefit-finder/src/App/index.jsx b/benefit-finder/src/App/index.jsx index 055af249..24b9fb97 100644 --- a/benefit-finder/src/App/index.jsx +++ b/benefit-finder/src/App/index.jsx @@ -114,7 +114,13 @@ function App({ testAppContent, testQuery }) { data-testid="app" data-version={version} > - + Date: Mon, 16 Dec 2024 14:58:14 -0500 Subject: [PATCH 2/3] PXBF-1987-update-router-v7: update router to v7 --- benefit-finder/package-lock.json | 75 +++++++++++-------- benefit-finder/package.json | 3 +- benefit-finder/src/App/index.jsx | 10 +-- .../src/Routes/Intro/__tests__/index.spec.jsx | 2 +- benefit-finder/src/Routes/Intro/index.jsx | 2 +- .../LifeEventSection/__tests__/index.spec.jsx | 2 +- .../src/Routes/LifeEventSection/index.jsx | 2 +- .../ResultsView/__tests__/index.spec.jsx | 2 +- .../Results/__tests__/index.spec.jsx | 2 +- .../ResultsView/components/Results/index.jsx | 2 +- .../__tests__/index.spec.jsx | 2 +- .../blocks/ZeroBenefitsHeading/index.jsx | 2 +- .../__tests__/index.spec.jsx | 2 +- .../StepIndicator/__tests__/index.spec.jsx | 2 +- 14 files changed, 56 insertions(+), 54 deletions(-) diff --git a/benefit-finder/package-lock.json b/benefit-finder/package-lock.json index d159fc90..134d3315 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 fa86276f..6aa8732b 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 24b9fb97..6d0db9b2 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' @@ -114,13 +114,7 @@ function App({ testAppContent, testQuery }) { data-testid="app" data-version={version} > - + Date: Mon, 16 Dec 2024 14:59:46 -0500 Subject: [PATCH 3/3] PXBF-1987-update-router-v7: remove console log from spec --- .../components/RelativeBenefitList/__tests__/index.spec.jsx | 1 - 1 file changed, 1 deletion(-) 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 910b3b24..47f63729 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}`