From 58900861e3539e30dac36c1ca5110adbd4bb88b0 Mon Sep 17 00:00:00 2001 From: eps1lon Date: Thu, 5 Dec 2024 20:47:22 +0100 Subject: [PATCH 1/2] feat: Add support for React 19 --- package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 8bfbeecc..711140d1 100644 --- a/package.json +++ b/package.json @@ -50,8 +50,8 @@ "devDependencies": { "@testing-library/dom": "^10.0.0", "@testing-library/jest-dom": "^5.11.6", - "@types/react": "^18.3.1", - "@types/react-dom": "^18.3.0", + "@types/react": "^19.0.0", + "@types/react-dom": "^19.0.0", "chalk": "^4.1.2", "dotenv-cli": "^4.0.0", "jest-diff": "^29.7.0", @@ -64,10 +64,10 @@ }, "peerDependencies": { "@testing-library/dom": "^10.0.0", - "@types/react": "^18.0.0", - "@types/react-dom": "^18.0.0", - "react": "^18.0.0", - "react-dom": "^18.0.0" + "@types/react": "^18.0.0 || ^19.0.0", + "@types/react-dom": "^18.0.0 || ^19.0.0", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@types/react": { From 75b260c94eda10df73e269a444f97e1162bef572 Mon Sep 17 00:00:00 2001 From: eps1lon Date: Thu, 5 Dec 2024 20:54:47 +0100 Subject: [PATCH 2/2] Fix types --- types/test.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/types/test.tsx b/types/test.tsx index 2b3dd7ca..67832b23 100644 --- a/types/test.tsx +++ b/types/test.tsx @@ -128,7 +128,11 @@ export function wrappedRender( ui: React.ReactNode, options?: pure.RenderOptions, ) { - const Wrapper = ({children}: {children: React.ReactNode}): JSX.Element => { + const Wrapper = ({ + children, + }: { + children: React.ReactNode + }): React.JSX.Element => { return
{children}
}