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

[WIP] React next #43456

Closed
wants to merge 9 commits into from
Closed
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
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": "next",
"react-dom": "next"
},
"devDependencies": {
"@pigment-css/nextjs-plugin": "0.0.20",
"@types/node": "^20.5.7",
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
"@types/react": "npm:[email protected]",
"@types/react-dom": "npm:[email protected]",
"eslint": "^8.57.0",
"typescript": "^5.5.4"
},
Expand Down
12 changes: 6 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,25 @@
"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:^",
"clsx": "^2.1.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "next",
"react-dom": "next",
"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.20",
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
"@types/react": "npm:[email protected]",
"@types/react-dom": "npm:[email protected]",
"@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": "next",
"react-dom": "next",
"react-is": "next",
"react-jss": "^10.10.0",
"react-redux": "^8.1.3",
"redux": "^4.2.1",
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.
4 changes: 1 addition & 3 deletions docs/nextConfigDocsInfra.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ process.env.DEPLOY_ENV = DEPLOY_ENV;
function withDocsInfra(nextConfig) {
return {
trailingSlash: true,
// TODO: Remove when upgrading to Next.js 15, see https://github.com/vercel/next.js/pull/69137
optimizeFonts: false,
reactStrictMode: true,
...nextConfig,
env: {
Expand All @@ -75,7 +73,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": "next",
"react-dom": "next",
"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": "next",
"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:[email protected]",
"@types/react-dom": "npm:[email protected]",
"@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:[email protected]",
"@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:[email protected]",
"@types/hoist-non-react-statics>@types/react": "npm:[email protected]",
"@types/react-transition-group>@types/react": "npm:[email protected]",
"@types/react-window>@types/react": "npm:[email protected]",
"@types/react-swipeable-views>@types/react": "npm:[email protected]",
"cross-fetch": "^4.0.0",
"@pigment-css/react": "0.0.20",
"@pigment-css/unplugin": "0.0.20",
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:[email protected]",
"@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:[email protected]",
"@types/react-dom": "npm:[email protected]",
"@types/sinon": "^17.0.3",
"typescript": "^5.5.4"
},
"peerDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react": "next",
"react-dom": "next"
},
"publishConfig": {
"access": "public"
Expand Down
8 changes: 4 additions & 4 deletions packages/mui-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@
"@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:[email protected]",
"@types/react-dom": "npm:[email protected]",
"@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": "next",
"react-dom": "next",
"sinon": "^16.1.3"
},
"peerDependencies": {
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:[email protected]",
"next": "^14.2.6",
"react": "^18.3.1"
"react": "next"
},
"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:[email protected]`
// 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": "next",
"react-dom": "next"
},
"devDependencies": {
"@types/react": "^18.3.4"
"@types/react": "npm:[email protected]"
}
}
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:[email protected]",
"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": "next",
"rimraf": "^5.0.10",
"shx": "^0.3.4",
"svgo": "^3.3.2",
Expand Down
8 changes: 4 additions & 4 deletions packages/mui-joy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@
"@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:[email protected]",
"@types/react-dom": "npm:[email protected]",
"@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": "next",
"react-dom": "next",
"sinon": "^16.1.3"
},
"peerDependencies": {
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:[email protected]",
"@types/react-dom": "npm:[email protected]",
"@types/sinon": "^17.0.3",
"chai": "^4.5.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "next",
"react-dom": "next",
"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:[email protected]",
"next": "canary",
"react": "next"
},
"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": "next",
"react-transition-group": "^4.4.5"
},
"devDependencies": {
Expand All @@ -60,17 +60,17 @@
"@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:[email protected]",
"@types/react-dom": "npm:[email protected]",
"@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.46.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "next",
"react-dom": "next",
"react-router-dom": "^6.26.1",
"sinon": "^16.1.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/ButtonBase/ButtonBase.test.js
Original file line number Diff line number Diff line change
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
8 changes: 5 additions & 3 deletions packages/mui-material/src/Modal/Modal.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -599,9 +599,11 @@ describe('<Modal />', () => {

return (
<Modal open={open}>
<Fade in={open} timeout={timeout}>
<div id="modal-body">hello</div>
</Fade>
{/* TODO: Look into why this test started to fail with React 19 when using a transition component as children. */}
{/* See: https://github.com/mui/material-ui/issues/43312 */}
{/* <Fade in={open} timeout={timeout}> */}
<div id="modal-body">hello</div>
{/* </Fade> */}
</Modal>
);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/mui-private-theming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
"@mui/internal-test-utils": "workspace:^",
"@mui/types": "workspace:^",
"@types/chai": "^4.3.17",
"@types/react": "^18.3.4",
"@types/react": "npm:[email protected]",
"chai": "^4.5.0",
"react": "^18.3.1"
"react": "next"
},
"peerDependencies": {
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
Expand Down
Loading