-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat(codemod): add in codemod for size prop updates #8570
feat(codemod): add in codemod for size prop updates #8570
Conversation
0705f8f
to
363453d
Compare
Deploy preview for carbon-elements ready! Built with commit 0705f8f |
Deploy preview for carbon-elements ready! Built with commit 55a938c |
Deploy preview for carbon-components-react ready! Built with commit 0705f8f https://deploy-preview-8570--carbon-components-react.netlify.app |
Deploy preview for carbon-components-react ready! Built with commit 55a938c https://deploy-preview-8570--carbon-components-react.netlify.app |
2fda605
to
fd441ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
a8ed01d
to
55a938c
Compare
Closes #8563
Refs #8370
This PR adds in a new codemod to help users convert their old
size
prop names to the new conventionChangelog
New
size-prop-update.js
contains the codemod that will convert the code to the new syntaxcode-mod-story.js
contains a bunch of current components all using the current naming convention.code-mod-story.js
Changed
TableToolbarAction
was updated to use thesm
class, and marked the old classes for removal in V11Testing / Reviewing
Pull down the PR, then navigate to the
codemods
folder. From there, runyarn jscodeshift -d -t ./transforms/size-prop-update.js '../packages/react/src/components/Test/code-mod-story.js'
.After that has run, you will notice a new file in the react package (
packages/react/src/components/Test/output.js
that contains the updated code. Paste this code into the associated story incode-mod-story.js
that contains a feature flag.Verify all components are using the new props, and that nothing has changed visually 🎉
(extra code and stories will be removed after approval / before emerging)