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

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
369c230
Bump React to 19
aarongarciah Jul 2, 2024
0fce693
Run useRef codemod
DiegoAndai Jul 3, 2024
91803b0
Remove resolutions for @types/react
Janpot Jul 19, 2024
73c1cc4
patch deps
Janpot Jul 19, 2024
1de7c1a
docs
Janpot Jul 19, 2024
9e858c5
Update some React refs types and default values
aarongarciah Jul 22, 2024
2a3e5c0
Stop using deprecated React.MutableRefObject
aarongarciah Jul 22, 2024
1d5a94f
Fix next types
Janpot Jul 25, 2024
7f15351
Fix remaining element.ref access issues
DiegoAndai Jul 31, 2024
63aad34
Remove stale util
DiegoAndai Aug 1, 2024
7a03c0d
Fix Modal test
aarongarciah Aug 9, 2024
2d1241d
Undo some React.MutableRefObject changes
aarongarciah Aug 13, 2024
f42adaa
Revert "Fix Modal test"
aarongarciah Aug 15, 2024
ced416f
Adapt Modal test to pass
aarongarciah Aug 15, 2024
d1ee2ee
Update @floating-ui transitive dependencies
aarongarciah Aug 20, 2024
b6169a4
Update Next.js
aarongarciah Aug 27, 2024
1100354
Disable Next.js workerThreads
aarongarciah Aug 27, 2024
032cfc3
Adapt envinfo test to pass
aarongarciah Aug 26, 2024
c603f89
pnpm dedupe
aarongarciah Oct 7, 2024
5659b2a
Patch styled-components types
aarongarciah Oct 8, 2024
9c37cac
Merge branch 'master' into react-19
DiegoAndai Nov 12, 2024
06e3c34
Pin next to 15.0.2 temporarily
DiegoAndai Nov 12, 2024
e2637d4
Trigger CI
DiegoAndai Nov 12, 2024
0e34c2c
Merge branch 'master' into react-19
DiegoAndai Nov 13, 2024
6434117
Merge branch 'master' into react-19
DiegoAndai Nov 13, 2024
5e06d10
Update material-nextjs next version to canary
DiegoAndai Nov 13, 2024
2f3487d
Update to latest React rc
DiegoAndai Nov 13, 2024
99ef5eb
Use skipLibCheck instead of sc patch
DiegoAndai Nov 13, 2024
b40b413
Trigger CI
DiegoAndai Nov 13, 2024
8239a6e
Update React to 19.0.0-rc.1
DiegoAndai Nov 15, 2024
efb3518
Try medium+ container to see if killed signal is due to OOM
DiegoAndai Nov 15, 2024
d29bc49
Merge branch 'master' into react-19
DiegoAndai Dec 6, 2024
88c81a4
Update packages to stable versions
DiegoAndai Dec 6, 2024
8a0289b
Skip lib check in system due to sc
DiegoAndai Dec 6, 2024
f3eaaae
Adapt useCurrentColorScheme test to React 19
DiegoAndai Dec 6, 2024
5479511
Use medium+ containers for this PR
DiegoAndai Dec 6, 2024
0ebf220
Revert envinfo test change
DiegoAndai Dec 6, 2024
9348865
Refactor useCurrentColorScheme test
DiegoAndai Dec 6, 2024
b5459e7
Remove unnecessary version specifying
DiegoAndai Dec 6, 2024
bc6f888
Support React 18 in useCurrentColorScheme test
DiegoAndai Dec 6, 2024
531bd6a
Bump next to 15.0.4
DiegoAndai Dec 6, 2024
9bfbece
Revert incorrect merge resolution in mui-base package.json
DiegoAndai Dec 6, 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
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ parameters:
default: ''

