Skip to content

Commit d1189b1

Browse files
Merge pull request #1702 from ral-facilities/react-18-#1445
React 18 #1445
2 parents 5309f80 + 18e4e72 commit d1189b1

File tree

192 files changed

+6471
-4859
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

192 files changed

+6471
-4859
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"husky": "8.0.1"
1010
},
1111
"resolutions": {
12-
"@types/react": "17.0.39",
12+
"@types/react": "18.0.33",
13+
"@types/react-dom": "18.0.11",
1314
"@typescript-eslint/eslint-plugin": "5.62.0",
1415
"@typescript-eslint/parser": "5.62.0"
1516
},

packages/datagateway-common/package.json

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@
1111
"@emotion/react": "11.11.1",
1212
"@emotion/styled": "11.11.0",
1313
"@mui/x-date-pickers": "6.11.2",
14+
"@tanstack/react-query": "4.36.1",
15+
"@tanstack/react-query-devtools": "4.36.1",
1416
"@types/lodash.debounce": "4.0.6",
1517
"axios": "1.8.3",
16-
"connected-react-router": "6.9.1",
1718
"date-fns": "2.30.0",
1819
"hex-to-rgba": "2.0.1",
1920
"history": "4.10.1",
2021
"i18next": "22.0.3",
2122
"lodash.debounce": "4.0.8",
2223
"loglevel": "1.9.1",
2324
"prettier": "2.8.0",
24-
"react-draggable": "4.4.3",
25+
"react-draggable": "4.4.5",
2526
"react-i18next": "12.3.1",
26-
"react-query": "3.33.5",
2727
"react-redux": "8.1.3",
2828
"react-scripts": "5.0.0",
29-
"react-virtualized": "9.22.3",
29+
"react-virtualized": "9.22.5",
3030
"redux": "4.2.0",
3131
"redux-mock-store": "1.5.4",
3232
"redux-thunk": "2.4.1",
@@ -37,21 +37,20 @@
3737
"peerDependencies": {
3838
"@mui/icons-material": ">= 5.5.0 < 6",
3939
"@mui/material": ">= 5.5.0 < 6",
40-
"react": ">= 17.0.2 < 18",
41-
"react-dom": ">= 17.0.2 < 18",
40+
"react": "^18.2.0",
41+
"react-dom": "^18.2.0",
4242
"react-router-dom": ">= 5.2.0 < 6"
4343
},
4444
"devDependencies": {
4545
"@babel/eslint-parser": "7.23.3",
4646
"@mui/icons-material": "5.11.0",
4747
"@mui/material": "5.11.0",
4848
"@testing-library/jest-dom": "6.4.1",
49-
"@testing-library/react": "12.1.3",
50-
"@testing-library/react-hooks": "8.0.1",
49+
"@testing-library/react": "14.0.0",
5150
"@testing-library/user-event": "14.5.2",
5251
"@types/jest": "29.5.2",
5352
"@types/node": "20.11.5",
54-
"@types/react": "17.0.39",
53+
"@types/react": "18.0.33",
5554
"@types/react-router-dom": "5.3.3",
5655
"@types/react-virtualized": "9.21.10",
5756
"@typescript-eslint/eslint-plugin": "5.62.0",
@@ -63,9 +62,9 @@
6362
"eslint-plugin-prettier": "4.2.1",
6463
"jest-fail-on-console": "3.1.1",
6564
"lint-staged": "13.3.0",
66-
"react": "17.0.2",
67-
"react-dom": "17.0.2",
68-
"react-router-dom": "5.3.0",
65+
"react": "18.2.0",
66+
"react-dom": "18.2.0",
67+
"react-router-dom": "5.3.4",
6968
"react-test-renderer": "17.0.2"
7069
},
7170
"scripts": {
@@ -103,7 +102,7 @@
103102
},
104103
"jest": {
105104
"transformIgnorePatterns": [
106-
"node_modules/(?!axios)"
105+
"node_modules/(?!(axios|copy-anything|is-what))"
107106
],
108107
"collectCoverageFrom": [
109108
"src/**/*.{tsx,ts,js,jsx}",
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import React from 'react';
2-
import ReactDOM from 'react-dom';
2+
import ReactDOM from 'react-dom/client';
33
import App from './App';
44

55
it('renders without crashing', () => {
66
const div = document.createElement('div');
7-
ReactDOM.render(<App />, div);
8-
ReactDOM.unmountComponentAtNode(div);
7+
const root = ReactDOM.createRoot(div);
8+
root.render(<App />);
9+
root.unmount();
910
});

0 commit comments

Comments
 (0)