Skip to content

Commit

Permalink
chore: upgrade to react 17 (#2561)
Browse files Browse the repository at this point in the history
  • Loading branch information
leopuleo authored Aug 11, 2022
1 parent cff4a62 commit d4c52ed
Show file tree
Hide file tree
Showing 57 changed files with 296 additions and 279 deletions.
6 changes: 3 additions & 3 deletions apps/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@editorjs/list": "^1.6.0",
"@editorjs/quote": "^2.4.0",
"@editorjs/underline": "^1.0.0",
"@types/react": "^16.14.0",
"@types/react": "17.0.39",
"@webiny/app-admin": "^5.30.0",
"@webiny/app-admin-users-cognito": "^5.30.0",
"@webiny/app-form-builder": "^5.30.0",
Expand All @@ -22,8 +22,8 @@
"core-js": "^3.0.1",
"cross-fetch": "^3.0.4",
"prop-types": "^15.7.2",
"react": "16.14.0",
"react-dom": "16.14.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"regenerator-runtime": "^0.13.5",
"theme": "^0.1.0",
"tslib": "^2.4.0"
Expand Down
2 changes: 1 addition & 1 deletion apps/theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"graphql-tag": "^2.12.6",
"invariant": "^2.2.4",
"lodash": "^4.4.2",
"react": "16.14.0",
"react": "17.0.2",
"react-hamburger-menu": "^1.1.1",
"react-helmet": "^6.1.0"
},
Expand Down
6 changes: 3 additions & 3 deletions apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dependencies": {
"@apollo/react-components": "^3.1.5",
"@apollo/react-hooks": "^3.1.5",
"@types/react": "^16.14.0",
"@types/react": "17.0.39",
"@webiny/app": "^5.30.0",
"@webiny/app-form-builder": "^5.30.0",
"@webiny/app-page-builder": "^5.30.0",
Expand All @@ -22,8 +22,8 @@
"graphql": "^15.7.2",
"graphql-tag": "^2.12.6",
"lodash": "^4.4.2",
"react": "16.14.0",
"react-dom": "16.14.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-helmet": "^6.1.0",
"regenerator-runtime": "^0.13.5",
"theme": "^0.1.0"
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"@types/jest": "^24.0.24",
"@types/jquery": "^3.3.31",
"@types/node": "^12.12.22",
"@types/react": "^16.14.0",
"@types/react-dom": "^16.9.8",
"@types/react": "17.0.39",
"@types/react-dom": "17.0.11",
"@typescript-eslint/eslint-plugin": "^5.5.0",
"@typescript-eslint/parser": "^5.5.0",
"adio": "^1.0.1",
Expand Down Expand Up @@ -213,12 +213,12 @@
}
},
"resolutions": {
"@types/react": "16.14.2",
"@types/react": "17.0.39",
"@types/jsdom": "link:./typings/void",
"@typescript/lib-dom": "npm:@types/web@*",
"@types/webpack": "^5.28.0",
"react": "16.14.0",
"react-dom": "16.14.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"typescript": "4.7.4",
"codex-tooltip": "1.0.2",
"@types/eslint": "8.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages-v6/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"sideEffects": false,
"main": "./src/index.tsx",
"dependencies": {
"react": "^16.14.0"
"react": "^17.0.2"
}
}
4 changes: 2 additions & 2 deletions packages-v6/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
"postcss-preset-env": "7.0.1",
"prompts": "^2.4.2",
"raw-loader": "4.0.2",
"react": "^16.14.0",
"react": "^17.0.2",
"react-dev-utils": "12.0.0",
"react-dom": "^16.14.0",
"react-dom": "^17.0.2",
"react-native-web": "0.12.3",
"react-refresh": "^0.11.0",
"read-json-sync": "2.0.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/app-admin-cognito/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"apollo-client": "^2.6.10",
"apollo-link-context": "^1.0.20",
"emotion": "^10.0.27",
"react": "16.14.0",
"react-dom": "16.14.0"
"react": "17.0.2",
"react-dom": "17.0.2"
},
"devDependencies": {
"@babel/cli": "^7.16.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/app-admin-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.5.5",
"@types/react": "^16.14.0",
"@types/react": "17.0.39",
"@webiny/app": "^5.30.0",
"@webiny/plugins": "^5.30.0",
"@webiny/react-composition": "^5.30.0",
"@webiny/react-router": "^5.30.0",
"lodash.debounce": "^4.0.8",
"react": "16.14.0",
"react-dom": "16.14.0"
"react": "17.0.2",
"react-dom": "17.0.2"
},
"devDependencies": {
"@babel/cli": "^7.5.5",
Expand Down
4 changes: 2 additions & 2 deletions packages/app-admin-okta/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"graphql": "^15.7.2",
"graphql-tag": "^2.12.6",
"lodash.get": "^4.4.2",
"react": "16.14.0",
"react-dom": "16.14.0"
"react": "17.0.2",
"react-dom": "17.0.2"
},
"devDependencies": {
"@babel/cli": "^7.16.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/app-admin-rmwc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@babel/runtime": "^7.5.5",
"@emotion/styled": "^10.0.27",
"@rmwc/base": "7.0.3",
"@types/react": "^16.14.0",
"@types/react": "17.0.39",
"@webiny/app": "^5.30.0",
"@webiny/app-admin": "^5.30.0",
"@webiny/app-plugin-admin-welcome-screen": "^5.30.0",
Expand All @@ -23,8 +23,8 @@
"classnames": "^2.3.1",
"emotion": "^10.0.27",
"lodash": "^4.17.21",
"react": "16.14.0",
"react-dom": "16.14.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-helmet": "^6.1.0",
"react-transition-group": "^4.4.2",
"store": "^2.0.12"
Expand Down
4 changes: 2 additions & 2 deletions packages/app-admin-users-cognito/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"graphql": "^15.7.2",
"graphql-tag": "^2.12.6",
"lodash": "^4.17.21",
"react": "16.14.0",
"react-dom": "16.14.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-helmet": "^6.1.0"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions packages/app-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@emotion/styled": "^10.0.17",
"@svgr/webpack": "^6.1.1",
"@types/mime": "^2.0.3",
"@types/react": "^16.14.0",
"@types/react": "17.0.39",
"@webiny/app": "^5.30.0",
"@webiny/app-admin-core": "^5.30.0",
"@webiny/app-security": "^5.30.0",
Expand Down Expand Up @@ -51,11 +51,11 @@
"minimatch": "^3.0.4",
"nanoid": "^3.1.23",
"prop-types": "^15.7.2",
"react": "16.14.0",
"react": "17.0.2",
"react-butterfiles": "^1.3.1",
"react-dom": "16.14.0",
"react-dom": "17.0.2",
"react-hotkeyz": "^1.0.4",
"react-lazy-load": "^3.0.13",
"react-lazy-load": "^3.1.14",
"react-transition-group": "^4.3.0",
"semver": "^7.3.4",
"store": "^2.0.12"
Expand Down
6 changes: 3 additions & 3 deletions packages/app-apw/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@emotion/core": "^10.0.27",
"@emotion/is-prop-valid": "^1.1.1",
"@emotion/styled": "^10.0.27",
"@types/react": "^16.9.56",
"@types/react": "17.0.39",
"@webiny/app": "^5.30.0",
"@webiny/app-admin": "^5.30.0",
"@webiny/app-headless-cms": "^5.30.0",
Expand All @@ -37,8 +37,8 @@
"lodash": "^4.17.11",
"nanoid": "^3.1.20",
"prop-types": "^15.7.2",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-helmet": "^6.1.0",
"react-spinner-material": "1.1.4"
},
Expand Down
10 changes: 7 additions & 3 deletions packages/app-apw/src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export const Box = styled("div", {
/**
* We don't want to pass "display" and "width" properties to underlying "div" HTML tag.
*/
shouldForwardProp: prop => isPropValid(prop) && !IGNORED_PROPS.includes(prop)
shouldForwardProp: (prop: string) => isPropValid(prop) && !IGNORED_PROPS.includes(prop)
})(StyledBox);

