From 6a7774c6b7e9314b39a58d22eb834299853e458e Mon Sep 17 00:00:00 2001 From: Jon Koops Date: Fri, 19 Nov 2021 19:58:53 +0100 Subject: [PATCH] chore: update react and react-dom types (#6583) --- package.json | 2 ++ .../src/components/Select/Select.tsx | 2 +- packages/react-docs/package.json | 4 ++-- .../demo-app-ts/package.json | 4 ++-- yarn.lock | 20 +++++++++++++------ 5 files changed, 21 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 702156322ae..ff202abeacc 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,8 @@ "@octokit/rest": "^16.43.2", "@types/enzyme": "3.9.0", "@types/jest": "27.0.2", + "@types/react": "^17.0.0", + "@types/react-dom": "^17.0.0", "@typescript-eslint/eslint-plugin": "^4.4.1", "@typescript-eslint/parser": "^4.4.1", "@wojtekmaj/enzyme-adapter-react-17": "^0.3.1", diff --git a/packages/react-core/src/components/Select/Select.tsx b/packages/react-core/src/components/Select/Select.tsx index 339dc132a3a..8f202df42e3 100644 --- a/packages/react-core/src/components/Select/Select.tsx +++ b/packages/react-core/src/components/Select/Select.tsx @@ -381,7 +381,7 @@ export class Select extends React.Component { - if (group.type === SelectGroup) { + if (React.isValidElement(group) && group.type === SelectGroup) { const filteredGroupChildren = (React.Children.toArray(group.props.children) as React.ReactElement< SelectGroupProps >[]).filter(childFilter); diff --git a/packages/react-docs/package.json b/packages/react-docs/package.json index e5d5aa883c0..71d809b964d 100644 --- a/packages/react-docs/package.json +++ b/packages/react-docs/package.json @@ -38,8 +38,8 @@ }, "devDependencies": { "@patternfly/patternfly-a11y": "4.2.1", - "@types/react": "^16.8.0", - "@types/react-dom": "^16.8.0", + "@types/react": "^17.0.0", + "@types/react-dom": "^17.0.0", "react": "^17.0.0", "react-dom": "^17.0.0", "rimraf": "^2.6.3", diff --git a/packages/react-integration/demo-app-ts/package.json b/packages/react-integration/demo-app-ts/package.json index 0bd36e9fa30..ee9674904ab 100644 --- a/packages/react-integration/demo-app-ts/package.json +++ b/packages/react-integration/demo-app-ts/package.json @@ -15,8 +15,8 @@ "react-router-dom": "^4.3.1" }, "devDependencies": { - "@types/react": "^16.8.0", - "@types/react-dom": "^16.8.0", + "@types/react": "^17.0.0", + "@types/react-dom": "^17.0.0", "@types/react-router-dom": "^4.3.1", "clean-webpack-plugin": "^3.0.0", "copy-webpack-plugin": "^6.1.0", diff --git a/yarn.lock b/yarn.lock index 942b3302c2e..1e09b4422c6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3677,9 +3677,10 @@ version "15.7.3" resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7" -"@types/react-dom@^16.8.0": - version "16.9.8" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.9.8.tgz#fe4c1e11dfc67155733dfa6aa65108b4971cb423" +"@types/react-dom@^17.0.0": + version "17.0.11" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-17.0.11.tgz#e1eadc3c5e86bdb5f7684e00274ae228e7bcc466" + integrity sha512-f96K3k+24RaLGVu/Y2Ng3e1EbZ8/cVJvypZWd7cy0ofCBaf2lcM46xNhycMZ2xGwbBjRql7hOlZ+e2WlJ5MH3Q== dependencies: "@types/react" "*" @@ -3711,11 +3712,13 @@ "@types/prop-types" "*" "@types/react" "*" -"@types/react@*", "@types/react@^16.8.0": - version "16.9.49" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.49.tgz#09db021cf8089aba0cdb12a49f8021a69cce4872" +"@types/react@*", "@types/react@^17.0.0": + version "17.0.34" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.34.tgz#797b66d359b692e3f19991b6b07e4b0c706c0102" + integrity sha512-46FEGrMjc2+8XhHXILr+3+/sTe3OfzSPU9YGKILLrUYbQ1CLQC9Daqo1KzENGXAWwrFwiY0l4ZbF20gRvgpWTg== dependencies: "@types/prop-types" "*" + "@types/scheduler" "*" csstype "^3.0.2" "@types/resolve@1.17.1": @@ -3725,6 +3728,11 @@ dependencies: "@types/node" "*" +"@types/scheduler@*": + version "0.16.2" + resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" + integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== + "@types/sinonjs__fake-timers@^6.0.2": version "6.0.4" resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.4.tgz#0ecc1b9259b76598ef01942f547904ce61a6a77d"