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] Upgrade Toolpad to React 19 #4488

Merged
merged 48 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
b3212ef
core: Upgrade to react 19
bharatkashyap Nov 28, 2024
6c42cef
fix: Types are released
bharatkashyap Dec 8, 2024
e90403a
fix: Upgrade playground
bharatkashyap Dec 8, 2024
88b9da7
fix: missed
bharatkashyap Dec 8, 2024
d0924c6
Merge branch 'master' of github.com:mui/mui-toolpad into core/upgrade…
bharatkashyap Dec 8, 2024
35c3a2f
Update monorepo
apedroferreira Dec 9, 2024
56c7f59
Attempt to fix eslint errors, will continue it later...
apedroferreira Dec 9, 2024
23947ff
Fix translations setup
apedroferreira Dec 9, 2024
e06feb8
Missing changes
apedroferreira Dec 9, 2024
9efc3d1
Remove script
apedroferreira Dec 9, 2024
8a7df1e
Fix mistakes
apedroferreira Dec 9, 2024
6433dd4
Merge branch 'master' into renovate/mui-monorepo
bharatkashyap Dec 11, 2024
149d3c2
Merge branch 'master' of github.com:mui/mui-toolpad into core/upgrade…
bharatkashyap Dec 11, 2024
2f09945
fix: Upgrade monorepo
bharatkashyap Dec 11, 2024
0a6eeab
Merge branch 'renovate/mui-monorepo' into core/upgrade-react-19
bharatkashyap Dec 11, 2024
bb409ac
fix: Tests, standardise
bharatkashyap Dec 11, 2024
d018cc0
Merge branch 'master' of github.com:mui/mui-toolpad into core/upgrade…
bharatkashyap Dec 11, 2024
22aceaf
fix: CI
bharatkashyap Dec 17, 2024
820401f
Merge branch 'master' of github.com:mui/mui-toolpad into core/upgrade…
bharatkashyap Dec 17, 2024
8bf1e68
fix: CI
bharatkashyap Dec 18, 2024
f506a4b
fix: CI
bharatkashyap Dec 18, 2024
5b86c02
fix: Also upgrade CLI generated apps
bharatkashyap Dec 18, 2024
5921587
fix: demonstrate CI working
bharatkashyap Dec 18, 2024
659b991
Merge branch 'master' of github.com:mui/mui-toolpad into core/upgrade…
bharatkashyap Dec 19, 2024
6b42cc2
fix: Skip these to unblock migration
bharatkashyap Dec 19, 2024
da82994
Merge branch 'master' of github.com:mui/mui-toolpad into core/upgrade…
bharatkashyap Dec 25, 2024
74126fd
Merge branch 'master' of github.com:mui/mui-toolpad into core/upgrade…
bharatkashyap Dec 25, 2024
71db938
Merge branch 'master' of github.com:mui/mui-toolpad into core/upgrade…
bharatkashyap Jan 3, 2025
3601ff1
fix: Upgrade X deps
bharatkashyap Jan 6, 2025
538978c
update lockfile
bharatkashyap Jan 6, 2025
4987890
fix types
Janpot Jan 6, 2025
0827f33
f
Janpot Jan 6, 2025
257b801
fix recharts
Janpot Jan 6, 2025
eba8271
Merge branch 'master' into core/upgrade-react-19
bharatkashyap Jan 6, 2025
1abd39b
Merge branch 'master' of github.com:mui/mui-toolpad into core/upgrade…
bharatkashyap Jan 8, 2025
a489c77
fix: Ignore license key warnings
bharatkashyap Jan 8, 2025
94342e0
fix: Unblock upgrade
bharatkashyap Jan 8, 2025
e65713f
Merge branch 'master' of github.com:mui/mui-toolpad into core/upgrade…
bharatkashyap Jan 8, 2025
253395f
fix: CI
bharatkashyap Jan 9, 2025
49f6c2f
fix: Trigger CI
bharatkashyap Jan 9, 2025
6385fcc
fix: Missed
bharatkashyap Jan 9, 2025
e00fe8f
fix: Unblock Core React 19 support
bharatkashyap Jan 9, 2025
2f20a69
revert test skips, fix license problem
Janpot Jan 9, 2025
f32bc8f
Update index.spec.ts
Janpot Jan 9, 2025
b9dbe91
Update index.spec.ts
Janpot Jan 9, 2025
23f92fb
Merge branch 'master' of github.com:mui/mui-toolpad into core/upgrade…
bharatkashyap Jan 10, 2025
3338d56
fix: More dep updates
bharatkashyap Jan 10, 2025
50b0d55
Merge branch 'master' of github.com:mui/mui-toolpad into core/upgrade…
bharatkashyap Jan 10, 2025
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
15 changes: 7 additions & 8 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@mui/utils": "6.3.1",
"@mui/x-date-pickers": "7.22.2",
"@mui/x-date-pickers-pro": "7.22.2",
"@mui/x-license": "7.21.0",
"@mui/x-license": "7.23.5",
"@toolpad/core": "workspace:*",
"@toolpad/studio": "workspace:*",
"@trendmicro/react-interpolate": "0.5.5",
Expand Down Expand Up @@ -72,13 +72,12 @@
"postcss": "8.4.49",
"prismjs": "1.29.0",
"prop-types": "15.8.1",
"react": "18.3.1",
"react": "^19.0.0",
"react-docgen": "7.0.3",
"react-dom": "18.3.1",
"react-dom": "^19.0.0",
"react-hook-form": "7.53.2",
"react-is": "18.3.1",
"react-is": "^19.0.0",
"react-router": "7.1.0",
"react-router-dom": "6.26.2",
"react-runner": "1.0.5",
"react-simple-code-editor": "0.14.1",
"react-simple-typewriter": "5.0.1",
Expand All @@ -99,9 +98,9 @@
"@types/babel__core": "^7.20.5",
"@types/doctrine": "0.0.9",
"@types/json-schema": "7.0.15",
"@types/react": "18.3.18",
"@types/react-dom": "18.3.5",
"@types/react-is": "18.3.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@types/react-is": "^19.0.0",
"@types/react-swipeable-views": "^0.13.6",
"cpy-cli": "5.0.0",
"cross-fetch": "4.0.0",
Expand Down
8 changes: 4 additions & 4 deletions examples/core/auth-nextjs-email/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
"next": "^15",
"next-auth": "5.0.0-beta.25",
"nodemailer": "^6",
"react": "^18",
"react-dom": "^18"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"typescript": "^5",
"@types/node": "^20.17.12",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "^8",
"prisma": "^5",
"eslint-config-next": "^15"
Expand Down
8 changes: 4 additions & 4 deletions examples/core/auth-nextjs-pages-nextauth-4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
"@toolpad/core": "latest",
"next": "^15",
"next-auth": "^4.24.10",
"react": "^18",
"react-dom": "^18"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"typescript": "^5",
"@types/node": "^20.17.12",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "^8",
"eslint-config-next": "^15"
}
Expand Down
4 changes: 2 additions & 2 deletions examples/core/auth-nextjs-pages-nextauth-4/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { SessionProvider, signIn, signOut, useSession } from 'next-auth/react';
import LinearProgress from '@mui/material/LinearProgress';

