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

Codemod for migrating deprecated MUI APIs does not work with custom design systems #45059

Open
akibarika opened this issue Jan 20, 2025 · 1 comment
Labels
new feature New feature or request package: codemod Specific to @mui/codemod

Comments

@akibarika
Copy link

akibarika commented Jan 20, 2025

I am currently working with a custom design system that wraps MUI components, and I've encountered an issue when trying to migrate from deprecated MUI APIs using the codemod tool.

When I run the following command:

npx @mui/codemod@latest deprecations/all <path>

It does not work properly because my codebase imports components from @my-ui-library, which is a wrapper around MUI's components, instead of directly importing from @mui/material.

The codemod only works when I change my imports to @mui/material.

Any workaround? Thanks

Environment:

  • MUI version: 6.4.0
@github-actions github-actions bot added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 20, 2025
@mnajdova
Copy link
Member

Hmm, this is interesting scenario. Maybe we could add an import option for the codemods. cc @siriwatknp what do you think?

@mnajdova mnajdova added new feature New feature or request package: codemod Specific to @mui/codemod and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request package: codemod Specific to @mui/codemod
Projects
None yet
Development

No branches or pull requests

2 participants