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

[core] Bump react 19 in v5 #44720

Merged
merged 17 commits into from
Dec 11, 2024
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
10 changes: 5 additions & 5 deletions apps/pigment-css-next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
"@emotion/cache": "latest",
"local-ui-lib": "workspace:^",
"next": "latest",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@pigment-css/unplugin": "file:../../packages/pigment-css-unplugin",
"@pigment-css/nextjs-plugin": "file:../../packages/pigment-css-nextjs-plugin",
"@types/node": "^20.5.7",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "^8.56.0",
"typescript": "^5.3.3"
"typescript": "^5.6.3"
}
}
8 changes: 4 additions & 4 deletions apps/pigment-css-vite-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"@mui/icons-material": "file:../../packages/mui-icons-material/build",
"clsx": "^2.1.0",
"local-ui-lib": "workspace:^",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-router": "^6.22.1",
"react-router-dom": "^6.22.1"
},
Expand All @@ -27,8 +27,8 @@
"@babel/preset-react": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@pigment-css/vite-plugin": "file:../../packages/pigment-css-vite-plugin",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.2.1",
"postcss": "^8.4.35",
"postcss-combine-media-query": "^1.0.1",
Expand Down
10 changes: 5 additions & 5 deletions benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
},
"dependencies": {
"@chakra-ui/system": "^2.6.2",
"@emotion/react": "^11.11.4",
"@emotion/react": "^11.13.5",
"@emotion/server": "^11.11.0",
"@emotion/styled": "^11.11.0",
"@emotion/styled": "^11.13.5",
"@mui/material": "workspace:^",
"@mui/styles": "workspace:^",
"@mui/system": "workspace:^",
Expand All @@ -26,9 +26,9 @@
"jss": "^10.10.0",
"playwright": "^1.42.1",
"prop-types": "^15.8.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-is": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-is": "^19.0.0",
"react-jss": "^10.10.0",
"react-redux": "^8.1.3",
"redux": "^4.2.1",
Expand Down
1 change: 1 addition & 0 deletions docs/data/base/components/modal/SpringModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const Fade = React.forwardRef(function Fade(props, ref) {
});

return (
// @ts-expect-error https://github.com/pmndrs/react-spring/issues/2341
<animated.div ref={ref} style={style} {...other}>
{children}
</animated.div>
Expand Down
1 change: 1 addition & 0 deletions docs/data/base/components/modal/SpringModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ const Fade = React.forwardRef<HTMLDivElement, FadeProps>(function Fade(props, re
});

return (
// @ts-expect-error https://github.com/pmndrs/react-spring/issues/2341
<animated.div ref={ref} style={style} {...other}>
{children}
</animated.div>
Expand Down
5 changes: 4 additions & 1 deletion docs/data/base/components/transitions/ReactSpring.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ function ReactSpringTransition({ children }) {
}
}, [requestedEnter, api, onExited]);

return <animated.div style={springs}>{children}</animated.div>;
return (
// @ts-expect-error https://github.com/pmndrs/react-spring/issues/2341
<animated.div style={springs}>{children}</animated.div>
);
}

ReactSpringTransition.propTypes = {
Expand Down
5 changes: 4 additions & 1 deletion docs/data/base/components/transitions/ReactSpring.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,5 +139,8 @@ function ReactSpringTransition({ children }: React.PropsWithChildren<{}>) {
}
}, [requestedEnter, api, onExited]);

return <animated.div style={springs}>{children}</animated.div>;
return (
// @ts-expect-error https://github.com/pmndrs/react-spring/issues/2341
<animated.div style={springs}>{children}</animated.div>
);
}
4 changes: 2 additions & 2 deletions docs/data/base/getting-started/quickstart/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ Please note that [react](https://www.npmjs.com/package/react) and [react-dom](ht

```json
"peerDependencies": {
"react": "^17.0.0 || ^18.0.0",
"react-dom": "^17.0.0 || ^18.0.0"
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
},
```

Expand Down
4 changes: 2 additions & 2 deletions docs/data/joy/getting-started/installation/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ Please note that [react](https://www.npmjs.com/package/react) and [react-dom](ht

```json
"peerDependencies": {
"react": "^17.0.0 || ^18.0.0",
"react-dom": "^17.0.0 || ^18.0.0"
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
},
```

Expand Down
1 change: 1 addition & 0 deletions docs/data/material/components/modal/SpringModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const Fade = React.forwardRef(function Fade(props, ref) {
});

return (
// @ts-expect-error https://github.com/pmndrs/react-spring/issues/2341
<animated.div ref={ref} style={style} {...other}>
{React.cloneElement(children, { onClick })}
</animated.div>
Expand Down
1 change: 1 addition & 0 deletions docs/data/material/components/modal/SpringModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const Fade = React.forwardRef<HTMLDivElement, FadeProps>(function Fade(props, re
});

return (
// @ts-expect-error https://github.com/pmndrs/react-spring/issues/2341
<animated.div ref={ref} style={style} {...other}>
{React.cloneElement(children, { onClick })}
</animated.div>
Expand Down
1 change: 1 addition & 0 deletions docs/data/material/components/popper/SpringPopper.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const Fade = React.forwardRef(function Fade(props, ref) {
});

return (
// @ts-expect-error https://github.com/pmndrs/react-spring/issues/2341
<animated.div ref={ref} style={style} {...other}>
{children}
</animated.div>
Expand Down
1 change: 1 addition & 0 deletions docs/data/material/components/popper/SpringPopper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const Fade = React.forwardRef<HTMLDivElement, FadeProps>(function Fade(props, re
});

return (
// @ts-expect-error https://github.com/pmndrs/react-spring/issues/2341
<animated.div ref={ref} style={style} {...other}>
{children}
</animated.div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ Please note that [react](https://www.npmjs.com/package/react) and [react-dom](ht

```json
"peerDependencies": {
"react": "^17.0.0 || ^18.0.0",
"react-dom": "^17.0.0 || ^18.0.0"
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
},
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Please note that [react](https://www.npmjs.com/package/react) is a peer dependen

```json
"peerDependencies": {
"react": "^17.0.0 || ^18.0.0"
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
},
```

Expand Down
2 changes: 1 addition & 1 deletion docs/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.
9 changes: 3 additions & 6 deletions docs/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ const pkgContent = fs.readFileSync(path.resolve(workspaceRoot, 'package.json'),
const pkg = JSON.parse(pkgContent);

export default withDocsInfra({
experimental: {
workerThreads: true,
cpus: 3,
},
webpack: (config, options) => {
const plugins = config.plugins.slice();

Expand All @@ -60,7 +56,8 @@ export default withDocsInfra({
// We only care about Node runtime at this point.
(options.nextRuntime === undefined || options.nextRuntime === 'nodejs')
) {
const [nextExternals, ...externals] = config.externals;
const externals = config.externals.slice(0, -1);
const nextExternals = config.externals.at(-1);

config.externals = [
// @ts-ignore
Expand Down Expand Up @@ -104,7 +101,7 @@ export default withDocsInfra({
// for 3rd party packages with dependencies in this repository
'@mui/material': path.resolve(workspaceRoot, 'packages/mui-material/src'),
'@mui/docs': path.resolve(workspaceRoot, 'packages/mui-docs/src'),
'@mui/icons-material': path.resolve(workspaceRoot, 'packages/mui-icons-material/lib'),
'@mui/icons-material': path.resolve(workspaceRoot, 'packages/mui-icons-material/lib/esm'),
'@mui/lab': path.resolve(workspaceRoot, 'packages/mui-lab/src'),
'@mui/styled-engine': path.resolve(workspaceRoot, 'packages/mui-styled-engine/src'),
'@mui/styles': path.resolve(workspaceRoot, 'packages/mui-styles/src'),
Expand Down
2 changes: 2 additions & 0 deletions docs/nextConfigDocsInfra.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ function withDocsInfra(nextConfig) {
experimental: {
scrollRestoration: true,
esmExternals: false,
workerThreads: false,
cpus: 3,
...nextConfig.experimental,
},
eslint: {
Expand Down
22 changes: 11 additions & 11 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
"@babel/runtime": "^7.23.9",
"@babel/runtime-corejs2": "^7.23.9",
"@docsearch/react": "^3.6.0",
"@emotion/cache": "^11.11.0",
"@emotion/react": "^11.11.4",
"@emotion/cache": "^11.13.5",
"@emotion/react": "^11.13.5",
"@emotion/server": "^11.11.0",
"@emotion/styled": "^11.11.0",
"@emotion/styled": "^11.13.5",
"@fortawesome/fontawesome-svg-core": "^6.5.1",
"@fortawesome/free-solid-svg-icons": "^6.5.1",
"@fortawesome/react-fontawesome": "^0.2.0",
"@fortawesome/react-fontawesome": "^0.2.2",
"@mui/base": "workspace:*",
"@mui/docs": "workspace:^",
"@mui/icons-material": "workspace:^",
Expand Down Expand Up @@ -82,19 +82,19 @@
"lz-string": "^1.5.0",
"markdown-to-jsx": "^7.4.3",
"material-ui-popup-state": "^5.0.10",
"next": "^13.5.1",
"next": "^15.0.4",
"notistack": "3.0.1",
"nprogress": "^0.2.0",
"postcss": "^8.4.35",
"postcss-import": "^15.1.0",
"prop-types": "^15.8.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-draggable": "^4.4.6",
"react-final-form": "^6.5.9",
"react-imask": "^7.5.0",
"react-intersection-observer": "^9.8.1",
"react-is": "^18.3.1",
"react-is": "^19.0.0",
"react-number-format": "^5.3.3",
"react-router-dom": "^6.21.3",
"react-runner": "^1.0.3",
Expand Down Expand Up @@ -122,10 +122,10 @@
"@types/chai": "^4.3.12",
"@types/css-mediaquery": "^0.1.4",
"@types/json2mq": "^0.2.2",
"@types/node": "^18.19.25",
"@types/node": "^18.19.48",
"@types/prop-types": "^15.7.12",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@types/react-swipeable-views": "^0.13.5",
"@types/react-swipeable-views-utils": "^0.13.7",
"@types/react-transition-group": "^4.4.10",
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/utils/useClipboardCopy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import clipboardCopy from 'clipboard-copy';

export default function useClipboardCopy() {
const [isCopied, setIsCopied] = React.useState(false);
const timeout = React.useRef<ReturnType<typeof setTimeout>>();
const timeout = React.useRef<ReturnType<typeof setTimeout>>(undefined);
const mounted = React.useRef(false);

React.useEffect(() => {
Expand Down
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@
"@types/fs-extra": "^11.0.4",
"@types/lodash": "^4.17.0",
"@types/mocha": "^10.0.6",
"@types/node": "^18.19.25",
"@types/node": "^18.19.48",
"@types/prettier": "^2.7.3",
"@types/react": "^18.3.3",
"@types/react": "^19.0.0",
"@types/yargs": "^17.0.32",
"@typescript-eslint/eslint-plugin": "^6.19.1",
"@typescript-eslint/parser": "^6.19.1",
Expand Down Expand Up @@ -185,7 +185,7 @@
"terser-webpack-plugin": "^5.3.10",
"tsup": "^8.0.2",
"tsx": "^4.7.1",
"typescript": "^5.3.3",
"typescript": "^5.6.3",
"webpack": "^5.90.3",
"webpack-bundle-analyzer": "^4.10.1",
"webpack-cli": "^5.1.4",
Expand Down Expand Up @@ -213,9 +213,7 @@
"@definitelytyped/header-parser": "^0.2.8",
"@definitelytyped/typescript-versions": "^0.1.1",
"@definitelytyped/utils": "^0.1.5",
"@types/node": "^18.19.25",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"@types/node": "^18.19.48",
"cross-fetch": "^4.0.0"
},
"nyc": {
Expand Down
2 changes: 1 addition & 1 deletion packages-internal/docs-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"dependencies": {
"rimraf": "^5.0.5",
"typescript": "^5.3.3"
"typescript": "^5.6.3"
},
"publishConfig": {
"access": "public"
Expand Down
6 changes: 3 additions & 3 deletions packages-internal/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@mui/internal-docs-utils": "workspace:^",
"doctrine": "^3.0.0",
"lodash": "^4.17.21",
"typescript": "^5.3.3",
"typescript": "^5.6.3",
"uuid": "^9.0.1"
},
"devDependencies": {
Expand All @@ -42,9 +42,9 @@
"@types/chai": "^4.3.12",
"@types/doctrine": "^0.0.9",
"@types/lodash": "^4.17.0",
"@types/node": "^18.19.25",
"@types/node": "^18.19.48",
"@types/prettier": "^2.7.3",
"@types/react": "^18.3.3",
"@types/react": "^19.0.0",
"@types/uuid": "^9.0.8",
"chai": "^4.4.1",
"fast-glob": "^3.3.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/api-docs-builder-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"devDependencies": {
"@types/chai": "^4.3.12",
"@types/mocha": "^10.0.6",
"@types/node": "^18.19.25",
"@types/node": "^18.19.48",
"@types/sinon": "^10.0.20",
"chai": "^4.4.1",
"sinon": "^15.2.0",
"typescript": "^5.3.3"
"typescript": "^5.6.3"
}
}
4 changes: 2 additions & 2 deletions packages/api-docs-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"react-docgen": "^5.4.3",
"recast": "^0.23.6",
"remark": "^13.0.0",
"typescript": "^5.3.3",
"typescript": "^5.6.3",
"unist-util-visit": "^2.0.3"
},
"devDependencies": {
Expand All @@ -32,7 +32,7 @@
"@types/doctrine": "^0.0.9",
"@types/mdast": "4.0.3",
"@types/mocha": "^10.0.6",
"@types/node": "^18.19.25",
"@types/node": "^18.19.48",
"@types/react-docgen": "workspace:*",
"@types/sinon": "^10.0.20",
"chai": "^4.4.1",
Expand Down
Loading
Loading