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] Fix codemods not found #45473

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

DiegoAndai
Copy link
Member

@DiegoAndai DiegoAndai commented Mar 3, 2025

Fixes #45445

After #43264, the codemod package no longer packages the codemods inside the ./node folder, but in the root (./). We have to update the codemod script to search in ./ instead of ./node.

Layout before: https://unpkg.com/browse/@mui/[email protected]/
Layout after: https://unpkg.com/browse/@mui/[email protected]/

@DiegoAndai DiegoAndai added package: codemod Specific to @mui/codemod regression A bug, but worse labels Mar 3, 2025
@DiegoAndai DiegoAndai self-assigned this Mar 3, 2025
@mui-bot
Copy link

mui-bot commented Mar 3, 2025

Netlify deploy preview

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

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 44bfb39

@DiegoAndai DiegoAndai changed the title [codemod] Fix codemods not being found in v7 [codemod] Fix codemods not found Mar 3, 2025
@DiegoAndai
Copy link
Member Author

I can confirm that the codesandbox build of this PR works as expected:

npx @mui/codemod@https://pkg.csb.dev/mui/material-ui/commit/44bfb392/@mui/codemod deprecations/accordion-props ./

In contrast, if you test with the latest @next release, it doesn't work:

npx @mui/codemod@next deprecations/accordion-props ./

Even though the accordion-props codemod has existed for a long time.

Copy link
Member

@Janpot Janpot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you

@DiegoAndai DiegoAndai merged commit 583a24b into mui:master Mar 3, 2025
21 checks passed
@DiegoAndai DiegoAndai deleted the fix-v7-codemod-script branch March 3, 2025 18:55
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: codemod Specific to @mui/codemod regression A bug, but worse
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[codemod] npx can't find any codemods
4 participants