Skip to content

Commit ffd45c5

Browse files
authored
chore(deps): upgrade to react 18 and styled-components 6 (#4334)
* chore(deps): upgrade to react 18 * fix: styled * chore: regen snapshots
1 parent b427371 commit ffd45c5

34 files changed

+447
-1315
lines changed

package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,18 @@
4444
"homepage": "https://github.com/weaveworks/weave-gitops#readme",
4545
"peerDependencies": {
4646
"lodash": "^4.17.21",
47-
"react": "^17.0.2",
48-
"react-dom": "^17.0.2",
47+
"react": "^18.0.0",
48+
"react-dom": "^18.0.0",
4949
"react-toastify": "^7.0.4",
50-
"styled-components": "^5.3.0"
50+
"styled-components": "^6.1.13"
5151
},
5252
"dependencies": {
5353
"@emotion/react": "^11.14.0",
5454
"@emotion/styled": "^11.14.0",
5555
"@mui/icons-material": "^6.3.0",
5656
"@mui/lab": "^6.0.0-beta.21",
5757
"@mui/material": "^6.3.0",
58+
"@types/styled-components": "^5.1.34",
5859
"ansi-styles": "^6.2.1",
5960
"commander": "^11.0.0",
6061
"cross-spawn": "^7.0.5",
@@ -70,17 +71,17 @@
7071
"mnemonic-browser": "^0.0.1",
7172
"postcss": "^8.4.31",
7273
"query-string": "^4.3.4",
73-
"react": "^17.0.2",
74-
"react-dom": "^17.0.2",
75-
"react-is": "^19.0.0",
74+
"react": "^18.0.0",
75+
"react-dom": "^18.0.0",
76+
"react-is": "^18.0.0",
7677
"react-lottie-player": "^1.4.3",
7778
"react-markdown": "^8.0.7",
78-
"react-query": "^3.34.7",
79+
"react-query": "^3.39.3",
7980
"react-router-dom": "^5.2.0",
8081
"react-syntax-highlighter": "^15.5.0",
8182
"react-toastify": "^9.1.2",
8283
"remark-gfm": "^3.0.1",
83-
"styled-components": "^5.3.0",
84+
"styled-components": "^6.1.13",
8485
"yaml": "^2.2.2"
8586
},
8687
"devDependencies": {
@@ -92,17 +93,16 @@
9293
"@parcel/optimizer-data-url": "^2.8.3",
9394
"@parcel/transformer-inline-string": "^2.8.3",
9495
"@parcel/transformer-typescript-tsc": "^2.8.3",
96+
"@testing-library/dom": "^10.4.0",
9597
"@testing-library/jest-dom": "^5.12.0",
96-
"@testing-library/react": "^11.2.7",
97-
"@testing-library/react-hooks": "^6.0.0",
98+
"@testing-library/react": "^16.1.0",
99+
"@testing-library/react-hooks": "^7.0.0",
98100
"@types/jest": "^29.5.14",
99101
"@types/lodash": "^4.14.165",
100102
"@types/luxon": "^1.26.5",
101-
"@types/react": "^17.0.6",
102-
"@types/react-dom": "^17.0.5",
103-
"@types/react-is": "^19",
104-
"@types/react-router-dom": "^5.1.6",
105-
"@types/styled-components": "^5.1.9",
103+
"@types/react": "^18.0.0",
104+
"@types/react-dom": "^18.0.0",
105+
"@types/react-is": "^18",
106106
"@typescript-eslint/eslint-plugin": "^6.6.0",
107107
"@typescript-eslint/parser": "^6.6.0",
108108
"babel-jest": "^29.7.0",
@@ -119,7 +119,7 @@
119119
"parcel": "^2.13.3",
120120
"prettier": "^2.6.2",
121121
"process": "^0.11.10",
122-
"react-test-renderer": "^17.0.2",
122+
"react-test-renderer": "^18.0.0",
123123
"ts-jest": "^29.2.5",
124124
"typescript": "^5.2.2",
125125
"yarn-audit-fix": "^10.0.1"

ui/components/Breadcrumbs.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export interface Breadcrumb {
1717
url?: string;
1818
}
1919
interface Props {
20+
className?: string;
2021
path: Breadcrumb[];
2122
}
2223
export const Breadcrumbs = ({ path = [] }: Props) => {

ui/components/ClusterDashboardLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ function ClusterDashboardLink({ clusterName }: { clusterName: string }) {
1414

1515
return <Text>{clusterName}</Text>;
1616
}
17-
export default styled(ClusterDashboardLink).attrs({
17+
export default styled(ClusterDashboardLink).attrs<{ className?: string }>({
1818
className: ClusterDashboardLink.name,
1919
})``;

ui/components/DataTable/__tests__/DataTable.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { fireEvent, render, screen } from "@testing-library/react";
1+
import { screen } from "@testing-library/dom";
2+
import { fireEvent, render } from "@testing-library/react";
23
import "jest-styled-components";
34
import React from "react";
45
import renderer from "react-test-renderer";

ui/components/DataTable/__tests__/DataTableFilters.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { fireEvent, render, screen } from "@testing-library/react";
1+
import { screen } from "@testing-library/dom";
2+
import { fireEvent, render } from "@testing-library/react";
23
import "jest-styled-components";
34
import _ from "lodash";
45
import React from "react";

0 commit comments

Comments
 (0)