-
-
Notifications
You must be signed in to change notification settings - Fork 9.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
Add codemod for deprecated addon-info API #1582
Conversation
Note - This doesn't modify the |
Codecov Report
@@ Coverage Diff @@
## master #1582 +/- ##
==========================================
- Coverage 21.38% 20.81% -0.57%
==========================================
Files 244 247 +3
Lines 5410 5476 +66
Branches 671 667 -4
==========================================
- Hits 1157 1140 -17
- Misses 3746 3820 +74
- Partials 507 516 +9
Continue to review full report at Codecov.
|
This doesn't include any tests yet, but they are coming. In the meantime, if anyone wants to try out the codemod or provide any feedback, that would be great! |
This is ready for final review. |
Looks good to me! anyone else want to pitch in here? @storybooks/team |
Maybe it's not related to this PR directly but I think we need to add some info about this codemod otherwise users will not know about its existence |
Yes @usulpro we do, Right now the "how to test" @trevoreyre wrote describe how to run codemods. And I think some codemod is also part of the CLI. But it's definitely something we must improve! |
@ndelangen @usulpro - I can add some info about the new codemod at |
@trevoreyre I think it would be helpful to link it to the deprecation console message as well. |
maybe https://github.com/storybooks/storybook/blob/master/MIGRATION.md is also an option |
I think for now it's fine to add it to the readme of the codemod package, if you could add it there, we can get this merged! A mention about codemods and where to find info about them would be perfect in MIGRATION.md! |
@ndelangen I added a couple examples in the codemod package's README. |
Issue:
What I did
Added a codemod to convert the outdated
addWithInfo
API from the addon-info package.How to test
./node_modules/.bin/jscodeshift -t ./node_modules/@storybook/codemod/dist/transforms/update-addon-info.js . --ignore-pattern "node_modules|dist"