export type NextPageWithLayout<P = {}, IP = P> = NextPage<P, IP> & {
getLayout?: (page: React.ReactElement) => React.ReactNode;
getLayout?: (page: React.ReactElement<any>) => React.ReactNode;
requireAuth?: boolean;
};

Expand Down Expand Up @@ -46,7 +46,7 @@ const AUTHENTICATION = {
signOut,
};

function getDefaultLayout(page: React.ReactElement) {
function getDefaultLayout(page: React.ReactElement<any>) {
return <DashboardLayout>{page}</DashboardLayout>;
}

Expand Down
10 changes: 5 additions & 5 deletions examples/core/auth-nextjs-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
"@toolpad/core": "latest",
"next": "^15",
"next-auth": "5.0.0-beta.25",
"react": "^18",
"react-dom": "^18"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"typescript": "^5",
"@types/node": "^20.17.12",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/node": "^20.17.6",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "^8",
"eslint-config-next": "^15"
}
Expand Down
4 changes: 2 additions & 2 deletions examples/core/auth-nextjs-pages/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { SessionProvider, signIn, signOut, useSession } from 'next-auth/react';
import LinearProgress from '@mui/material/LinearProgress';

export type NextPageWithLayout<P = {}, IP = P> = NextPage<P, IP> & {
getLayout?: (page: React.ReactElement) => React.ReactNode;
getLayout?: (page: React.ReactElement<any>) => React.ReactNode;
requireAuth?: boolean;
};

