Skip to content

[codemod] Add package name option #45977

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 60 commits into
base: master
Choose a base branch
from

Conversation

siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Apr 22, 2025

closes #45663

Added --packageName="..." to the codemod. If specified, the packageName pass through each transformer.

Here is an example usage:

npx @mui/codemod@latest deprecations/all src --packageName="@org/ui"

This is for users who build design system (using Material UI) under their own package scope to leverage the codemod to target their package name.

import Button from '@org/ui/Button'; // behind the scene, this Button is a wrapper of `@mui/material/Button`

The codemods that supports this option are

  • deprecations/**
  • v6.0.0/**
  • v7.0.0/**

Review suggestion

A lot of files were changed with similar approach. Please see each commit for each of the test update.


@siriwatknp siriwatknp added the package: codemod Specific to @mui/codemod label Apr 22, 2025
@mui-bot
Copy link

mui-bot commented Apr 22, 2025

Netlify deploy preview

https://deploy-preview-45977--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 7b76fda

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
package: codemod Specific to @mui/codemod
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Codemods not working when using re-exports
2 participants