From 8e29ec59e29f6c2c7a874d55c5a8029e4c245874 Mon Sep 17 00:00:00 2001 From: Cody Olsen <81981+stipsan@users.noreply.github.com> Date: Fri, 20 Dec 2024 16:40:30 +0100 Subject: [PATCH] fix: support react 19 type definitions (#8121) Co-authored-by: Carolina Gonzalez --- packages/@sanity/types/package.json | 7 +++++-- pnpm-lock.yaml | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/@sanity/types/package.json b/packages/@sanity/types/package.json index 5a038f975fb..fbb32269bdd 100644 --- a/packages/@sanity/types/package.json +++ b/packages/@sanity/types/package.json @@ -49,16 +49,19 @@ "watch": "pkg-utils watch" }, "dependencies": { - "@sanity/client": "^6.24.1", - "@types/react": "^18.3.5" + "@sanity/client": "^6.24.1" }, "devDependencies": { "@repo/package.config": "workspace:*", "@repo/test-config": "workspace:*", "@sanity/insert-menu": "1.0.16", + "@types/react": "^18.3.5", "@vitejs/plugin-react": "^4.3.4", "react": "^18.3.1", "rimraf": "^5.0.10", "vitest": "^2.1.8" + }, + "peerDependencies": { + "@types/react": "18 || 19" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 39e969778ce..6792f427b39 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1241,9 +1241,6 @@ importers: '@sanity/client': specifier: ^6.24.1 version: 6.24.1(debug@4.4.0) - '@types/react': - specifier: ^18.3.5 - version: 18.3.17 devDependencies: '@repo/package.config': specifier: workspace:* @@ -1254,6 +1251,9 @@ importers: '@sanity/insert-menu': specifier: 1.0.16 version: 1.0.16(@emotion/is-prop-valid@1.3.1)(@sanity/types@packages+@sanity+types)(react-dom@19.0.0-rc-f994737d14-20240522(react@18.3.1))(react-is@19.0.0-rc.1)(react@18.3.1)(styled-components@6.1.13(react-dom@19.0.0-rc-f994737d14-20240522(react@18.3.1))(react@18.3.1)) + '@types/react': + specifier: ^18.3.5 + version: 18.3.17 '@vitejs/plugin-react': specifier: ^4.3.4 version: 4.3.4(vite@6.0.3(@types/node@22.10.2)(terser@5.37.0)(yaml@2.6.1))