-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[mui-codemod] Fix merging of slotProps and componentProps #41323
Conversation
Netlify deploy previewhttps://deploy-preview-41323--material-ui.netlify.app/ Bundle size report |
@@ -31,7 +31,7 @@ describe('@mui/codemod', () => { | |||
const actual = transform( | |||
{ source: read('./test-cases/theme.actual.js') }, | |||
{ jscodeshift }, | |||
{ printOptions: { trailingComma: true } }, | |||
{ printOptions: { trailingComma: false } }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
codemod was transforming without trailing comma, so changed to false here. Hope it's not an issue
Hey @DiegoAndai can this PR be reviewed, this PR is blocking my other |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching and fixing this @sai6855 🚀
Sorry for the delay in the review.
If same slot is present in
slotProps
andcomponentProps
, i'd expect codemod to mergecomponentProps
andslotProps
withslotProps
taking precedence but current codemod entirely removescomponentProps.slot
. This PR fixes this bug