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 5 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
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
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
5 changes: 3 additions & 2 deletions docs/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,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 +105,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
1 change: 1 addition & 0 deletions docs/nextConfigDocsInfra.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ function withDocsInfra(nextConfig) {
experimental: {
scrollRestoration: true,
esmExternals: false,
workerThreads: false,
...nextConfig.experimental,
},
eslint: {
Expand Down
18 changes: 9 additions & 9 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
"@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",
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 @@ -124,8 +124,8 @@
"@types/json2mq": "^0.2.2",
"@types/node": "^18.19.25",
"@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
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"@types/mocha": "^10.0.6",
"@types/node": "^18.19.25",
"@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 @@ -214,8 +214,6 @@
"@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",
"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
4 changes: 2 additions & 2 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 @@ -44,7 +44,7 @@
"@types/lodash": "^4.17.0",
"@types/node": "^18.19.25",
"@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
2 changes: 1 addition & 1 deletion packages/api-docs-builder-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
"@types/sinon": "^10.0.20",
"chai": "^4.4.1",
"sinon": "^15.2.0",
"typescript": "^5.3.3"
"typescript": "^5.6.3"
}
}
2 changes: 1 addition & 1 deletion 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 Down
14 changes: 7 additions & 7 deletions packages/mui-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,20 @@
"@testing-library/user-event": "^14.5.2",
"@types/chai": "^4.3.12",
"@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/sinon": "^10.0.20",
"chai": "^4.4.1",
"fast-glob": "^3.3.2",
"lodash": "^4.17.21",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"sinon": "^15.2.0"
},
"peerDependencies": {
"@types/react": "^17.0.0 || ^18.0.0",
"react": "^17.0.0 || ^18.0.0",
"react-dom": "^17.0.0 || ^18.0.0"
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
},
"peerDependenciesMeta": {
"@types/react": {
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-base/src/Badge/Badge.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export type BadgeRootSlotProps = {
children?: React.ReactNode;
className?: string;
ownerState: BadgeOwnerState;
ref: React.Ref<HTMLSpanElement>;
ref?: React.Ref<HTMLSpanElement>;
};

export type BadgeBadgeSlotProps = {
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-base/src/Input/Input.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export type InputInputSlotProps = Simplify<
ownerState: InputOwnerState;
placeholder: string | undefined;
readOnly: boolean | undefined;
ref: React.Ref<HTMLInputElement>;
ref?: React.Ref<HTMLInputElement>;
type: React.HTMLInputTypeAttribute | undefined;
}
>;
2 changes: 1 addition & 1 deletion packages/mui-base/src/MenuItem/MenuItem.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export type MenuItemRootSlotProps = Simplify<
UseMenuItemRootSlotProps & {
children?: React.ReactNode;
className: string;
ref: React.Ref<HTMLElement>;
ref?: React.Ref<HTMLElement>;
ownerState: MenuItemOwnerState;
}
>;
7 changes: 3 additions & 4 deletions packages/mui-base/src/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ const useUtilityClasses = (ownerState: ModalOwnerState) => {
*
* - [Modal API](https://mui.com/base-ui/react-modal/components-api/#modal)
*/
const Modal = React.forwardRef(function Modal<RootComponentType extends React.ElementType>(
props: ModalProps<RootComponentType>,
forwardedRef: React.ForwardedRef<HTMLElement>,
) {
const Modal = React.forwardRef<HTMLElement, ModalProps>(function Modal<
RootComponentType extends React.ElementType,
>(props: ModalProps<RootComponentType>, forwardedRef: React.ForwardedRef<HTMLElement>) {
const {
children,
closeAfterTransition = false,
Expand Down
8 changes: 4 additions & 4 deletions packages/mui-base/src/Option/Option.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ function useUtilityClasses<OptionValue>(ownerState: OptionOwnerState<OptionValue
}

const InnerOption = React.memo(
React.forwardRef(function Option<OptionValue, RootComponentType extends React.ElementType>(
props: OptionProps<OptionValue, RootComponentType>,
forwardedRef: React.ForwardedRef<Element>,
) {
React.forwardRef<Element, OptionProps<unknown>>(function Option<
OptionValue,
RootComponentType extends React.ElementType,
>(props: OptionProps<OptionValue, RootComponentType>, forwardedRef: React.ForwardedRef<Element>) {
const {
children,
disabled = false,
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-base/src/Option/Option.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export type OptionRootSlotProps<OptionValue> = Simplify<
UseOptionRootSlotProps & {
children?: React.ReactNode;
className: string;
ref: React.Ref<HTMLElement>;
ref?: React.Ref<HTMLElement>;
ownerState: OptionOwnerState<OptionValue>;
}
>;
2 changes: 1 addition & 1 deletion packages/mui-base/src/OptionGroup/OptionGroup.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export type OptionGroupRootSlotProps = {
children?: React.ReactNode;
className?: string;
ownerState: OptionGroupOwnerState;
ref: React.Ref<HTMLLIElement>;
ref?: React.Ref<HTMLLIElement>;
};

export type OptionGroupLabelSlotProps = {
Expand Down
9 changes: 4 additions & 5 deletions packages/mui-base/src/Popper/Popper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const useUtilityClasses = () => {

const defaultPopperOptions = {};

const PopperTooltip = React.forwardRef(function PopperTooltip<
const PopperTooltip = React.forwardRef<HTMLDivElement, PopperTooltipProps>(function PopperTooltip<
RootComponentType extends React.ElementType,
>(props: PopperTooltipProps<RootComponentType>, forwardedRef: React.ForwardedRef<HTMLDivElement>) {
const {
Expand Down Expand Up @@ -245,10 +245,9 @@ const PopperTooltip = React.forwardRef(function PopperTooltip<
*
* - [Popper API](https://mui.com/base-ui/react-popper/components-api/#popper)
*/
const Popper = React.forwardRef(function Popper<RootComponentType extends React.ElementType>(
props: PopperProps<RootComponentType>,
forwardedRef: React.ForwardedRef<HTMLDivElement>,
) {
const Popper = React.forwardRef<HTMLDivElement, PopperProps>(function Popper<
RootComponentType extends React.ElementType,
>(props: PopperProps<RootComponentType>, forwardedRef: React.ForwardedRef<HTMLDivElement>) {
const {
anchorEl,
children,
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-base/src/Snackbar/Snackbar.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export type SnackbarRootSlotProps = {
ownerState: SnackbarOwnerState;
className?: string;
children?: React.ReactNode;
ref: React.Ref<any>;
ref?: React.Ref<any>;
};

export interface SnackbarClickAwayListenerSlotProps extends ClickAwayListenerProps {
Expand Down
Loading
Loading