Expand Down Expand Up @@ -46,7 +46,7 @@ const AUTHENTICATION = {
signOut,
};

function getDefaultLayout(page: React.ReactElement) {
function getDefaultLayout(page: React.ReactElement<any>) {
return (
<DashboardLayout>
<PageContainer>{page}</PageContainer>
Expand Down
8 changes: 4 additions & 4 deletions examples/core/auth-nextjs-passkey/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
"@toolpad/core": "latest",
"next": "^15",
"next-auth": "5.0.0-beta.25",
"react": "^18",
"react-dom": "^18"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@types/node": "^22",
"@types/react": "^18",
"@types/react": "^19.0.0",
"prisma": "^5",
"@types/react-dom": "^18",
"@types/react-dom": "^19.0.0",
"eslint-config-next": "^15"
}
}
8 changes: 4 additions & 4 deletions examples/core/auth-nextjs-themed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
"@toolpad/core": "latest",
"next": "^15",
"next-auth": "^5.0.0-beta.25",
"react": "^19",
"react-dom": "^19"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@types/node": "^20.17.12",
"@types/react": "^19",
"@types/react-dom": "^19",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "^8",
"eslint-config-next": "^15",
"typescript": "^5"
Expand Down
8 changes: 4 additions & 4 deletions examples/core/auth-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
"@toolpad/core": "latest",
"next": "^15",
"next-auth": "5.0.0-beta.25",
"react": "^18",
"react-dom": "^18"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"typescript": "^5",
"@types/node": "^20.17.12",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "^8",
"eslint-config-next": "^15"
}
Expand Down
8 changes: 4 additions & 4 deletions examples/core/auth-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"@mui/icons-material": "^6",
"@mui/material": "^6",
"@toolpad/core": "latest",
"react": "^18",
"react-dom": "^18",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-router": "^7"
},
"devDependencies": {
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.2",
"typescript": "^5",
"vite": "^5.4.8"
Expand Down
8 changes: 4 additions & 4 deletions examples/core/firebase-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"@mui/icons-material": "^6",
"@mui/material": "^6",
"@toolpad/core": "latest",
"react": "^18",
"react-dom": "^18",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-router": "^7"
},
"devDependencies": {
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.2",
"typescript": "^5",
"vite": "^5.4.8"
Expand Down
8 changes: 4 additions & 4 deletions examples/core/tutorial/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"lint": "next lint"
},
"dependencies": {
"react": "^18",
"react-dom": "^18",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"next": "^15",
"@toolpad/core": "latest",
"@mui/material": "^6",
Expand All @@ -21,8 +21,8 @@
"devDependencies": {
"typescript": "^5",
"@types/node": "^20.17.12",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"eslint": "^8",
"eslint-config-next": "^15"
}
Expand Down
8 changes: 4 additions & 4 deletions examples/core/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"@mui/icons-material": "^6",
"@mui/material": "^6",
"@toolpad/core": "latest",
"react": "^18",
"react-dom": "^18",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-router": "^7"
},
"devDependencies": {
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.2",
"typescript": "^5",
"vite": "^5.4.8"
Expand Down
6 changes: 3 additions & 3 deletions examples/studio/custom-server-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"@toolpad/studio": "0.5.2",
"express": "4.20.0",
"next": "14.2.10",
"react": "18.3.1",
"react-dom": "18.3.1"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@types/react": "18.3.3"
"@types/react": "^19.0.0"
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@
"@mui/internal-markdown": "1.0.24",
"@mui/internal-scripts": "1.0.32",
"@mui/monorepo": "github:mui/material-ui#0221d17856a63d89e832d49f652b1e189ab7b7cf",
"@mui/x-charts": "7.22.2",
"@mui/x-charts": "7.23.2",
"@next/eslint-plugin-next": "14.2.22",
"@playwright/test": "1.47.2",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "16.0.1",
"@testing-library/react": "16.1.0",
"@testing-library/user-event": "14.5.2",
"@types/archiver": "6.0.3",
"@types/fs-extra": "11.0.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/create-toolpad-app/src/templates/packageJson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ const packageJson: PackageJsonTemplate = (options) => {
}

const dependencies: Record<string, string> = {
react: '^18',
'react-dom': '^18',
react: '^19',
'react-dom': '^19',
'@toolpad/core': coreVersion ?? 'latest',
'@mui/material': '^6',
'@mui/material-nextjs': '^6',
Expand Down
6 changes: 3 additions & 3 deletions packages/toolpad-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
"@mui/material": "6.3.1",
"@types/invariant": "2.2.37",
"@types/prop-types": "15.7.14",
"@types/react": "18.3.18",
"@types/react-dom": "18.3.5",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@types/sinon": "^17.0.3",
"@vitest/browser": "2.1.8",
"next": "^15.1.3",
Expand All @@ -84,7 +84,7 @@
"@mui/icons-material": "5 - 6",
"@mui/material": "5 - 6",
"next": "^14 || ^15",
"react": "^18",
"react": "^18 || ^19",
"react-router": "^7"
},
"peerDependenciesMeta": {
Expand Down
14 changes: 7 additions & 7 deletions packages/toolpad-studio-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
"@mui/icons-material": "6.3.1",
"@mui/lab": "6.0.0-beta.22",
"@mui/material": "6.3.1",
"@mui/x-charts": "7.22.2",
"@mui/x-data-grid-premium": "7.22.2",
"@mui/x-date-pickers": "7.22.2",
"@mui/x-license": "7.21.0",
"@mui/x-charts": "7.23.2",
"@mui/x-data-grid-premium": "7.23.5",
"@mui/x-date-pickers": "7.23.3",
"@mui/x-license": "7.23.5",
"@tanstack/react-query": "5.61.3",
"@toolpad/studio-runtime": "workspace:*",
"@toolpad/utils": "workspace:*",
Expand All @@ -59,11 +59,11 @@
},
"devDependencies": {
"@types/invariant": "2.2.37",
"@types/react": "18.3.18",
"react": "18.3.1"
"@types/react": "^19.0.0",
"react": "^19.0.0"
},
"peerDependencies": {
"react": "^18.0.0"
"react": "^18.0.0 || ^19.0.0"
},
"publishConfig": {
"access": "public"
Expand Down
8 changes: 4 additions & 4 deletions packages/toolpad-studio-components/src/DataGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1010,16 +1010,16 @@ function useDataProviderDataGridProps(
}));
apiRef.current.scrollToIndexes({ rowIndex: 0, colIndex });
},
},
} satisfies EditToolbarProps as GridToolbarProps,
},
};
}

type NoRowsOverlayProps = React.ComponentProps<typeof GridNoRowsOverlay>;

interface NoRowsOverlayPropsX extends NoRowsOverlayProps {
type NoRowsOverlayPropsX = NoRowsOverlayProps & {
error?: Error | null;
}
};

function NoRowsOverlay(props: NoRowsOverlayPropsX) {
if (props.error) {
Expand Down Expand Up @@ -1331,7 +1331,7 @@ const DataGridComponent = React.forwardRef(function DataGridComponent(
slotProps={{
noRowsOverlay: {
error: rowLoadingError,
} as any,
} satisfies NoRowsOverlayPropsX as NoRowsOverlayProps,
...dataProviderSlotProps,
}}
onColumnResize={handleResize}
Expand Down
Loading
Loading