Skip to content

Commit e4f4a99

Browse files
author
Chetan Munegowda
committed
QPPA-10520: upgrade react and react-dom
1 parent 6cf0734 commit e4f4a99

File tree

7 files changed

+3931
-4231
lines changed

7 files changed

+3931
-4231
lines changed

package-lock.json

Lines changed: 3895 additions & 4205 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,35 +26,37 @@
2626
"url": "https://github.com/CMSgov/qpp-submissions-docs/issues"
2727
},
2828
"homepage": "https://cmsgov.github.io/qpp-submissions-docs",
29+
"overrides": {
30+
"react-day-picker": "^9.6.7"
31+
},
2932
"dependencies": {
30-
"@cmsgov/design-system": "11.0.0",
33+
"@cmsgov/design-system": "12.4.1",
3134
"@vitejs/plugin-react": "4.3.1",
32-
"@xzar90/react-router-hash-link": "6.0.4",
3335
"core-js": "3.36.0",
3436
"font-awesome": "4.7.0",
3537
"postcss": "8.4.35",
3638
"postcss-scss": "4.0.9",
37-
"react": "17.0.2",
39+
"react": "19.1.0",
3840
"react-code-blocks": "0.1.6",
39-
"react-dom": "17.0.2",
40-
"react-router-dom": "6.22.3",
41+
"react-dom": "19.1.0",
42+
"react-router-dom": "7.6.3",
4143
"react-router-hash-link": "2.4.3",
4244
"sass": "1.64.0",
4345
"typescript": "5.3.3",
44-
"vite": "5.4.8",
46+
"vite": "5.4.19",
4547
"vite-tsconfig-paths": "4.3.1"
4648
},
4749
"devDependencies": {
50+
"@emotion/is-prop-valid": "1.3.1",
4851
"@eslint/eslintrc": "3.1.0",
4952
"@eslint/js": "9.11.1",
50-
"@testing-library/jest-dom": "6.4.2",
51-
"@testing-library/react": "12.1.5",
52-
"@testing-library/user-event": "14.5.2",
53+
"@testing-library/jest-dom": "6.6.3",
54+
"@testing-library/react": "16.3.0",
55+
"@testing-library/user-event": "14.6.1",
5356
"@types/jest": "29.5.13",
5457
"@types/node": "^20.11.25",
55-
"@types/react": "^17.0.11",
56-
"@types/react-dom": "^18.0.4",
57-
"@types/react-router-dom": "5.3.3",
58+
"@types/react": "19.1.8",
59+
"@types/react-dom": "19.1.6",
5860
"@types/react-router-hash-link": "2.4.9",
5961
"@typescript-eslint/eslint-plugin": "8.7.0",
6062
"@typescript-eslint/parser": "8.7.0",

src/app/components/app.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { MemoryRouter } from 'react-router-dom';
1+
import { MemoryRouter } from 'react-router';
22
import {render, fireEvent } from '@testing-library/react';
33
import '@testing-library/jest-dom';
44

src/app/components/app.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useState } from 'react';
2-
import { Route, Routes } from 'react-router-dom';
2+
import { Route, Routes } from 'react-router';
33

44
import { combinedRoutes } from '../routes';
55

@@ -63,4 +63,4 @@ const App = () => {
6363
);
6464
};
6565

66-
export default App;
66+
export default App;

src/app/components/left-nav.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NavLink } from 'react-router-dom';
1+
import { NavLink } from 'react-router';
22

33
import Routes, { IPath } from '../routes';
44

src/index.tsx

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
1-
import './polyfills';
1+
// src/index.tsx
22

3-
import ReactDOM from 'react-dom';
4-
import { BrowserRouter as Router } from 'react-router-dom';
3+
import './polyfills';
4+
import { createRoot } from 'react-dom/client';
5+
import { BrowserRouter as Router } from 'react-router';
6+
import { StyleSheetManager } from 'styled-components';
7+
import isPropValid from '@emotion/is-prop-valid';
58

69
import App from './app/components/app';
7-
810
import './index.scss';
911
import envConfig from './envConfig';
1012

13+
const rootElement = document.getElementById('root');
14+
if (!rootElement) {
15+
throw new Error('Root element not found');
16+
}
1117

12-
ReactDOM.render(
13-
<Router basename={envConfig.baseUrl}>
14-
<App />,
15-
</Router>,
16-
document.getElementById('root')
18+
const root = createRoot(rootElement);
19+
root.render(
20+
<StyleSheetManager shouldForwardProp={prop => isPropValid(prop)}>
21+
<Router basename={envConfig.baseUrl}>
22+
<App />
23+
</Router>
24+
</StyleSheetManager>
1725
);

src/shared/link-to-id.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { HTMLAttributes } from 'react';
22

3-
import { HashLink } from '@xzar90/react-router-hash-link';
3+
import { HashLink } from 'react-router-hash-link';
44

55
export const LinkToId = ({ to, text, offset = '1', attrs }: { to: string, text: string, offset?: string, attrs?: HTMLAttributes<object> }) => {
66
return (

0 commit comments

Comments
 (0)