[DataGrid] Add codemods for v6 breaking changes #7086
Labels
component: data grid
This is the name of the generic UI component, not the React module!
package: codemod
Specific to @mui/codemod
umbrella
For grouping multiple issues to provide a holistic view
v6.x
Codemods for pickers can be found here
The v6 for
DataGrid
is bringing quite a few breaking changes.To ease users' migration we ought to try and cover as most changes with codemods as possible.
The codemod package can be found here. It contains all the core setup needed in order to add new codemods to it.
This is intended as an umbrella issue to group all the codemods needed for
v.6.x
migration for DataGrid.Ideally as much migrations as possible should be provided with
preset-safe
codemod.The process of adding a new codemod
index.ts
preset-safe
—update this codemod with your newly added codemod making sure the codemods order is correct if codemod is sensitive to that (i.e. separate props should firstly be migrated tocomponentProps
and only later be passed through a codemod renamingcomponentProps
toslotProps
if we'd go with such approach)You can check @mui/codemod for inspiration on more advanced migration cases.
How to test your changes locally (on a different project)
P.S.
yarn link
does not create abin
command from a linked packagebuild
with eitheryarn workspace @mui/x-codemod build
oryarn build
if you are insrc/packages/x-codemod
cd build && yarn pack
7.tgz
file to the root of your project you want to run (test) the codemod in"@mui/x-codemod": "file:./<your_package_name>"
into your project dependenciesyarn install
npx @mui/x-codemod v6.0.0/preset-safe src
or by adding anx-codemod
script in your project)Breaking changes requiring codemods
Breaking changes related to DataGrid are documented here and relevant PRs are available with applied filters.
remove-deprecated-props doc | change PRremove-deprecated-api-methods doc | change PR- requires manual work on developer's part, better not handle using codemodsremove-removed-exports-and-types doc | change PR- requires manual work on developer's part, better not handle using codemodsreplace-null-undefined-render-cell doc | change PRCould be a lot of different possible cases all of which may not be covered by codemodremove-column-types-props doc | change PRNeeds user intervention, better not be done via codemoderror-overlay-import-rename change PRErrorOverlay component removed in [DataGrid] Remove error boundary #7579, the new change will require some manual workThe text was updated successfully, but these errors were encountered: