-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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] mui-replace does not update package.json as documented #40362
Comments
Thanks for the report. I believe the problem is caused by the fact that it doesn't take into account |
Thanks for looking into this and submitting a PR to fix it @ZeeshanTamboli. Would you be able to give me a rough timeline as to what the process is like for this to be reviewed, merged, and published, please? I can understand that you can't give me exact dates, just estimates works for me 👍 |
@awanlin The merge will happen upon approval, and the publication will occur during our weekly release. I'll make an effort to expedite this PR with the reviewers, but I cannot provide a guarantee. |
Thanks, that works for me, I know these things take time but it looks like it got merged! When do the weekly releases happen? Excited to test this out on my end 🚀 |
It will happen at the start of this week. Might be today or tomorrow. |
Finally got time to test this out and I'm hitting an error:
Steps to reproduce:
Notice you get the error above |
@awanlin I reproduced the issue, and it seems to be related to jscodeshift - either facebook/jscodeshift#559 or facebook/jscodeshift#539. Running the following command works for me:
I'm uncertain about any actions we can take on our side. |
Thanks for taking a look into this @ZeeshanTamboli, I'll try that command as well and report back. I think in our case that should be satisfactory 👍 |
Just got around to trying this out and though it works without errors the versions aren't updated so running It simply changes the names but what it should be doing is also updating the package versions. Not sure how that would work, perhaps this feature should juts be removed? 🤔 |
The |
Thanks for confirming, should the docs be updated to clarify that? I feel like others would have made that assumption as well. 🤔 |
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example: https://github.com/backstage/demo
Steps:
git clone https://github.com/backstage/demo
yarn install
npx @mui/codemod@latest v5.0.0/mui-replace .
Notice: the
package.json
is not changed though the documentation indicates it should be: https://github.com/mui/material-ui/blob/master/packages/mui-codemod/README.md#mui-replace:~:text=mui/lab/Mansory%27%3B-,Dependencies,-//%20package.json%0A%2DCurrent behavior 😯
All the code files are updates as expected but the
package.json
file is notExpected behavior 🤔
The
package.json
file should be updated with the proper changes as per the documentation: https://github.com/mui/material-ui/blob/master/packages/mui-codemod/README.md#mui-replace:~:text=mui/lab/Mansory%27%3B-,Dependencies,-//%20package.json%0A%2DContext 🔦
We are slowly working on migrating Backstage to Material UI v5 from v4 and would like to use as much automation as possible. Ideally we want to be able to tell our adopters to use
npx @mui/codemod v5.0.0/preset-safe
which includesmui-replace
but until this issue is fixed we can't do so.Your environment 🌎
I've included this as asked but it's not listing the right versions as we are still using packages from
@material-ui/*
:https://github.com/backstage/demo/blob/084c8181fe7a1100dff458ef2ae87f290792edbe/packages/app/package.json#L36-L38
Also, I have not included browser details as that doesn't come into play with this issue.
npx @mui/envinfo
The text was updated successfully, but these errors were encountered: