[codemod] Add packageName support to the v9 system props codemod#48253
Merged
ZeeshanTamboli merged 5 commits intomui:masterfrom Apr 15, 2026
Merged
Conversation
Netlify deploy previewhttps://deploy-preview-48253--material-ui.netlify.app/ Bundle size report
|
Bundle size
Deploy previewhttps://deploy-preview-48253--material-ui.netlify.app/ Check out the code infra dashboard for more information about this PR. |
ZeeshanTamboli
approved these changes
Apr 15, 2026
Member
ZeeshanTamboli
left a comment
There was a problem hiding this comment.
I updated the logic to make sure it does not match unrelated imports like @acme/ui-icons or foo/@acme/ui/bar for example for --packageName=@acme/ui. Also added the relevant test.
Thanks for the PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
v9.0.0/system-propscodemod ignores the--packageNameCLI option. The import matching is hardcoded to only match@mui:The CLI (
codemod.js) accepts--packageNameand passes it through to jscodeshift asoptions.packageName, butremoveSystemProps.jsnever reads it. This means the option documented in the README has no effect for this codemod.This is a problem for design systems that re-export MUI components under a custom package name. Those usages are silently skipped.
Fix
Read
options.packageNameand include it in the import declaration filter. When not provided, behavior is unchanged -- only@muiimports are matched.Add unit tests to cover the behavior changes when the
packageNameoption is provided.