Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update react monorepo to v18 (major) #7410

Merged
merged 18 commits into from
May 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .changeset/small-islands-marry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
'@keystone-ui/button': major
'@keystone-ui/core': major
'@keystone-ui/fields': major
'@keystone-ui/icons': major
'@keystone-ui/loading': major
'@keystone-ui/modals': major
'@keystone-ui/notice': major
'@keystone-ui/options': major
'@keystone-ui/pill': major
'@keystone-ui/popover': major
'@keystone-ui/segmented-control': major
'@keystone-ui/toast': major
'@keystone-ui/tooltip': major
'@keystone-ui/website': major
'@keystone-6/auth': major
'@keystone-6/cloudinary': major
'@keystone-6/core': major
'@keystone-6/document-renderer': minor
'@keystone-6/fields-document': major
'@keystone-6/website': patch
'@keystone-6/example-auth': patch
'@keystone-6/examples-app-basic': patch
'@keystone-6/example-ecommerce': patch
'@keystone-6/example-embedded-nextjs': patch
'@keystone-6/example-roles': patch
'@keystone-6/example-custom-admin-ui-logo': patch
'@keystone-6/example-custom-admin-ui-navigation': patch
'@keystone-6/example-custom-admin-ui-pages': patch
'@keystone-6/example-custom-field': patch
'@keystone-6/example-custom-field-view': patch
'@keystone-6/example-document-field': patch
'@keystone-6/admin-ui-tests': patch
---

upgrade dependancy `"react": "^18.1.0"`
4 changes: 2 additions & 2 deletions design-system/packages/button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"main": "dist/keystone-ui-button.cjs.js",
"module": "dist/keystone-ui-button.esm.js",
"devDependencies": {
"@types/react": "^17.0.37"
"@types/react": "^18.0.9"
},
"dependencies": {
"@babel/runtime": "^7.16.3",
"@keystone-ui/core": "^4.0.0",
"@keystone-ui/icons": "^5.0.0",
"@keystone-ui/loading": "^5.0.0",
"react": "^17.0.2"
"react": "^18.1.0"
},
"engines": {
"node": "^14.15 || ^16.13"
Expand Down
10 changes: 5 additions & 5 deletions design-system/packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"main": "dist/keystone-ui-core.cjs.js",
"module": "dist/keystone-ui-core.esm.js",
"devDependencies": {
"@types/react": "^17.0.37",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"@types/react": "^18.0.9",
"react": "^18.1.0",
"react-dom": "^18.1.0"
},
"peerDependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2"
"react": "^18.1.0",
"react-dom": "^18.1.0"
},
"dependencies": {
"@babel/runtime": "^7.16.3",
Expand Down
4 changes: 2 additions & 2 deletions design-system/packages/fields/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"main": "dist/keystone-ui-fields.cjs.js",
"module": "dist/keystone-ui-fields.esm.js",
"devDependencies": {
"@types/react": "^17.0.37"
"@types/react": "^18.0.9"
},
"dependencies": {
"@babel/runtime": "^7.16.3",
"@keystone-ui/core": "^4.0.0",
"@keystone-ui/icons": "^5.0.0",
"@keystone-ui/popover": "^5.0.1",
"date-fns": "^2.26.0",
"react": "^17.0.2",
"react": "^18.1.0",
"react-day-picker": "^8.0.4",
"react-focus-lock": "^2.7.1",
"react-select": "^5.2.1"
Expand Down
2 changes: 1 addition & 1 deletion design-system/packages/fields/src/DatePicker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export type DatePickerProps = {

export function useEventCallback<Func extends (...args: any) => any>(callback: Func): Func {
const callbackRef = useRef(callback);
const cb = useCallback((...args) => {
const cb = useCallback((...args: any[]) => {
return callbackRef.current(...args);
}, []);
useEffect(() => {
Expand Down
6 changes: 3 additions & 3 deletions design-system/packages/icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@
"@svgr/plugin-jsx": "^6.0.0",
"@svgr/plugin-prettier": "^5.5.0",
"@svgr/plugin-svgo": "^6.0.0",
"@types/react": "^17.0.37",
"@types/react": "^18.0.9",
"chalk": "^4.1.2",
"feather-icons": "^4.28.0",
"fs-extra": "^10.0.0",
"globby": "^11.0.4",
"react": "^17.0.2",
"react": "^18.1.0",
"to-pascal-case": "^1.0.0"
},
"dependencies": {
"@babel/runtime": "^7.16.3",
"@keystone-ui/core": "^4.0.0"
},
"peerDependencies": {
"react": "^17.0.2"
"react": "^18.1.0"
},
"engines": {
"node": "^14.15 || ^16.13"
Expand Down
4 changes: 2 additions & 2 deletions design-system/packages/loading/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"main": "dist/keystone-ui-loading.cjs.js",
"module": "dist/keystone-ui-loading.esm.js",
"devDependencies": {
"@types/react": "^17.0.37"
"@types/react": "^18.0.9"
},
"dependencies": {
"@babel/runtime": "^7.16.3",
"@keystone-ui/core": "^4.0.0",
"react": "^17.0.2"
"react": "^18.1.0"
},
"engines": {
"node": "^14.15 || ^16.13"
Expand Down
4 changes: 2 additions & 2 deletions design-system/packages/modals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"main": "dist/keystone-ui-modals.cjs.js",
"module": "dist/keystone-ui-modals.esm.js",
"devDependencies": {
"@types/react": "^17.0.37"
"@types/react": "^18.0.9"
},
"dependencies": {
"@babel/runtime": "^7.16.3",
"@keystone-ui/button": "^6.0.0",
"@keystone-ui/core": "^4.0.0",
"react": "^17.0.2",
"react": "^18.1.0",
"react-focus-lock": "^2.7.1",
"react-remove-scroll": "^2.4.3",
"react-transition-group": "^4.4.2"
Expand Down
2 changes: 2 additions & 0 deletions design-system/packages/modals/src/DrawerBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const blanketTransition = {
entered: { opacity: 1 },
exiting: { opacity: 0 },
exited: { opacity: 0 },
unmounted: { opacity: 0 },
};

export const DrawerBase = ({
Expand Down Expand Up @@ -142,5 +143,6 @@ function getDialogTransition(depth: number) {
entered: { transform: transformValue },
exiting: { transform: 'translateX(100%)' },
exited: { transform: 'translateX(100%)' },
unmounted: { transform: 'none' },
};
}
2 changes: 1 addition & 1 deletion design-system/packages/modals/src/DrawerController.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const useDrawerControllerContext = () => {
export const DrawerController = ({ isOpen, children }: DrawerControllerProps) => {
return (
<Transition appear mountOnEnter unmountOnExit in={isOpen} timeout={150}>
{(transitionState: TransitionState) => (
{transitionState => (
<DrawerControllerContextProvider value={transitionState}>
{children}
</DrawerControllerContextProvider>
Expand Down
2 changes: 1 addition & 1 deletion design-system/packages/modals/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export type ActionsType = {
};
};

export type TransitionState = 'entering' | 'entered' | 'exiting' | 'exited';
export type TransitionState = 'entering' | 'entered' | 'exiting' | 'exited' | 'unmounted';
4 changes: 2 additions & 2 deletions design-system/packages/notice/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"main": "dist/keystone-ui-notice.cjs.js",
"module": "dist/keystone-ui-notice.esm.js",
"devDependencies": {
"@types/react": "^17.0.37"
"@types/react": "^18.0.9"
},
"dependencies": {
"@babel/runtime": "^7.16.3",
"@keystone-ui/button": "^6.0.0",
"@keystone-ui/core": "^4.0.0",
"@keystone-ui/icons": "^5.0.0",
"react": "^17.0.2"
"react": "^18.1.0"
},
"engines": {
"node": "^14.15 || ^16.13"
Expand Down
4 changes: 2 additions & 2 deletions design-system/packages/options/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"main": "dist/keystone-ui-options.cjs.js",
"module": "dist/keystone-ui-options.esm.js",
"peerDependencies": {
"react": "^17.0.2"
"react": "^18.1.0"
},
"devDependencies": {
"react": "^17.0.2"
"react": "^18.1.0"
},
"dependencies": {
"@babel/runtime": "^7.16.3",
Expand Down
4 changes: 2 additions & 2 deletions design-system/packages/pill/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"main": "dist/keystone-ui-pill.cjs.js",
"module": "dist/keystone-ui-pill.esm.js",
"peerDependencies": {
"react": "^17.0.2"
"react": "^18.1.0"
},
"devDependencies": {
"react": "^17.0.2"
"react": "^18.1.0"
},
"dependencies": {
"@babel/runtime": "^7.16.3",
Expand Down
8 changes: 4 additions & 4 deletions design-system/packages/popover/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"main": "dist/keystone-ui-popover.cjs.js",
"module": "dist/keystone-ui-popover.esm.js",
"peerDependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2"
"react": "^18.1.0",
"react-dom": "^18.1.0"
},
"devDependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2"
"react": "^18.1.0",
"react-dom": "^18.1.0"
},
"dependencies": {
"@babel/runtime": "^7.16.3",
Expand Down
6 changes: 3 additions & 3 deletions design-system/packages/segmented-control/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"main": "dist/keystone-ui-segmented-control.cjs.js",
"module": "dist/keystone-ui-segmented-control.esm.js",
"devDependencies": {
"@types/react": "^17.0.37",
"react": "^17.0.2"
"@types/react": "^18.0.9",
"react": "^18.1.0"
},
"dependencies": {
"@babel/runtime": "^7.16.3",
"@keystone-ui/core": "^4.0.0"
},
"peerDependencies": {
"react": "^17.0.2"
"react": "^18.1.0"
},
"engines": {
"node": "^14.15 || ^16.13"
Expand Down
6 changes: 3 additions & 3 deletions design-system/packages/toast/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
"main": "dist/keystone-ui-toast.cjs.js",
"module": "dist/keystone-ui-toast.esm.js",
"devDependencies": {
"@types/react": "^17.0.37",
"react": "^17.0.2"
"@types/react": "^18.0.9",
"react": "^18.1.0"
},
"dependencies": {
"@babel/runtime": "^7.16.3",
"@keystone-ui/core": "^4.0.0",
"@keystone-ui/icons": "^5.0.0"
},
"peerDependencies": {
"react": "^17.0.2"
"react": "^18.1.0"
},
"engines": {
"node": "^14.15 || ^16.13"
Expand Down
8 changes: 4 additions & 4 deletions design-system/packages/tooltip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"main": "dist/keystone-ui-tooltip.cjs.js",
"module": "dist/keystone-ui-tooltip.esm.js",
"peerDependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2"
"react": "^18.1.0",
"react-dom": "^18.1.0"
},
"devDependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2"
"react": "^18.1.0",
"react-dom": "^18.1.0"
},
"dependencies": {
"@babel/runtime": "^7.16.3",
Expand Down
10 changes: 5 additions & 5 deletions design-system/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
"@keystone-ui/toast": "^5.0.0",
"@keystone-ui/tooltip": "^5.0.0",
"@preconstruct/next": "^4.0.0",
"@types/react": "^17.0.37",
"@types/react-dom": "^17.0.11",
"@types/react": "^18.0.9",
"@types/react-dom": "^18.0.4",
"@types/tinycolor2": "^1.4.3",
"next": "^12.1.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"next": "^12.1.5",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"tinycolor2": "^1.4.2"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions docs/components/primitives/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @jsxRuntime classic */
/** @jsx jsx */
import { Fragment, FunctionComponent, ReactNode } from 'react';
import { Fragment, ElementType, ReactNode } from 'react';
import { jsx } from '@emotion/react';
import Link from 'next/link';

Expand Down Expand Up @@ -128,7 +128,7 @@ export const Button = forwardRefWithAs<'button', ButtonProps>(
},
ref
) => {
let Wrapper: FunctionComponent = Fragment;
let Wrapper: ElementType<{ children: ReactNode }> = Fragment;

if (Tag === 'a' && !href) {
Tag = 'button';
Expand Down
10 changes: 5 additions & 5 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@
"@sindresorhus/slugify": "^1.1.2",
"@types/gtag.js": "^0.0.10",
"@types/mdx-js__react": "^1.5.5",
"@types/react": "^17.0.37",
"@types/react-dom": "^17.0.11",
"@types/react": "^18.0.9",
"@types/react-dom": "^18.0.4",
"classnames": "^2.3.1",
"copy-to-clipboard": "^3.3.1",
"date-fns": "^2.26.0",
"facepaint": "^1.2.1",
"lodash.debounce": "^4.0.8",
"next": "^12.1.0",
"next": "^12.1.5",
"next-compose-plugins": "^2.2.1",
"prism-react-renderer": "^1.2.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-focus-lock": "^2.7.1",
"react-toast-notifications": "^2.5.1",
"remark-gfm": "^1.0.0",
Expand Down
8 changes: 4 additions & 4 deletions docs/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class MyDocument extends Document {
const initialProps = await Document.getInitialProps(ctx);
return {
...initialProps,
styles: (
<React.Fragment>
styles: [
<React.Fragment key="1">
{initialProps.styles}
{data!.styles.map((data, i) => (
<style
Expand All @@ -40,8 +40,8 @@ class MyDocument extends Document {
dangerouslySetInnerHTML={{ __html: data.css }}
/>
))}
</React.Fragment>
),
</React.Fragment>,
],
};
}

Expand Down
6 changes: 3 additions & 3 deletions examples-staging/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"dependencies": {
"@keystone-6/auth": "^2.0.0",
"@keystone-6/core": "^1.1.1",
"next": "^12.1.0",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"next": "^12.1.5",
"react": "^18.1.0",
"react-dom": "^18.1.0"
},
"devDependencies": {
"typescript": "^4.4.4"
Expand Down
Loading