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 to 19 #42824

Draft
wants to merge 38 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
763acb7
Bump React to 19
aarongarciah Jul 2, 2024
db8fcec
Run useRef codemod
DiegoAndai Jul 3, 2024
c3f7a30
Remove resolutions for @types/react
Janpot Jul 19, 2024
10026c3
patch deps
Janpot Jul 19, 2024
1440f4b
next 15
Janpot Jul 19, 2024
3d192b3
docs
Janpot Jul 19, 2024
4ced27d
Update some React refs types and default values
aarongarciah Jul 22, 2024
6ccad3b
Stop using deprecated React.MutableRefObject
aarongarciah Jul 22, 2024
67593d7
Update to latest React rc
aarongarciah Jul 23, 2024
27aeee2
revert
Janpot Jul 24, 2024
ebddc3f
Fix next types
Janpot Jul 25, 2024
c832a05
Update to latest React rc
aarongarciah Jul 26, 2024
ee03875
pnpm dedupe
DiegoAndai Jul 31, 2024
6f1b391
Fix remaining element.ref access issues
DiegoAndai Jul 31, 2024
4817fff
Remove stale util
DiegoAndai Aug 1, 2024
3ad84df
pnpm dedupe
DiegoAndai Aug 1, 2024
3a2a946
pnpm dedupe
aarongarciah Aug 5, 2024
304a4a8
Update to latest React rc
aarongarciah Aug 6, 2024
d1f7a08
Undo whitespace change
aarongarciah Aug 6, 2024
11e10a6
pnpm dedupe
aarongarciah Aug 6, 2024
3ee392f
Fix Modal test
aarongarciah Aug 9, 2024
10ae8a0
Update to latest React rc
aarongarciah Aug 12, 2024
caeebb6
Undo some React.MutableRefObject changes
aarongarciah Aug 13, 2024
fb9faab
Revert "Fix Modal test"
aarongarciah Aug 15, 2024
a08e2e3
Adapt Modal test to pass
aarongarciah Aug 15, 2024
b4c44fc
Update to latest React rc
aarongarciah Aug 15, 2024
0b992e6
Update to latest React rc
aarongarciah Aug 19, 2024
15d0e88
Update to latest React rc
Janpot Aug 20, 2024
669734e
Update @floating-ui transitive dependencies
aarongarciah Aug 20, 2024
6c39ccf
Update to latest React rc
aarongarciah Aug 26, 2024
e26d8c6
Undo unintended changes to package.json
aarongarciah Aug 26, 2024
4d26227
Update to latest React rc
aarongarciah Aug 27, 2024
e6e3909
Update Next.js
aarongarciah Aug 27, 2024
165180a
Disable Next.js workerThreads
aarongarciah Aug 27, 2024
b89a42e
Prettier
aarongarciah Aug 27, 2024
11df6f8
Adapt envinfo test to pass
aarongarciah Aug 26, 2024
04e15cc
pnpm dedupe
aarongarciah Aug 28, 2024
e1ad5d8
Prettier
aarongarciah Aug 29, 2024
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
14 changes: 7 additions & 7 deletions apps/pigment-css-next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@
"clean": "rimraf .next"
},
"dependencies": {
"@mui/material-pigment-css": "workspace:^",
"@mui/utils": "workspace:^",
"@emotion/cache": "latest",
"@mui/base": "workspace:^",
"@mui/icons-material": "workspace:^",
"@mui/lab": "workspace:^",
"@mui/material": "workspace:^",
"@mui/material-nextjs": "workspace:^",
"@mui/material-pigment-css": "workspace:^",
"@mui/system": "workspace:^",
"@emotion/cache": "latest",
"@mui/utils": "workspace:^",
"next": "latest",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "19.0.0-rc-f65ac7bd-20240826",
"react-dom": "19.0.0-rc-f65ac7bd-20240826"
},
"devDependencies": {
"@pigment-css/nextjs-plugin": "0.0.21",
"@types/node": "^20.5.7",
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
"@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"eslint": "^8.57.0",
"typescript": "^5.5.4"
},
Expand Down
13 changes: 7 additions & 6 deletions apps/pigment-css-vite-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,26 @@
"build": "vite build"
},
"dependencies": {
"@mui/material-pigment-css": "workspace:^",
"@mui/utils": "workspace:^",
"@mui/base": "workspace:^",
"@mui/icons-material": "workspace:^",
"@mui/lab": "workspace:^",
"@mui/material": "workspace:^",
"@mui/material-pigment-css": "workspace:^",
"@mui/system": "workspace:^",
"@mui/utils": "workspace:^",
"@pigment-css/react": "^0.0.16",
"clsx": "^2.1.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "19.0.0-rc-f65ac7bd-20240826",
"react-dom": "19.0.0-rc-f65ac7bd-20240826",
"react-error-boundary": "^4.0.13",
"react-router-dom": "^6.26.1"
},
"devDependencies": {
"@babel/preset-react": "^7.24.7",
"@babel/preset-typescript": "^7.24.7",
"@pigment-css/vite-plugin": "0.0.21",
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
"@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"@vitejs/plugin-react": "^4.3.1",
"postcss": "^8.4.41",
"postcss-combine-media-query": "^1.0.1",
Expand Down
6 changes: 3 additions & 3 deletions benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
"jss": "^10.10.0",
"playwright": "^1.46.1",
"prop-types": "^15.8.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-is": "^18.3.1",
"react": "19.0.0-rc-f65ac7bd-20240826",
"react-dom": "19.0.0-rc-f65ac7bd-20240826",
"react-is": "19.0.0-rc-f65ac7bd-20240826",
"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 @@ -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 @@ -32,8 +32,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/building-your-application/configuring/typescript for more information.
2 changes: 1 addition & 1 deletion docs/nextConfigDocsInfra.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function withDocsInfra(nextConfig) {
experimental: {
scrollRestoration: true,
esmExternals: false,
workerThreads: true,
workerThreads: false,
cpus: 3,
...nextConfig.experimental,
},
Expand Down
14 changes: 7 additions & 7 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,19 @@
"lz-string": "^1.5.0",
"markdown-to-jsx": "^7.4.7",
"material-ui-popup-state": "^5.1.2",
"next": "^14.2.6",
"next": "canary",
"notistack": "3.0.1",
"nprogress": "^0.2.0",
"postcss": "^8.4.41",
"postcss-import": "^16.1.0",
"prop-types": "^15.8.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "19.0.0-rc-f65ac7bd-20240826",
"react-dom": "19.0.0-rc-f65ac7bd-20240826",
"react-draggable": "^4.4.6",
"react-final-form": "^6.5.9",
"react-imask": "^7.6.1",
"react-intersection-observer": "^9.13.0",
"react-is": "^18.3.1",
"react-is": "19.0.0-rc-f65ac7bd-20240826",
"react-number-format": "^5.4.0",
"react-router-dom": "^6.26.1",
"react-runner": "^1.0.5",
Expand All @@ -115,19 +115,19 @@
"devDependencies": {
"@babel/plugin-transform-react-constant-elements": "^7.25.1",
"@babel/preset-typescript": "^7.24.7",
"@mui-internal/api-docs-builder": "workspace:^",
"@mui/internal-docs-utils": "workspace:^",
"@mui/internal-scripts": "workspace:^",
"@mui/internal-test-utils": "workspace:^",
"@mui-internal/api-docs-builder": "workspace:^",
"@types/autosuggest-highlight": "^3.2.3",
"@types/chai": "^4.3.17",
"@types/css-mediaquery": "^0.1.4",
"@types/gtag.js": "^0.0.20",
"@types/json2mq": "^0.2.2",
"@types/node": "^18.19.46",
"@types/prop-types": "^15.7.12",
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
"@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"@types/react-swipeable-views": "^0.13.5",
"@types/react-transition-group": "^4.4.11",
"@types/react-window": "^1.8.8",
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"@types/lodash": "^4.17.7",
"@types/mocha": "^10.0.7",
"@types/node": "^18.19.46",
"@types/react": "^18.3.4",
"@types/react": "npm:types-react@19.0.0-rc.1",
"@types/yargs": "^17.0.33",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
Expand Down Expand Up @@ -210,8 +210,11 @@
"@definitelytyped/typescript-versions": "^0.1.4",
"@definitelytyped/utils": "^0.1.7",
"@types/node": "^18.19.46",
"@types/react": "^18.3.4",
"@types/react-dom": "18.3.0",
"types-react-dom>@types/react": "npm:types-react@19.0.0-rc.1",
"@types/hoist-non-react-statics>@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-transition-group>@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-window>@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-swipeable-views>@types/react": "npm:types-react@19.0.0-rc.1",
"cross-fetch": "^4.0.0",
"@pigment-css/react": "0.0.21",
"@pigment-css/unplugin": "0.0.21",
Expand Down
2 changes: 1 addition & 1 deletion packages-internal/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@types/doctrine": "^0.0.9",
"@types/lodash": "^4.17.7",
"@types/node": "^18.19.46",
"@types/react": "^18.3.4",
"@types/react": "npm:types-react@19.0.0-rc.1",
"@types/uuid": "^9.0.8",
"chai": "^4.5.0",
"fast-glob": "^3.3.2",
Expand Down
8 changes: 4 additions & 4 deletions packages-internal/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@
"@types/chai-dom": "^1.11.3",
"@types/format-util": "^1.0.4",
"@types/prop-types": "^15.7.12",
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
"@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"@types/sinon": "^17.0.3",
"typescript": "^5.5.4"
},
"peerDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react": "19.0.0-rc-f65ac7bd-20240826",
"react-dom": "19.0.0-rc-f65ac7bd-20240826"
},
"publishConfig": {
"access": "public"
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 @@ -56,20 +56,20 @@
"@testing-library/user-event": "^14.5.2",
"@types/chai": "^4.3.17",
"@types/prop-types": "^15.7.12",
"@types/react": "18.3.4",
"@types/react-dom": "18.3.0",
"@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"@types/sinon": "^17.0.3",
"chai": "^4.5.0",
"fast-glob": "^3.3.2",
"lodash": "^4.17.21",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "19.0.0-rc-f65ac7bd-20240826",
"react-dom": "19.0.0-rc-f65ac7bd-20240826",
"sinon": "^16.1.3"
},
"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
4 changes: 2 additions & 2 deletions packages/mui-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
"@types/gtag.js": "^0.0.20",
"@types/node": "^18.19.46",
"@types/prop-types": "^15.7.12",
"@types/react": "^18.3.4",
"@types/react": "npm:types-react@19.0.0-rc.1",
"next": "^14.2.6",
"react": "^18.3.1"
"react": "19.0.0-rc-f65ac7bd-20240826"
},
"peerDependencies": {
"@mui/base": "*",
Expand Down
11 changes: 10 additions & 1 deletion packages/mui-envinfo/envinfo.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,16 @@ describe('@mui/envinfo', () => {
// Other libraries
expect(envinfo).to.have.nested.property('npmPackages.react');
expect(envinfo).to.have.nested.property('npmPackages.react-dom');
expect(envinfo).to.have.nested.property('npmPackages.@types/react');

// TODO: remove this check once React 19 stable types are released
// React 19 RC requires setting `@types/react' to `npm:types-react@19.0.0-rc.1`
// See https://react.dev/blog/2024/04/25/react-19-upgrade-guide#installing
if (process.env.REACT_VERSION === 'next') {
expect(envinfo).to.have.nested.property('npmPackages.@types/react');
} else {
expect(envinfo).to.have.nested.property('npmPackages.types-react');
}

expect(envinfo).to.have.nested.property('npmPackages.@emotion/react');
expect(envinfo).to.have.nested.property('npmPackages.@emotion/styled');
});
Expand Down
6 changes: 3 additions & 3 deletions packages/mui-envinfo/test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"@mui/base": "5.0.0-beta.30",
"@mui/joy": "5.0.0-beta.22",
"@mui/material": "5.15.4",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react": "19.0.0-rc-f65ac7bd-20240826",
"react-dom": "19.0.0-rc-f65ac7bd-20240826"
},
"devDependencies": {
"@types/react": "^18.3.4"
"@types/react": "npm:types-react@19.0.0-rc.1"
}
}
4 changes: 2 additions & 2 deletions packages/mui-icons-material/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@
"@mui/internal-waterfall": "workspace:^",
"@mui/material": "workspace:^",
"@types/chai": "^4.3.17",
"@types/react": "^18.3.4",
"@types/react": "npm:types-react@19.0.0-rc.1",
"chai": "^4.5.0",
"chalk": "^5.3.0",
"cross-fetch": "^4.0.0",
"fast-glob": "^3.3.2",
"fs-extra": "^11.2.0",
"lodash": "^4.17.21",
"mustache": "^4.2.0",
"react": "^18.3.1",
"react": "19.0.0-rc-f65ac7bd-20240826",
"rimraf": "^5.0.10",
"shx": "^0.3.4",
"svgo": "^3.3.2",
Expand Down
14 changes: 7 additions & 7 deletions packages/mui-joy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,23 @@
"@mui/material": "workspace:^",
"@types/chai": "^4.3.17",
"@types/prop-types": "^15.7.12",
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
"@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"@types/sinon": "^17.0.3",
"chai": "^4.5.0",
"fast-glob": "^3.3.2",
"lodash": "^4.17.21",
"next": "^14.2.6",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "19.0.0-rc-f65ac7bd-20240826",
"react-dom": "19.0.0-rc-f65ac7bd-20240826",
"sinon": "^16.1.3"
},
"peerDependencies": {
"@emotion/react": "^11.5.0",
"@emotion/styled": "^11.3.0",
"@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
8 changes: 4 additions & 4 deletions packages/mui-lab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@
"@mui/material": "workspace:*",
"@types/chai": "^4.3.17",
"@types/prop-types": "^15.7.12",
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
"@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"@types/sinon": "^17.0.3",
"chai": "^4.5.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "19.0.0-rc-f65ac7bd-20240826",
"react-dom": "19.0.0-rc-f65ac7bd-20240826",
"sinon": "^16.1.3"
},
"peerDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/mui-material-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
"@emotion/cache": "^11.13.1",
"@emotion/react": "^11.13.3",
"@emotion/server": "^11.11.0",
"@types/react": "^18.3.4",
"next": "14.2.6",
"react": "^18.3.1"
"@types/react": "npm:types-react@19.0.0-rc.1",
"next": "canary",
"react": "19.0.0-rc-f65ac7bd-20240826"
},
"peerDependencies": {
"@emotion/cache": "^11.11.0",
Expand Down
Loading