interface ColumnsProps extends StyledBoxProps {
Expand All @@ -151,7 +151,11 @@ export const Columns: React.FC<ColumnsProps> = ({ children, space, ...props }) =
childProps["marginLeft"] = space;
}

return React.cloneElement(child, { ...childProps, ...child.props });
if (React.isValidElement(child)) {
return React.cloneElement(child, { ...childProps, ...child.props });
}

return child;
})}
</Box>
);
Expand All @@ -170,7 +174,7 @@ export const Stack: React.FC<StackProps> = ({ children, space, ...props }) => {
if (child === null) {
return child;
}
if (index > 0) {
if (index > 0 && React.isValidElement(child)) {
return React.cloneElement(child, { marginTop: space });
}

Expand Down
4 changes: 2 additions & 2 deletions packages/app-cognito-authenticator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"dependencies": {
"@aws-amplify/auth": "^4.0.2",
"lodash.get": "^4.4.2",
"react": "16.14.0",
"react-dom": "16.14.0"
"react": "17.0.2",
"react-dom": "17.0.2"
},
"devDependencies": {
"@babel/cli": "^7.16.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/app-file-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@babel/runtime": "^7.16.3",
"@emotion/core": "^10.0.27",
"@emotion/styled": "^10.0.27",
"@types/react": "^16.14.0",
"@types/react": "17.0.39",
"@webiny/app": "^5.30.0",
"@webiny/app-admin": "^5.30.0",
"@webiny/app-security": "^5.30.0",
Expand All @@ -31,8 +31,8 @@
"graphql-tag": "^2.12.6",
"lodash.get": "^4.4.2",
"prop-types": "^15.7.2",
"react": "16.14.0",
"react-dom": "16.14.0"
"react": "17.0.2",
"react-dom": "17.0.2"
},
"devDependencies": {
"@babel/cli": "^7.16.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/app-form-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@emotion/core": "^10.0.17",
"@emotion/styled": "^10.0.17",
"@svgr/webpack": "^6.1.1",
"@types/react": "^16.14.0",
"@types/react": "17.0.39",
"@webiny/app": "^5.30.0",
"@webiny/app-admin": "^5.30.0",
"@webiny/app-page-builder": "^5.30.0",
Expand All @@ -40,10 +40,10 @@
"graphql-tag": "^2.12.6",
"lodash": "^4.17.10",
"prop-types": "^15.7.2",
"react": "16.14.0",
"react": "17.0.2",
"react-dnd": "^11.1.3",
"react-dnd-html5-backend": "^11.1.3",
"react-dom": "16.14.0",
"react-dom": "17.0.2",
"react-google-recaptcha": "^1.1.0",
"react-hotkeyz": "^1.0.4",
"react-sortable-hoc": "^1.9.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/app-graphql-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"graphql": "^15.7.2",
"load-script": "^1.0.0",
"prop-types": "^15.7.2",
"react": "16.14.0",
"react-dom": "16.14.0"
"react": "17.0.2",
"react-dom": "17.0.2"
},
"devDependencies": {
"@babel/cli": "^7.16.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/app-headless-cms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@fortawesome/free-solid-svg-icons": "^6.0.0",
"@fortawesome/react-fontawesome": "^0.1.17",
"@svgr/webpack": "^6.1.1",
"@types/react": "^16.14.0",
"@types/react": "17.0.39",
"@webiny/app": "^5.30.0",
"@webiny/app-admin": "^5.30.0",
"@webiny/app-graphql-playground": "^5.30.0",
Expand Down Expand Up @@ -56,11 +56,11 @@
"pluralize": "^8.0.0",
"prop-types": "^15.7.2",
"raw.macro": "^0.4.2",
"react": "16.14.0",
"react": "17.0.2",
"react-custom-scrollbars": "^4.2.1",
"react-dnd": "^11.1.3",
"react-dnd-html5-backend": "^11.1.3",
"react-dom": "16.14.0",
"react-dom": "17.0.2",
"react-helmet": "^6.1.0",
"react-hotkeyz": "^1.0.4",
"react-virtualized": "^9.21.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/app-i18n-content/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"@webiny/plugins": "^5.30.0",
"@webiny/ui": "^5.30.0",
"emotion": "^10.0.17",
"react": "16.14.0",
"react-dom": "16.14.0"
"react": "17.0.2",
"react-dom": "17.0.2"
},
"devDependencies": {
"@babel/cli": "^7.16.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/app-i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@babel/runtime": "^7.16.3",
"@emotion/core": "^10.0.27",
"@emotion/styled": "^10.0.27",
"@types/react": "^16.14.0",
"@types/react": "17.0.39",
"@webiny/app": "^5.30.0",
"@webiny/app-admin": "^5.30.0",
"@webiny/app-security": "^5.30.0",
Expand All @@ -35,8 +35,8 @@
"graphql-tag": "^2.12.6",
"lodash": "^4.17.11",
"prop-types": "^15.7.2",
"react": "16.14.0",
"react-dom": "16.14.0"
"react": "17.0.2",
"react-dom": "17.0.2"
},
"devDependencies": {
"@babel/cli": "^7.16.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/app-page-builder-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@babel/runtime": "^7.16.3",
"@emotion/core": "^10.0.17",
"@svgr/webpack": "^6.1.1",
"@types/react": "^16.14.0",
"@types/react": "17.0.39",
"@webiny/app": "^5.30.0",
"@webiny/app-admin": "^5.30.0",
"@webiny/app-page-builder": "^5.30.0",
Expand All @@ -29,10 +29,10 @@
"lodash": "^4.17.10",
"nanoid": "^3.1.20",
"prop-types": "^15.7.2",
"react": "16.14.0",
"react": "17.0.2",
"react-dnd": "^11.1.3",
"react-dnd-html5-backend": "^11.1.3",
"react-dom": "16.14.0",
"react-dom": "17.0.2",
"recoil": "^0.1.2"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/app-page-builder-elements/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"csstype": "^3.0.11"
},
"peerDependencies": {
"react": "^16.14.0"
"react": "^17.0.2"
},
"devDependencies": {
"@babel/cli": "^7.16.0",
Expand All @@ -27,7 +27,7 @@
"@babel/preset-env": "^7.16.4",
"@babel/preset-react": "^7.16.0",
"@babel/preset-typescript": "^7.16.0",
"@types/react": "^16.14.0",
"@types/react": "17.0.39",
"@types/resize-observer-browser": "^0.1.4",
"@webiny/cli": "^5.30.0",
"@webiny/project-utils": "^5.30.0",
Expand Down
Loading

0 comments on commit d4c52ed

Please sign in to comment.