default-job: &default-job
resource_class: 'medium+'
parameters:
react-version:
description: The version of react to be used
Expand Down
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",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@pigment-css/nextjs-plugin": "0.0.28",
"@types/node": "^20.17.9",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "^8.57.1",
"typescript": "^5.7.2"
},
Expand Down
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 @@ -18,8 +18,8 @@
"@mui/utils": "workspace:^",
"clsx": "^2.1.1",
"playwright": "^1.48.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-error-boundary": "^4.1.2",
"react-router-dom": "^6.28.0",
"webfontloader": "^1.6.28"
Expand All @@ -28,8 +28,8 @@
"@babel/preset-react": "^7.25.9",
"@babel/preset-typescript": "^7.26.0",
"@pigment-css/vite-plugin": "0.0.28",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@types/webfontloader": "^1.6.38",
"@vitejs/plugin-react": "^4.3.4",
"postcss": "^8.4.49",
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.48.2",
"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": "^9.1.2",
"redux": "^5.0.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/nextConfigDocsInfra.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function withDocsInfra(nextConfig) {
experimental: {
scrollRestoration: true,
esmExternals: false,
workerThreads: true,
workerThreads: false,
cpus: 3,
...nextConfig.experimental,
},
Expand Down
12 changes: 6 additions & 6 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,19 @@
"lz-string": "^1.5.0",
"markdown-to-jsx": "^7.7.0",
"material-ui-popup-state": "^5.3.1",
"next": "^14.2.18",
"next": "canary",
"notistack": "3.0.1",
"nprogress": "^0.2.0",
"postcss": "^8.4.49",
"postcss-import": "^16.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.6.1",
"react-intersection-observer": "^9.13.1",
"react-is": "^18.3.1",
"react-is": "^19.0.0",
"react-number-format": "^5.4.2",
"react-router": "^7.0.1",
"react-runner": "^1.0.5",
Expand Down Expand Up @@ -126,8 +126,8 @@
"@types/json2mq": "^0.2.2",
"@types/node": "^20.17.9",
"@types/prop-types": "^15.7.13",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@types/react-swipeable-views": "^0.13.5",
"@types/react-transition-group": "^4.4.11",
"@types/react-window": "^1.8.8",
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"@types/lodash": "^4.17.13",
"@types/mocha": "^10.0.10",
"@types/node": "^20.17.9",
"@types/react": "^18.3.12",
"@types/react": "^19.0.0",
"@types/yargs": "^17.0.33",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
Expand Down Expand Up @@ -217,8 +217,6 @@
"@definitelytyped/typescript-versions": "^0.1.6",
"@definitelytyped/utils": "^0.1.8",
"@types/node": "^20.17.9",
"@types/react": "^18.3.12",
"@types/react-dom": "18.3.1",
"cross-fetch": "^4.0.0",
"@pigment-css/react": "0.0.28",
"@pigment-css/unplugin": "0.0.28",
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.13",
"@types/node": "^20.17.9",
"@types/react": "^18.3.12",
"@types/react": "^19.0.0",
"@types/uuid": "^10.0.0",
"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 @@ -59,14 +59,14 @@
"@types/chai-dom": "^1.11.3",
"@types/format-util": "^1.0.4",
"@types/prop-types": "^15.7.13",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@types/sinon": "^17.0.3",
"typescript": "^5.7.2"
},
"peerDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"publishConfig": {
"access": "public"
Expand Down
16 changes: 8 additions & 8 deletions packages/mui-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,20 @@
"@testing-library/user-event": "^14.5.2",
"@types/chai": "^4.3.20",
"@types/prop-types": "^15.7.13",
"@types/react": "18.3.12",
"@types/react-dom": "18.3.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@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",
"sinon": "^19.0.2"
"react": "^19.0.0",
"react-dom": "^19.0.0",
"sinon": "^18.0.1"
},
"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": "^20.17.9",
"@types/prop-types": "^15.7.13",
"@types/react": "^18.3.12",
"@types/react": "^19.0.0",
"next": "^14.2.18",
"react": "^18.3.1"
"react": "^19.0.0"
},
"peerDependencies": {
"@mui/base": "*",
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",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@types/react": "^18.3.12"
"@types/react": "^19.0.0"
}
}
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.20",
"@types/react": "^18.3.12",
"@types/react": "^19.0.0",
"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",
"rimraf": "^6.0.1",
"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.20",
"@types/prop-types": "^15.7.13",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@types/sinon": "^17.0.3",
"chai": "^4.5.0",
"fast-glob": "^3.3.2",
"lodash": "^4.17.21",
"next": "^14.2.18",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"sinon": "^19.0.2"
},
"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.20",
"@types/prop-types": "^15.7.13",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@types/sinon": "^17.0.3",
"chai": "^4.5.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"sinon": "^19.0.2"
},
"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.5",
"@emotion/react": "^11.13.5",
"@emotion/server": "^11.11.0",
"@types/react": "^18.3.12",
"next": "^14.2.18",
"react": "^18.3.1"
"@types/react": "^19.0.0",
"next": "canary",
"react": "^19.0.0"
},
"peerDependencies": {
"@emotion/cache": "^11.11.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/mui-material/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"clsx": "^2.1.1",
"csstype": "^3.1.3",
"prop-types": "^15.8.1",
"react-is": "^18.3.1",
"react-is": "^19.0.0",
"react-transition-group": "^4.4.5"
},
"devDependencies": {
Expand All @@ -59,17 +59,17 @@
"@testing-library/user-event": "^14.5.2",
"@types/chai": "^4.3.20",
"@types/prop-types": "^15.7.13",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@types/sinon": "^17.0.3",
"chai": "^4.5.0",
"css-mediaquery": "^0.1.2",
"fast-glob": "^3.3.2",
"fs-extra": "^11.2.0",
"lodash": "^4.17.21",
"playwright": "^1.48.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-router": "^7.0.1",
"sinon": "^19.0.2"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/mui-material/src/ButtonBase/ButtonBase.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ describe('<ButtonBase />', () => {

it('should not crash when changes enableRipple from false to true', async () => {
function App() {
/** @type {React.MutableRefObject<import('./ButtonBase').ButtonBaseActions | null>} */
/** @type {React.RefObject<import('./ButtonBase').ButtonBaseActions | null>} */
const buttonRef = React.useRef(null);
const [enableRipple, setRipple] = React.useState(false);

Expand Down Expand Up @@ -1187,7 +1187,7 @@ describe('<ButtonBase />', () => {

it('should be able to focus visible the button', async () => {
/**
* @type {React.RefObject<import('./ButtonBase').ButtonBaseActions>}
* @type {React.RefObject<import('./ButtonBase').ButtonBaseActions | null>}
*/
const buttonActionsRef = React.createRef();
const { getByText } = render(
Expand Down
Loading
Loading