From ebfbe143b894f1ae550939de3141b88e8f4bfe2d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 03:01:58 -0800 Subject: [PATCH] pkg: Update react (#3298) * pkg: Update react * pkg: Update type packages too * internal: Update tests for react 19 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Nathaniel Tucker --- .circleci/config.yml | 2 + examples/benchmark/package.json | 4 +- examples/coin-app/package.json | 4 +- examples/github-app/package-lock.json | 93 ++++++------ examples/github-app/package.json | 10 +- examples/nextjs/package-lock.json | 40 ++--- examples/nextjs/package.json | 12 +- examples/todo-app/package-lock.json | 93 ++++++------ examples/todo-app/package.json | 10 +- package.json | 13 +- packages/img/package.json | 3 +- packages/react/package.json | 3 +- .../__tests__/integration-endpoint.web.tsx | 9 +- .../react/src/components/DataProvider.tsx | 5 +- .../__tests__/useController/expireAll.tsx | 3 +- .../hooks/__tests__/useController/fetch.tsx | 9 +- .../src/hooks/__tests__/useSuspense.web.tsx | 7 +- packages/ssr/package.json | 9 +- packages/test/package.json | 10 +- packages/use-enhanced-reducer/package.json | 2 +- website/package.json | 8 +- .../Playground/editor-types/react.d.ts | 50 +++--- yarn.lock | 143 ++++++++++-------- 23 files changed, 293 insertions(+), 249 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cbec7d45ad74..33838bcbb28c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -89,10 +89,12 @@ jobs: YARN_ENABLE_GLOBAL_CACHE=false yarn remove @react-navigation/native @react-navigation/native-stack react-native-screens YARN_ENABLE_GLOBAL_CACHE=false yarn workspace @data-client/react remove @react-navigation/native YARN_ENABLE_GLOBAL_CACHE=false yarn add --dev react@<< parameters.react-version >> react-dom@<< parameters.react-version >> react-test-renderer@<< parameters.react-version >> @testing-library/react@^12.0.0 @testing-library/react-hooks @react-navigation/native@^6.0.0 @react-navigation/native-stack@^6.0.0 react-native-screens@^3.0.0 + YARN_ENABLE_GLOBAL_CACHE=false yarn workspaces foreach -W --include @data-client/img --include @data-client/react --include @data-client/ssr --include @data-client/test --include @data-client/use-enhanced-reducer add --dev react@<< parameters.react-version >> react-dom@<< parameters.react-version >> react-test-renderer@<< parameters.react-version >> YARN_ENABLE_GLOBAL_CACHE=false yarn workspace @data-client/react add @react-navigation/native@^6.0.0 YARN_ENABLE_GLOBAL_CACHE=false yarn workspace @data-client/test add @testing-library/react@^12.0.0 elif [ "<< parameters.react-version >>" == "^18" ]; then YARN_ENABLE_GLOBAL_CACHE=false yarn add --dev react@<< parameters.react-version >> react-dom@<< parameters.react-version >> react-test-renderer@<< parameters.react-version >> + YARN_ENABLE_GLOBAL_CACHE=false yarn workspaces foreach -W --include @data-client/img --include @data-client/react --include @data-client/ssr --include @data-client/test --include @data-client/use-enhanced-reducer add --dev react@<< parameters.react-version >> react-dom@<< parameters.react-version >> react-test-renderer@<< parameters.react-version >> fi - run: command: | diff --git a/examples/benchmark/package.json b/examples/benchmark/package.json index 2faa5037e344..7dea68ece984 100644 --- a/examples/benchmark/package.json +++ b/examples/benchmark/package.json @@ -22,7 +22,7 @@ "@data-client/normalizr": "workspace:^", "benchmark": "^2.1.4", "normalizr": "^3.6.2", - "react": "^19.0.0-rc.1" + "react": "^19.0.0" }, "devDependencies": { "@anansi/webpack-config": "^20.0.0", @@ -30,7 +30,7 @@ "@babel/node": "7.26.0", "@types/babel__core": "^7", "@types/benchmark": "2.1.5", - "@types/react": "npm:types-react@19.0.0-rc.1", + "@types/react": "19.0.0", "webpack": "^5.76.2", "webpack-cli": "^5.1.4" } diff --git a/examples/coin-app/package.json b/examples/coin-app/package.json index 9552ee5087e5..e22851e98fb0 100644 --- a/examples/coin-app/package.json +++ b/examples/coin-app/package.json @@ -47,8 +47,8 @@ "@data-client/rest": "^0.14.0", "d3": "^7.9.0", "history": "*", - "react": "^19.0.0-rc.1", - "react-dom": "^19.0.0-rc.1" + "react": "^19.0.0", + "react-dom": "^19.0.0" }, "main": "src/index.ts", "types": "src/index.ts", diff --git a/examples/github-app/package-lock.json b/examples/github-app/package-lock.json index 19153112981a..79d3e189b829 100644 --- a/examples/github-app/package-lock.json +++ b/examples/github-app/package-lock.json @@ -17,8 +17,8 @@ "@js-temporal/polyfill": "^0.4.4", "antd": "5.22.3", "parse-link-header": "^2.0.0", - "react": "19.0.0-rc.1", - "react-dom": "19.0.0-rc.1", + "react": "19.0.0", + "react-dom": "19.0.0", "react-error-boundary": "^4.0.0", "react-markdown": "9.0.1", "rehype-highlight": "7.0.1", @@ -37,10 +37,10 @@ "@linaria/shaker": "5.0.3", "@types/lodash": "4.14.192", "@types/parse-link-header": "^2.0.0", - "@types/react": "npm:types-react@19.0.0-rc.1", - "@types/react-dom": "npm:types-react-dom@19.0.0", + "@types/react": "19.0.0", + "@types/react-dom": "19.0.0", "@types/uuid": "^10.0.0", - "react-refresh": "0.14.2", + "react-refresh": "0.16.0", "serve": "14.2.4", "webpack": "5.96.1", "webpack-cli": "5.1.4", @@ -4769,10 +4769,9 @@ "license": "MIT" }, "node_modules/@types/react": { - "name": "types-react", - "version": "19.0.0-rc.1", - "resolved": "https://registry.npmjs.org/types-react/-/types-react-19.0.0-rc.1.tgz", - "integrity": "sha512-RshndUfqTW6K3STLPis8BtAYCGOkMbtvYsi90gmVNDZBXUyUc5juf2PE9LfS/JmOlUIRO8cWTS/1MTnmhjDqyQ==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.0.0.tgz", + "integrity": "sha512-MY3oPudxvMYyesqs/kW1Bh8y9VqSmf+tzqw3ae8a9DZW68pUe3zAdHeI1jc6iAysuRdACnVknHP8AhwD4/dxtg==", "dev": true, "dependencies": { "csstype": "^3.0.2" @@ -7104,9 +7103,9 @@ "dev": true }, "node_modules/cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", "dev": true, "engines": { "node": ">= 0.6" @@ -7240,11 +7239,10 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, - "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -8426,11 +8424,10 @@ "license": "ISC" }, "node_modules/elliptic": { - "version": "6.5.7", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.7.tgz", - "integrity": "sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==", + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", "dev": true, - "license": "MIT", "dependencies": { "bn.js": "^4.11.9", "brorand": "^1.1.0", @@ -8725,9 +8722,9 @@ } }, "node_modules/express": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz", - "integrity": "sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==", + "version": "4.21.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", + "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", "dev": true, "dependencies": { "accepts": "~1.3.8", @@ -8735,7 +8732,7 @@ "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.6.0", + "cookie": "0.7.1", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -9935,11 +9932,10 @@ } }, "node_modules/http-proxy-middleware": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", - "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.7.tgz", + "integrity": "sha512-fgVY8AV7qU7z/MmXJ/rxwbrtQH4jBQ9m7kp3llF0liB7glmFeVZFBepQb32T3y8n8k2+AEYuMPCpinYW+/CuRA==", "dev": true, - "license": "MIT", "dependencies": { "@types/http-proxy": "^1.17.8", "http-proxy": "^1.18.1", @@ -11667,13 +11663,12 @@ ] }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, - "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -14988,9 +14983,10 @@ } }, "node_modules/react": { - "version": "19.0.0-rc.1", - "resolved": "https://registry.npmjs.org/react/-/react-19.0.0-rc.1.tgz", - "integrity": "sha512-NZKln+uyPuyHchzP07I6GGYFxdAoaKhehgpCa3ltJGzwE31OYumLeshGaitA1R/fS5d9D2qpZVwTFAr6zCLM9w==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react/-/react-19.0.0.tgz", + "integrity": "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -15049,14 +15045,15 @@ "license": "MIT" }, "node_modules/react-dom": { - "version": "19.0.0-rc.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0-rc.1.tgz", - "integrity": "sha512-k8MfDX+4G+eaa1cXXI9QF4d+pQtYol3nx8vauqRWUEOPqC7NQn2qmEqUsLoSd28rrZUL+R3T2VC+kZ2Hyx1geQ==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0.tgz", + "integrity": "sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==", + "license": "MIT", "dependencies": { - "scheduler": "0.25.0-rc.1" + "scheduler": "^0.25.0" }, "peerDependencies": { - "react": "19.0.0-rc.1" + "react": "^19.0.0" } }, "node_modules/react-error-boundary": { @@ -15119,10 +15116,11 @@ } }, "node_modules/react-refresh": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz", - "integrity": "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==", + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.16.0.tgz", + "integrity": "sha512-FPvF2XxTSikpJxcr+bHut2H4gJ17+18Uy20D5/F+SKzFap62R3cM5wH6b8WN3LyGSYeQilLEcJcR1fjBSI2S1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -15657,9 +15655,10 @@ } }, "node_modules/scheduler": { - "version": "0.25.0-rc.1", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0-rc.1.tgz", - "integrity": "sha512-fVinv2lXqYpKConAMdergOl5owd0rY1O4P/QTe0aWKCqGtu7VsCt1iqQFxSJtqK4Lci/upVSBpGwVC7eWcuS9Q==" + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0.tgz", + "integrity": "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==", + "license": "MIT" }, "node_modules/schema-utils": { "version": "3.3.0", diff --git a/examples/github-app/package.json b/examples/github-app/package.json index 0c44e3db8db9..a397a86a162f 100644 --- a/examples/github-app/package.json +++ b/examples/github-app/package.json @@ -35,10 +35,10 @@ "@linaria/shaker": "5.0.3", "@types/lodash": "4.14.192", "@types/parse-link-header": "^2.0.0", - "@types/react": "npm:types-react@19.0.0-rc.1", - "@types/react-dom": "npm:types-react-dom@19.0.0", + "@types/react": "19.0.0", + "@types/react-dom": "19.0.0", "@types/uuid": "^10.0.0", - "react-refresh": "0.14.2", + "react-refresh": "0.16.0", "serve": "14.2.4", "webpack": "5.96.1", "webpack-cli": "5.1.4", @@ -53,8 +53,8 @@ "@js-temporal/polyfill": "^0.4.4", "antd": "5.22.3", "parse-link-header": "^2.0.0", - "react": "19.0.0-rc.1", - "react-dom": "19.0.0-rc.1", + "react": "19.0.0", + "react-dom": "19.0.0", "react-error-boundary": "^4.0.0", "react-markdown": "9.0.1", "rehype-highlight": "7.0.1", diff --git a/examples/nextjs/package-lock.json b/examples/nextjs/package-lock.json index ee55717a0ea7..f7c8de10a935 100644 --- a/examples/nextjs/package-lock.json +++ b/examples/nextjs/package-lock.json @@ -14,12 +14,12 @@ "@data-client/rest": "^0.14.0", "@number-flow/react": "^0.4.0", "@types/node": "22.10.1", - "@types/react": "npm:types-react@19.0.0-rc.1", - "@types/react-dom": "npm:types-react-dom@19.0.0", + "@types/react": "19.0.0", + "@types/react-dom": "19.0.0", "clsx": "^2.1.1", "next": "15.0.3", - "react": "19.0.0-rc.1", - "react-dom": "19.0.0-rc.1", + "react": "19.0.0", + "react-dom": "19.0.0", "tar-fs": "^3.0.6", "tunnel-agent": "^0.6.0", "typescript": "^5.4.5" @@ -2543,10 +2543,9 @@ "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==" }, "node_modules/@types/react": { - "name": "types-react", - "version": "19.0.0-rc.1", - "resolved": "https://registry.npmjs.org/types-react/-/types-react-19.0.0-rc.1.tgz", - "integrity": "sha512-RshndUfqTW6K3STLPis8BtAYCGOkMbtvYsi90gmVNDZBXUyUc5juf2PE9LfS/JmOlUIRO8cWTS/1MTnmhjDqyQ==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.0.0.tgz", + "integrity": "sha512-MY3oPudxvMYyesqs/kW1Bh8y9VqSmf+tzqw3ae8a9DZW68pUe3zAdHeI1jc6iAysuRdACnVknHP8AhwD4/dxtg==", "dependencies": { "csstype": "^3.0.2" } @@ -3479,22 +3478,24 @@ "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==" }, "node_modules/react": { - "version": "19.0.0-rc.1", - "resolved": "https://registry.npmjs.org/react/-/react-19.0.0-rc.1.tgz", - "integrity": "sha512-NZKln+uyPuyHchzP07I6GGYFxdAoaKhehgpCa3ltJGzwE31OYumLeshGaitA1R/fS5d9D2qpZVwTFAr6zCLM9w==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react/-/react-19.0.0.tgz", + "integrity": "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==", + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/react-dom": { - "version": "19.0.0-rc.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0-rc.1.tgz", - "integrity": "sha512-k8MfDX+4G+eaa1cXXI9QF4d+pQtYol3nx8vauqRWUEOPqC7NQn2qmEqUsLoSd28rrZUL+R3T2VC+kZ2Hyx1geQ==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0.tgz", + "integrity": "sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==", + "license": "MIT", "dependencies": { - "scheduler": "0.25.0-rc.1" + "scheduler": "^0.25.0" }, "peerDependencies": { - "react": "19.0.0-rc.1" + "react": "^19.0.0" } }, "node_modules/regenerate": { @@ -3613,9 +3614,10 @@ ] }, "node_modules/scheduler": { - "version": "0.25.0-rc.1", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0-rc.1.tgz", - "integrity": "sha512-fVinv2lXqYpKConAMdergOl5owd0rY1O4P/QTe0aWKCqGtu7VsCt1iqQFxSJtqK4Lci/upVSBpGwVC7eWcuS9Q==" + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0.tgz", + "integrity": "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==", + "license": "MIT" }, "node_modules/semver": { "version": "6.3.1", diff --git a/examples/nextjs/package.json b/examples/nextjs/package.json index fbd657cd57a1..a4d9aa7958c3 100644 --- a/examples/nextjs/package.json +++ b/examples/nextjs/package.json @@ -16,18 +16,18 @@ "@data-client/rest": "^0.14.0", "@number-flow/react": "^0.4.0", "@types/node": "22.10.1", - "@types/react": "npm:types-react@19.0.0-rc.1", - "@types/react-dom": "npm:types-react-dom@19.0.0", + "@types/react": "19.0.0", + "@types/react-dom": "19.0.0", "clsx": "^2.1.1", "next": "15.0.3", - "react": "19.0.0-rc.1", - "react-dom": "19.0.0-rc.1", + "react": "19.0.0", + "react-dom": "19.0.0", "tar-fs": "^3.0.6", "tunnel-agent": "^0.6.0", "typescript": "^5.4.5" }, "overrides": { - "@types/react": "npm:types-react@19.0.0-rc.1", - "@types/react-dom": "npm:types-react-dom@19.0.0" + "@types/react": "19.0.0", + "@types/react-dom": "19.0.0" } } diff --git a/examples/todo-app/package-lock.json b/examples/todo-app/package-lock.json index c36369d6da3b..d2f80f794caa 100644 --- a/examples/todo-app/package-lock.json +++ b/examples/todo-app/package-lock.json @@ -12,8 +12,8 @@ "@data-client/endpoint": "^0.14.0", "@data-client/react": "^0.14.0", "@data-client/rest": "^0.14.0", - "react": "19.0.0-rc.1", - "react-dom": "19.0.0-rc.1", + "react": "19.0.0", + "react-dom": "19.0.0", "uuid": "^11.0.0" }, "devDependencies": { @@ -25,10 +25,10 @@ "@linaria/core": "6.2.0", "@linaria/react": "6.2.1", "@linaria/shaker": "5.0.3", - "@types/react": "npm:types-react@19.0.0-rc.1", - "@types/react-dom": "npm:types-react-dom@19.0.0", + "@types/react": "19.0.0", + "@types/react-dom": "19.0.0", "@types/uuid": "^10.0.0", - "react-refresh": "0.14.2", + "react-refresh": "0.16.0", "webpack": "5.96.1", "webpack-cli": "5.1.4", "webpack-dev-server": "5.1.0" @@ -4514,10 +4514,9 @@ "license": "MIT" }, "node_modules/@types/react": { - "name": "types-react", - "version": "19.0.0-rc.1", - "resolved": "https://registry.npmjs.org/types-react/-/types-react-19.0.0-rc.1.tgz", - "integrity": "sha512-RshndUfqTW6K3STLPis8BtAYCGOkMbtvYsi90gmVNDZBXUyUc5juf2PE9LfS/JmOlUIRO8cWTS/1MTnmhjDqyQ==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.0.0.tgz", + "integrity": "sha512-MY3oPudxvMYyesqs/kW1Bh8y9VqSmf+tzqw3ae8a9DZW68pUe3zAdHeI1jc6iAysuRdACnVknHP8AhwD4/dxtg==", "dev": true, "dependencies": { "csstype": "^3.0.2" @@ -6589,9 +6588,9 @@ "dev": true }, "node_modules/cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", "dev": true, "engines": { "node": ">= 0.6" @@ -6716,11 +6715,10 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, - "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -7838,11 +7836,10 @@ "license": "ISC" }, "node_modules/elliptic": { - "version": "6.5.7", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.7.tgz", - "integrity": "sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==", + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", "dev": true, - "license": "MIT", "dependencies": { "bn.js": "^4.11.9", "brorand": "^1.1.0", @@ -8105,9 +8102,9 @@ } }, "node_modules/express": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz", - "integrity": "sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==", + "version": "4.21.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", + "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", "dev": true, "dependencies": { "accepts": "~1.3.8", @@ -8115,7 +8112,7 @@ "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.6.0", + "cookie": "0.7.1", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -9161,11 +9158,10 @@ } }, "node_modules/http-proxy-middleware": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", - "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.7.tgz", + "integrity": "sha512-fgVY8AV7qU7z/MmXJ/rxwbrtQH4jBQ9m7kp3llF0liB7glmFeVZFBepQb32T3y8n8k2+AEYuMPCpinYW+/CuRA==", "dev": true, - "license": "MIT", "dependencies": { "@types/http-proxy": "^1.17.8", "http-proxy": "^1.18.1", @@ -10054,13 +10050,12 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, - "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -12731,9 +12726,10 @@ } }, "node_modules/react": { - "version": "19.0.0-rc.1", - "resolved": "https://registry.npmjs.org/react/-/react-19.0.0-rc.1.tgz", - "integrity": "sha512-NZKln+uyPuyHchzP07I6GGYFxdAoaKhehgpCa3ltJGzwE31OYumLeshGaitA1R/fS5d9D2qpZVwTFAr6zCLM9w==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react/-/react-19.0.0.tgz", + "integrity": "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -12792,14 +12788,15 @@ "license": "MIT" }, "node_modules/react-dom": { - "version": "19.0.0-rc.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0-rc.1.tgz", - "integrity": "sha512-k8MfDX+4G+eaa1cXXI9QF4d+pQtYol3nx8vauqRWUEOPqC7NQn2qmEqUsLoSd28rrZUL+R3T2VC+kZ2Hyx1geQ==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0.tgz", + "integrity": "sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==", + "license": "MIT", "dependencies": { - "scheduler": "0.25.0-rc.1" + "scheduler": "^0.25.0" }, "peerDependencies": { - "react": "19.0.0-rc.1" + "react": "^19.0.0" } }, "node_modules/react-error-overlay": { @@ -12820,10 +12817,11 @@ } }, "node_modules/react-refresh": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz", - "integrity": "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==", + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.16.0.tgz", + "integrity": "sha512-FPvF2XxTSikpJxcr+bHut2H4gJ17+18Uy20D5/F+SKzFap62R3cM5wH6b8WN3LyGSYeQilLEcJcR1fjBSI2S1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -13239,9 +13237,10 @@ } }, "node_modules/scheduler": { - "version": "0.25.0-rc.1", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0-rc.1.tgz", - "integrity": "sha512-fVinv2lXqYpKConAMdergOl5owd0rY1O4P/QTe0aWKCqGtu7VsCt1iqQFxSJtqK4Lci/upVSBpGwVC7eWcuS9Q==" + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0.tgz", + "integrity": "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==", + "license": "MIT" }, "node_modules/schema-utils": { "version": "3.3.0", diff --git a/examples/todo-app/package.json b/examples/todo-app/package.json index d150a0d16da6..9a4a124807e8 100644 --- a/examples/todo-app/package.json +++ b/examples/todo-app/package.json @@ -33,10 +33,10 @@ "@linaria/core": "6.2.0", "@linaria/react": "6.2.1", "@linaria/shaker": "5.0.3", - "@types/react": "npm:types-react@19.0.0-rc.1", - "@types/react-dom": "npm:types-react-dom@19.0.0", + "@types/react": "19.0.0", + "@types/react-dom": "19.0.0", "@types/uuid": "^10.0.0", - "react-refresh": "0.14.2", + "react-refresh": "0.16.0", "webpack": "5.96.1", "webpack-cli": "5.1.4", "webpack-dev-server": "5.1.0" @@ -45,8 +45,8 @@ "@data-client/endpoint": "^0.14.0", "@data-client/react": "^0.14.0", "@data-client/rest": "^0.14.0", - "react": "19.0.0-rc.1", - "react-dom": "19.0.0-rc.1", + "react": "19.0.0", + "react-dom": "19.0.0", "uuid": "^11.0.0" }, "packageManager": "yarn@4.5.3" diff --git a/package.json b/package.json index e3f805a3274c..0ea89e9252b1 100644 --- a/package.json +++ b/package.json @@ -60,13 +60,14 @@ "@js-temporal/polyfill": "^0.4.4", "@react-navigation/native": "^7.0.0", "@react-navigation/native-stack": "^7.0.0", + "@testing-library/dom": "^10.4.0", "@testing-library/react": "16.0.1", "@testing-library/react-hooks": "8.0.1", "@testing-library/react-native": "12.9.0", "@types/jest": "29.5.14", "@types/node": "22.10.1", - "@types/react": "npm:types-react@19.0.0-rc.1", - "@types/react-dom": "npm:types-react-dom@19.0.0", + "@types/react": "19.0.0", + "@types/react-dom": "19.0.0", "babel-plugin-module-resolver": "5.0.2", "babel-plugin-syntax-hermes-parser": "^0.25.0", "benchmark": "^2.1.4", @@ -87,12 +88,12 @@ "node-fetch": "^3.3.0", "npm-run-all": "^4.1.5", "prettier": "3.4.1", - "react": "^19.0.0-rc.1", - "react-dom": "^19.0.0-rc.1", + "react": "19.0.0", + "react-dom": "19.0.0", "react-native": "0.76.3", "react-native-safe-area-context": "^4.14.0", "react-native-screens": "^4.1.0", - "react-test-renderer": "^19.0.0-rc.1", + "react-test-renderer": "^19.0.0", "rimraf": "^6.0.0", "rollup": "2.79.2", "rollup-plugin-babel": "^4.4.0", @@ -109,8 +110,6 @@ "whatwg-fetch": "3.0.0" }, "resolutions": { - "@types/react": "npm:types-react@19.0.0-rc.1", - "@types/react-dom": "npm:types-react-dom@19.0.0", "whatwg-fetch": "3.0.0", "downlevel-dts/typescript": "4.9.0-dev.20220903" }, diff --git a/packages/img/package.json b/packages/img/package.json index a5b73d8dd20c..6de4be59b82d 100644 --- a/packages/img/package.json +++ b/packages/img/package.json @@ -86,6 +86,7 @@ "@anansi/browserslist-config": "^1.4.2", "@data-client/react": "workspace:*", "@types/node": "^22.0.0", - "@types/react": "^18.0.30" + "@types/react": "19.0.0", + "react": "19.0.0" } } diff --git a/packages/react/package.json b/packages/react/package.json index bb521526d674..171485939e31 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -190,8 +190,9 @@ "@react-navigation/native": "^7.0.0", "@types/node": "^22.0.0", "@types/qs": "^6", - "@types/react": "^18.0.30", + "@types/react": "19.0.0", "qs": "^6.13.1", + "react": "19.0.0", "react-native": "^0.76.0" } } diff --git a/packages/react/src/__tests__/integration-endpoint.web.tsx b/packages/react/src/__tests__/integration-endpoint.web.tsx index 581daad41eb7..180f3cb1e850 100644 --- a/packages/react/src/__tests__/integration-endpoint.web.tsx +++ b/packages/react/src/__tests__/integration-endpoint.web.tsx @@ -491,7 +491,8 @@ describe.each([ let data = result.current; expect(data).toBeInstanceOf(ArticleResource.get.schema); expect(data.title).toBe(temppayload.title); - expect(throws.length).toBe(1); + // react 19 suspends twice + expect(throws.length).toBeGreaterThanOrEqual(1); mynock .persist() @@ -544,7 +545,8 @@ describe.each([ let [data, { invalidate }] = result.current; expect(data).toBeInstanceOf(CoolerArticle); expect(data.title).toBe(temppayload.title); - expect(throws.length).toBe(1); + // react 19 suspends twice + expect(throws.length).toBeGreaterThanOrEqual(1); mynock .persist() @@ -553,7 +555,8 @@ describe.each([ act(() => { invalidate(CoolerArticleResource.get, { id: temppayload.id }); }); - expect(throws.length).toBe(2); + // react 19 suspends twice + expect(throws.length).toBeGreaterThanOrEqual(2); await waitForNextUpdate(); [data, { invalidate }] = result.current; expect(data).toBeInstanceOf(CoolerArticle); diff --git a/packages/react/src/components/DataProvider.tsx b/packages/react/src/components/DataProvider.tsx index e5b39d0c07b2..e2d2b67e6f95 100644 --- a/packages/react/src/components/DataProvider.tsx +++ b/packages/react/src/components/DataProvider.tsx @@ -51,12 +51,11 @@ See https://dataclient.io/docs/guides/ssr.`, ); } // contents of this component expected to be relatively stable - const controllerRef: React.MutableRefObject = - useRef(undefined); + const controllerRef: React.RefObject = useRef(undefined); if (!controllerRef.current) controllerRef.current = new Controller(); //TODO: bind all methods so destructuring works - const managersRef: React.MutableRefObject = useRef(managers); + const managersRef: React.RefObject = useRef(managers); if (!managersRef.current) managersRef.current = getDefaultManagers(); // run in a useEffect in DataStore diff --git a/packages/react/src/hooks/__tests__/useController/expireAll.tsx b/packages/react/src/hooks/__tests__/useController/expireAll.tsx index 178de96f37dd..becdf75f7996 100644 --- a/packages/react/src/hooks/__tests__/useController/expireAll.tsx +++ b/packages/react/src/hooks/__tests__/useController/expireAll.tsx @@ -117,7 +117,8 @@ describe('expireAll', () => { act(() => { controller.expireAll(CoolerArticleResource.get); }); - expect(throws.length).toBe(1); + // react 19 throws twice + expect(throws.length).toBeGreaterThanOrEqual(1); }); it('should *not* suspend when invalidIfStale is false', () => { diff --git a/packages/react/src/hooks/__tests__/useController/fetch.tsx b/packages/react/src/hooks/__tests__/useController/fetch.tsx index 93ce41c431c7..b26ab932ad86 100644 --- a/packages/react/src/hooks/__tests__/useController/fetch.tsx +++ b/packages/react/src/hooks/__tests__/useController/fetch.tsx @@ -291,19 +291,22 @@ describe.each([ const [data, fetch] = result.current; expect(data).toBeInstanceOf(CoolerArticle); expect(data?.title).toBe(temppayload.title); - expect(throws.length).toBe(1); + // react 19 suspends twice + expect(throws.length).toBeGreaterThanOrEqual(1); mynock .persist() .get(`/article-cooler/${temppayload.id}`) .reply(200, { ...temppayload, title: 'othertitle' }); - expect(throws.length).toBe(1); + // react 19 suspends twice + expect(throws.length).toBeGreaterThanOrEqual(1); await act(async () => { await fetch(FutureArticleResource.delete, temppayload.id); rerender({ id: null }); }); - expect(throws.length).toBe(1); + // react 19 suspends twice + expect(throws.length).toBeGreaterThanOrEqual(1); expect(result.current[0]).toBe(null); }); diff --git a/packages/react/src/hooks/__tests__/useSuspense.web.tsx b/packages/react/src/hooks/__tests__/useSuspense.web.tsx index fb07b53ba722..3fd246f38123 100644 --- a/packages/react/src/hooks/__tests__/useSuspense.web.tsx +++ b/packages/react/src/hooks/__tests__/useSuspense.web.tsx @@ -64,9 +64,14 @@ async function testDispatchFetch( ); render(tree); expect(dispatch).toHaveBeenCalled(); - expect(dispatch.mock.calls.length).toBe(payloads.length); + // react 19 suspends twice + expect(dispatch.mock.calls.length).toBeGreaterThanOrEqual(payloads.length); let i = 0; for (const call of dispatch.mock.calls as any) { + // react 19, skip every other + if (Number(React.version.substring(0, 3)) >= 19 && i % 2 === 1) { + continue; + } expect(call[0].type).toBe(actionTypes.FETCH); delete call[0]?.meta?.fetchedAt; delete call[0]?.meta?.promise; diff --git a/packages/ssr/package.json b/packages/ssr/package.json index ad51750f9586..be6ef2b82c44 100644 --- a/packages/ssr/package.json +++ b/packages/ssr/package.json @@ -118,7 +118,7 @@ "peerDependencies": { "@data-client/react": "^0.1.0 || ^0.2.0 || ^0.3.0 || ^0.4.0 || ^0.5.0 || ^0.7.0 || ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^0.14.0", "@data-client/redux": "^0.1.0 || ^0.2.0 || ^0.3.0 || ^0.4.0 || ^0.5.0 || ^0.7.0 || ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^0.14.0", - "@types/react": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "@types/react": "^16.14.0 || ^17.0.0 || ^18.0.0-0 || ^19.0.0", "next": ">=12.0.0", "react": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "redux": "^4.0.0 || ^5.0.0" @@ -136,10 +136,11 @@ "@data-client/react": "workspace:*", "@data-client/redux": "^0.13.0", "@types/node": "^22.0.0", - "@types/react": "^18.0.30", - "@types/react-dom": "^18.0.11", + "@types/react": "19.0.0", + "@types/react-dom": "19.0.0", "next": "^15.0.0", - "react-dom": "^19.0.0-rc.1", + "react": "19.0.0", + "react-dom": "19.0.0", "redux": "^5.0.0" } } diff --git a/packages/test/package.json b/packages/test/package.json index bb241a349fdb..0c5edd8f2aa3 100644 --- a/packages/test/package.json +++ b/packages/test/package.json @@ -155,9 +155,11 @@ "@data-client/react": "workspace:*", "@types/jest": "^29.5.0", "@types/node": "^22.0.0", - "@types/react": "^18.0.30", - "@types/react-dom": "^18.0.11", - "@types/react-test-renderer": "^18", - "jest": "^29.5.0" + "@types/react": "19.0.0", + "@types/react-dom": "19.0.0", + "@types/react-test-renderer": "19.0.0", + "jest": "^29.5.0", + "react": "19.0.0", + "react-dom": "19.0.0" } } diff --git a/packages/use-enhanced-reducer/package.json b/packages/use-enhanced-reducer/package.json index ac6d25d68361..e6a1eb2b1da2 100644 --- a/packages/use-enhanced-reducer/package.json +++ b/packages/use-enhanced-reducer/package.json @@ -88,6 +88,6 @@ "devDependencies": { "@anansi/browserslist-config": "^1.4.2", "@types/node": "^22.0.0", - "@types/react": "^18.0.30" + "@types/react": "19.0.0" } } diff --git a/website/package.json b/website/package.json index 80a939bf1688..fbff09f968dd 100644 --- a/website/package.json +++ b/website/package.json @@ -21,8 +21,8 @@ "devDependencies": { "@docusaurus/module-type-aliases": "^3.0.1", "@tsconfig/docusaurus": "^2.0.0", - "@types/react": "18.3.14", - "@types/react-dom": "^18.2.7", + "@types/react": "19.0.0", + "@types/react-dom": "19.0.0", "@types/react-helmet": "^6.1.5", "@types/react-router-dom": "^5.3.3", "@types/uuid": "^10.0.0", @@ -51,8 +51,8 @@ "clsx": "2.1.1", "monaco-editor": "^0.52.0", "parse-numeric-range": "^1.3.0", - "react": "^19.0.0-rc.1", - "react-dom": "^19.0.0-rc.1", + "react": "^19.0.0", + "react-dom": "^19.0.0", "react-json-tree": "0.19.0", "react-live": "^4.0.0", "typescript": "^5.5.2", diff --git a/website/src/components/Playground/editor-types/react.d.ts b/website/src/components/Playground/editor-types/react.d.ts index 00d260578fdb..69e0feaab379 100755 --- a/website/src/components/Playground/editor-types/react.d.ts +++ b/website/src/components/Playground/editor-types/react.d.ts @@ -137,8 +137,6 @@ declare namespace React { | (new(props: P) => Component); /** - * A readonly ref container where {@link current} cannot be mutated. - * * Created by {@link createRef}, or {@link useRef} when passed `null`. * * @template T The type of the ref's value. @@ -779,6 +777,12 @@ declare namespace React { /** A fallback react tree to show when a Suspense child (like React.lazy) suspends */ fallback?: ReactNode; + + /** + * A name for this Suspense boundary for instrumentation purposes. + * The name will help identify this boundary in React DevTools. + */ + name?: string | undefined; } /** @@ -914,7 +918,7 @@ declare namespace React { /** * Ignored by React. - * @deprecated Only kept in types for backwards compatibility. Will be removed in a futre major release. + * @deprecated Only kept in types for backwards compatibility. Will be removed in a future major release. */ static propTypes?: any; @@ -1035,7 +1039,7 @@ declare namespace React { (props: P): ReactNode; /** * Ignored by React. - * @deprecated Only kept in types for backwards compatibility. Will be removed in a futre major release. + * @deprecated Only kept in types for backwards compatibility. Will be removed in a future major release. */ propTypes?: any; /** @@ -1096,7 +1100,7 @@ declare namespace React { displayName?: string | undefined; /** * Ignored by React. - * @deprecated Only kept in types for backwards compatibility. Will be removed in a futre major release. + * @deprecated Only kept in types for backwards compatibility. Will be removed in a future major release. */ propTypes?: any; } @@ -1112,7 +1116,7 @@ declare namespace React { new(props: P): Component; /** * Ignored by React. - * @deprecated Only kept in types for backwards compatibility. Will be removed in a futre major release. + * @deprecated Only kept in types for backwards compatibility. Will be removed in a future major release. */ propTypes?: any; contextType?: Context | undefined; @@ -1335,7 +1339,7 @@ declare namespace React { interface ForwardRefExoticComponent

extends NamedExoticComponent

{ /** * Ignored by React. - * @deprecated Only kept in types for backwards compatibility. Will be removed in a futre major release. + * @deprecated Only kept in types for backwards compatibility. Will be removed in a future major release. */ propTypes?: any; } @@ -1368,7 +1372,7 @@ declare namespace React { * ``` */ function forwardRef( - render: ForwardRefRenderFunction, + render: ForwardRefRenderFunction>, ): ForwardRefExoticComponent & RefAttributes>; /** @@ -1786,7 +1790,7 @@ declare namespace React { */ // A specific function type would not trigger implicit any. // See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/52873#issuecomment-845806435 for a comparison between `Function` and more specific types. - // eslint-disable-next-line @typescript-eslint/ban-types + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type function useCallback(callback: T, deps: DependencyList): T; /** * `useMemo` will only recompute the memoized value when one of the `deps` has changed. @@ -1927,6 +1931,9 @@ declare namespace React { permalink?: string, ): [state: Awaited, dispatch: (payload: Payload) => void, isPending: boolean]; + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + export function cache(fn: CachedFunction): CachedFunction; + // // Event System // ---------------------------------------------------------------------- @@ -2197,9 +2204,9 @@ declare namespace React { // Keyboard Events onKeyDown?: KeyboardEventHandler | undefined; onKeyDownCapture?: KeyboardEventHandler | undefined; - /** @deprecated */ + /** @deprecated Use `onKeyUp` or `onKeyDown` instead */ onKeyPress?: KeyboardEventHandler | undefined; - /** @deprecated */ + /** @deprecated Use `onKeyUpCapture` or `onKeyDownCapture` instead */ onKeyPressCapture?: KeyboardEventHandler | undefined; onKeyUp?: KeyboardEventHandler | undefined; onKeyUpCapture?: KeyboardEventHandler | undefined; @@ -2672,12 +2679,14 @@ declare namespace React { // Standard HTML Attributes accessKey?: string | undefined; + autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}); autoFocus?: boolean | undefined; className?: string | undefined; contentEditable?: Booleanish | "inherit" | "plaintext-only" | undefined; contextMenu?: string | undefined; dir?: string | undefined; draggable?: Booleanish | undefined; + enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined; hidden?: boolean | undefined; id?: string | undefined; lang?: string | undefined; @@ -2709,7 +2718,6 @@ declare namespace React { vocab?: string | undefined; // Non-standard Attributes - autoCapitalize?: string | undefined; autoCorrect?: string | undefined; autoSave?: string | undefined; color?: string | undefined; @@ -2758,7 +2766,7 @@ declare namespace React { action?: | string | undefined - | ((formData: FormData) => void) + | ((formData: FormData) => void | Promise) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[ keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS ]; @@ -2793,7 +2801,7 @@ declare namespace React { formAction?: | string | undefined - | ((formData: FormData) => void) + | ((formData: FormData) => void | Promise) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[ keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS ]; @@ -2926,7 +2934,7 @@ declare namespace React { form?: string | undefined; formAction?: | string - | ((formData: FormData) => void) + | ((formData: FormData) => void | Promise) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[ keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS ] @@ -2992,7 +3000,7 @@ declare namespace React { action?: | string | undefined - | ((formData: FormData) => void) + | ((formData: FormData) => void | Promise) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[ keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS ]; @@ -3145,11 +3153,10 @@ declare namespace React { capture?: boolean | "user" | "environment" | undefined; // https://www.w3.org/TR/html-media-capture/#the-capture-attribute checked?: boolean | undefined; disabled?: boolean | undefined; - enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined; form?: string | undefined; formAction?: | string - | ((formData: FormData) => void) + | ((formData: FormData) => void | Promise) | DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[ keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS ] @@ -3212,6 +3219,9 @@ declare namespace React { sizes?: string | undefined; type?: string | undefined; charSet?: string | undefined; + + // React props + precedence?: string | undefined; } interface MapHTMLAttributes extends HTMLAttributes { @@ -3346,6 +3356,10 @@ declare namespace React { media?: string | undefined; scoped?: boolean | undefined; type?: string | undefined; + + // React props + href?: string | undefined; + precedence?: string | undefined; } interface TableHTMLAttributes extends HTMLAttributes { diff --git a/yarn.lock b/yarn.lock index bf619fab2db4..7be1990997d6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3148,7 +3148,8 @@ __metadata: "@data-client/endpoint": "npm:^0.14.17" "@data-client/react": "workspace:*" "@types/node": "npm:^22.0.0" - "@types/react": "npm:^18.0.30" + "@types/react": "npm:19.0.0" + react: "npm:19.0.0" peerDependencies: "@data-client/react": ^0.1.0 || ^0.2.0 || ^0.3.0 || ^0.4.0 || ^0.5.0 || ^0.7.0 || ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^0.14.0 "@types/react": ^16.14.0 || ^17.0.0 || ^18.0.0-0 || ^19.0.0 @@ -3190,8 +3191,9 @@ __metadata: "@react-navigation/native": "npm:^7.0.0" "@types/node": "npm:^22.0.0" "@types/qs": "npm:^6" - "@types/react": "npm:^18.0.30" + "@types/react": "npm:19.0.0" qs: "npm:^6.13.1" + react: "npm:19.0.0" react-native: "npm:^0.76.0" peerDependencies: "@react-navigation/native": ^6.0.0 || ^7.0.0 @@ -3244,15 +3246,16 @@ __metadata: "@data-client/react": "workspace:*" "@data-client/redux": "npm:^0.13.0" "@types/node": "npm:^22.0.0" - "@types/react": "npm:^18.0.30" - "@types/react-dom": "npm:^18.0.11" + "@types/react": "npm:19.0.0" + "@types/react-dom": "npm:19.0.0" next: "npm:^15.0.0" - react-dom: "npm:^19.0.0-rc.1" + react: "npm:19.0.0" + react-dom: "npm:19.0.0" redux: "npm:^5.0.0" peerDependencies: "@data-client/react": ^0.1.0 || ^0.2.0 || ^0.3.0 || ^0.4.0 || ^0.5.0 || ^0.7.0 || ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^0.14.0 "@data-client/redux": ^0.1.0 || ^0.2.0 || ^0.3.0 || ^0.4.0 || ^0.5.0 || ^0.7.0 || ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^0.14.0 - "@types/react": ^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + "@types/react": ^16.14.0 || ^17.0.0 || ^18.0.0-0 || ^19.0.0 next: ">=12.0.0" react: ^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 redux: ^4.0.0 || ^5.0.0 @@ -3276,10 +3279,12 @@ __metadata: "@testing-library/react-native": "npm:^12.0.1" "@types/jest": "npm:^29.5.0" "@types/node": "npm:^22.0.0" - "@types/react": "npm:^18.0.30" - "@types/react-dom": "npm:^18.0.11" - "@types/react-test-renderer": "npm:^18" + "@types/react": "npm:19.0.0" + "@types/react-dom": "npm:19.0.0" + "@types/react-test-renderer": "npm:19.0.0" jest: "npm:^29.5.0" + react: "npm:19.0.0" + react-dom: "npm:19.0.0" peerDependencies: "@data-client/react": ^0.12.15 || ^0.13.0 || ^0.14.0 "@testing-library/react-hooks": ^8.0.0 @@ -3314,7 +3319,7 @@ __metadata: dependencies: "@anansi/browserslist-config": "npm:^1.4.2" "@types/node": "npm:^22.0.0" - "@types/react": "npm:^18.0.30" + "@types/react": "npm:19.0.0" peerDependencies: "@types/react": ^16.14.0 || ^17.0.0 || ^18.0.0-0 || ^18.0.0 || ^19.0.0-0 || ^19.0.0 react: ^16.14.0 || ^17.0.0 || ^18.0.0-0 || ^18.0.0 || ^19.0.0-0 || ^19.0.0 @@ -6534,7 +6539,7 @@ __metadata: languageName: node linkType: hard -"@testing-library/dom@npm:^10.1.0": +"@testing-library/dom@npm:^10.1.0, @testing-library/dom@npm:^10.4.0": version: 10.4.0 resolution: "@testing-library/dom@npm:10.4.0" dependencies: @@ -7494,12 +7499,12 @@ __metadata: languageName: node linkType: hard -"@types/react-dom@npm:types-react-dom@19.0.0": +"@types/react-dom@npm:*, @types/react-dom@npm:19.0.0": version: 19.0.0 - resolution: "types-react-dom@npm:19.0.0" + resolution: "@types/react-dom@npm:19.0.0" dependencies: "@types/react": "npm:*" - checksum: 10c0/5ea60f0a0a00a8f8b14a5dd0bf39c349bd2f1e9a1b4ce52777fdfc2d2fe03f791f7714b0ef3ab19d38be8ce52633ebd39d226d8f102344efe07d02e9931b62a3 + checksum: 10c0/bd480fc4a9c801fc6bbc7d26b37bb815fc382e76b5428511b1bdb2e8048f3dbd2ff9973bafc86b448e0593f9da4c02f7b39d47409e427daeed5a54f045de4596 languageName: node linkType: hard @@ -7544,21 +7549,21 @@ __metadata: languageName: node linkType: hard -"@types/react-test-renderer@npm:^18": - version: 18.3.1 - resolution: "@types/react-test-renderer@npm:18.3.1" +"@types/react-test-renderer@npm:19.0.0": + version: 19.0.0 + resolution: "@types/react-test-renderer@npm:19.0.0" dependencies: - "@types/react": "npm:^18" - checksum: 10c0/9fc8467ff1a3f14be6cc3498a75fc788d2c92c0fffa7bf21269ed5d9d82db9195bf2178ddc42ea16a0836995c1b77601c6be8abb27bd1864668c418c6d0e5a3b + "@types/react": "npm:*" + checksum: 10c0/4027e662028e4695eb1a395e54c0e430c35a323ef800fcb4d2726d9dafa1337f214f87e2487876e3cc51ecf7ac3b3d0903252524f194877d39ec4ebd0626b17d languageName: node linkType: hard -"@types/react@npm:types-react@19.0.0-rc.1": - version: 19.0.0-rc.1 - resolution: "types-react@npm:19.0.0-rc.1" +"@types/react@npm:*, @types/react@npm:19.0.0": + version: 19.0.0 + resolution: "@types/react@npm:19.0.0" dependencies: csstype: "npm:^3.0.2" - checksum: 10c0/408cd9f3f960e806d510f7a9a3569f92a7f1cff3c57f5465fab4c139f0020c88dc7a08e6f357d2a116bd2c76e641851ce84527cb765f36824a6e818e0d477bbc + checksum: 10c0/d7753ec27c5fa48f3aab97d7d4e9e33ad62bbff761a421bfc56c7b403fab9e3ed266d47793e44311ca2f0034e8ae428cea4aecbe1c542b418cfe72a520eab931 languageName: node linkType: hard @@ -10782,8 +10787,8 @@ __metadata: "@types/react-dom": "npm:*" d3: "npm:^7.9.0" history: "npm:*" - react: "npm:^19.0.0-rc.1" - react-dom: "npm:^19.0.0-rc.1" + react: "npm:^19.0.0" + react-dom: "npm:^19.0.0" react-refresh: "npm:*" typescript: "npm:^5.4.5" webpack: "npm:*" @@ -14123,10 +14128,10 @@ __metadata: "@data-client/normalizr": "workspace:^" "@types/babel__core": "npm:^7" "@types/benchmark": "npm:2.1.5" - "@types/react": "npm:types-react@19.0.0-rc.1" + "@types/react": "npm:19.0.0" benchmark: "npm:^2.1.4" normalizr: "npm:^3.6.2" - react: "npm:^19.0.0-rc.1" + react: "npm:^19.0.0" webpack: "npm:^5.76.2" webpack-cli: "npm:^5.1.4" languageName: unknown @@ -25160,8 +25165,8 @@ __metadata: "@monaco-editor/react": "npm:^4.4.6" "@number-flow/react": "npm:^0.4.0" "@tsconfig/docusaurus": "npm:^2.0.0" - "@types/react": "npm:18.3.14" - "@types/react-dom": "npm:^18.2.7" + "@types/react": "npm:19.0.0" + "@types/react-dom": "npm:19.0.0" "@types/react-helmet": "npm:^6.1.5" "@types/react-router-dom": "npm:^5.3.3" "@types/uuid": "npm:^10.0.0" @@ -25170,8 +25175,8 @@ __metadata: monaco-editor: "npm:^0.52.0" parse-numeric-range: "npm:^1.3.0" raw-loader: "npm:^4.0.2" - react: "npm:^19.0.0-rc.1" - react-dom: "npm:^19.0.0-rc.1" + react: "npm:^19.0.0" + react-dom: "npm:^19.0.0" react-json-tree: "npm:0.19.0" react-live: "npm:^4.0.0" serve: "npm:14.2.4" @@ -25235,14 +25240,14 @@ __metadata: languageName: node linkType: hard -"react-dom@npm:^19.0.0-rc.1": - version: 19.0.0-rc-fb9a90fa48-20240614 - resolution: "react-dom@npm:19.0.0-rc-fb9a90fa48-20240614" +"react-dom@npm:19.0.0, react-dom@npm:^19.0.0": + version: 19.0.0 + resolution: "react-dom@npm:19.0.0" dependencies: - scheduler: "npm:0.25.0-rc-fb9a90fa48-20240614" + scheduler: "npm:^0.25.0" peerDependencies: - react: 19.0.0-rc-fb9a90fa48-20240614 - checksum: 10c0/ab4f49752f71fcf3de910af463d3ec4f2ea17777dbd854df7f08987b1ae4d91e5b59a1f5998063f68c7db3af06e9cb67f26a57f0e78bb71c28884ef5029edf0d + react: ^19.0.0 + checksum: 10c0/a36ce7ab507b237ae2759c984cdaad4af4096d8199fb65b3815c16825e5cfeb7293da790a3fc2184b52bfba7ba3ff31c058c01947aff6fd1a3701632aabaa6a9 languageName: node linkType: hard @@ -25312,13 +25317,6 @@ __metadata: languageName: node linkType: hard -"react-is@npm:19.0.0-rc-fb9a90fa48-20240614": - version: 19.0.0-rc-fb9a90fa48-20240614 - resolution: "react-is@npm:19.0.0-rc-fb9a90fa48-20240614" - checksum: 10c0/73f4cd91d535788a60834690a303e4c02d3f55a63f34cfc4587cac8c132369aad849c614179cafd9840005614e56809c20c2d9f722aa630502d1b6db15e98c89 - languageName: node - linkType: hard - "react-is@npm:^16.13.1, react-is@npm:^16.6.0, react-is@npm:^16.7.0": version: 16.13.1 resolution: "react-is@npm:16.13.1" @@ -25340,6 +25338,13 @@ __metadata: languageName: node linkType: hard +"react-is@npm:^19.0.0": + version: 19.0.0 + resolution: "react-is@npm:19.0.0" + checksum: 10c0/d1be8e8500cf04f76df71942a21ef3a71266397a383d7ec8885f35190df818d35c65efd35aed7be47a89ad99aaff2c52e0c4e39e8930844a6b997622e50625a8 + languageName: node + linkType: hard + "react-json-tree@npm:0.19.0": version: 0.19.0 resolution: "react-json-tree@npm:0.19.0" @@ -25476,7 +25481,14 @@ __metadata: languageName: node linkType: hard -"react-refresh@npm:*, react-refresh@npm:^0.14.0": +"react-refresh@npm:*": + version: 0.16.0 + resolution: "react-refresh@npm:0.16.0" + checksum: 10c0/122525dbd7a44140757f46b8b93df6a349126e64b270809a8f082809662be5837a97310e56df2cfc7dac98b8adfaaafa570ec579c8b269c374e6928394307c68 + languageName: node + linkType: hard + +"react-refresh@npm:^0.14.0": version: 0.14.2 resolution: "react-refresh@npm:0.14.2" checksum: 10c0/875b72ef56b147a131e33f2abd6ec059d1989854b3ff438898e4f9310bfcc73acff709445b7ba843318a953cb9424bcc2c05af2b3d80011cee28f25aef3e2ebb @@ -25531,22 +25543,22 @@ __metadata: languageName: node linkType: hard -"react-test-renderer@npm:^19.0.0-rc.1": - version: 19.0.0-rc-fb9a90fa48-20240614 - resolution: "react-test-renderer@npm:19.0.0-rc-fb9a90fa48-20240614" +"react-test-renderer@npm:^19.0.0": + version: 19.0.0 + resolution: "react-test-renderer@npm:19.0.0" dependencies: - react-is: "npm:19.0.0-rc-fb9a90fa48-20240614" - scheduler: "npm:0.25.0-rc-fb9a90fa48-20240614" + react-is: "npm:^19.0.0" + scheduler: "npm:^0.25.0" peerDependencies: - react: 19.0.0-rc-fb9a90fa48-20240614 - checksum: 10c0/895375555035375dbcdce354abcf673c5a07884f3aac5960385a2380ee04a1ef6d90607501bc222757c46bca6a9a85889137c6b23c090afc56066eaaa6ba8881 + react: ^19.0.0 + checksum: 10c0/67c34dae4d3a60b9306d2b5cb6db436376ef20c651aaf092644298e3ffb92cd3c7b0da2017e7f1395bf2de8b42429874a5a63e8cc3c21febbab31b0309e41862 languageName: node linkType: hard -"react@npm:^19.0.0-rc.1": - version: 19.0.0-rc-fb9a90fa48-20240614 - resolution: "react@npm:19.0.0-rc-fb9a90fa48-20240614" - checksum: 10c0/99c3d3398d46c8c704c0deb04160f5a7c9cf2ff785a777fb0f1a4d0c91ade044c4d50cd52e008b4c45623eaa8f4d18a80272444df4972a2cc696bf35ef3e59b0 +"react@npm:19.0.0, react@npm:^19.0.0": + version: 19.0.0 + resolution: "react@npm:19.0.0" + checksum: 10c0/9cad8f103e8e3a16d15cb18a0d8115d8bd9f9e1ce3420310aea381eb42aa0a4f812cf047bb5441349257a05fba8a291515691e3cb51267279b2d2c3253f38471 languageName: node linkType: hard @@ -26720,13 +26732,14 @@ __metadata: "@js-temporal/polyfill": "npm:^0.4.4" "@react-navigation/native": "npm:^7.0.0" "@react-navigation/native-stack": "npm:^7.0.0" + "@testing-library/dom": "npm:^10.4.0" "@testing-library/react": "npm:16.0.1" "@testing-library/react-hooks": "npm:8.0.1" "@testing-library/react-native": "npm:12.9.0" "@types/jest": "npm:29.5.14" "@types/node": "npm:22.10.1" - "@types/react": "npm:types-react@19.0.0-rc.1" - "@types/react-dom": "npm:types-react-dom@19.0.0" + "@types/react": "npm:19.0.0" + "@types/react-dom": "npm:19.0.0" babel-plugin-module-resolver: "npm:5.0.2" babel-plugin-syntax-hermes-parser: "npm:^0.25.0" benchmark: "npm:^2.1.4" @@ -26747,12 +26760,12 @@ __metadata: node-fetch: "npm:^3.3.0" npm-run-all: "npm:^4.1.5" prettier: "npm:3.4.1" - react: "npm:^19.0.0-rc.1" - react-dom: "npm:^19.0.0-rc.1" + react: "npm:19.0.0" + react-dom: "npm:19.0.0" react-native: "npm:0.76.3" react-native-safe-area-context: "npm:^4.14.0" react-native-screens: "npm:^4.1.0" - react-test-renderer: "npm:^19.0.0-rc.1" + react-test-renderer: "npm:^19.0.0" rimraf: "npm:^6.0.0" rollup: "npm:2.79.2" rollup-plugin-babel: "npm:^4.4.0" @@ -26974,10 +26987,10 @@ __metadata: languageName: node linkType: hard -"scheduler@npm:0.25.0-rc-fb9a90fa48-20240614": - version: 0.25.0-rc-fb9a90fa48-20240614 - resolution: "scheduler@npm:0.25.0-rc-fb9a90fa48-20240614" - checksum: 10c0/efd80573e35479d0e47e864ba5747579be2a8b20cfb61f32bcb17a8b945711d2337dd7f92ac6373f3128ed20a8915624dc82fda6b7f761aab352692a6445d411 +"scheduler@npm:^0.25.0": + version: 0.25.0 + resolution: "scheduler@npm:0.25.0" + checksum: 10c0/a4bb1da406b613ce72c1299db43759526058fdcc413999c3c3e0db8956df7633acf395cb20eb2303b6a65d658d66b6585d344460abaee8080b4aa931f10eaafe languageName: node linkType: hard