-
Notifications
You must be signed in to change notification settings - Fork 15
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: add codemod #3836
feat: add codemod #3836
Conversation
🦋 Changeset detectedLatest commit: 6ab5499 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
d415edb
to
6a39358
Compare
091923e
to
4223b16
Compare
2611f0a
to
3b3a1e9
Compare
347b393
to
d077014
Compare
d077014
to
1e5ecf7
Compare
I tried to run it inside a Picasso and this is an output:
I think, we also should cover spec, test and story files, because they are also part of the project. |
@dmaklygin Great suggestion, please let me add it! |
@toptal-bot run package:alpha-release |
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.
Seems to be working as expected, but we have a bullet on AC for marking the old props as deprecated.
Make number and SpacingEnums as deprecated
Maybe we should move this AC to https://toptal-core.atlassian.net/browse/FX-4315?
@dmaklygin Just checked it in
The output is the following
And 1 error stands for custom case that needs to be addressed manually
Then However, one bug was caught and addressed, thanks for checking on |
It looks like it belongs to this ticket, I'll address it in a separate pull request, thanks! |
@toptal-bot run package:alpha-release |
Your alpha package is ready 🎉 |
@toptal-anvil ping reviewers |
FX-4260
Description
This pull request adds a codemod that replaces BASE-aligned spacing property values with new spacing constants.
jscodeshift
has the following problem when running this codemod:insertAfter()
, more in insertAfter adds empty line before facebook/jscodeshift#185insertAfter()
, more in Allow pretty-printer configuration via .eslintrc files benjamn/recast#226However, both issues are solved by running lint or prettier after the codemod run (this recommendation was added to the changeset)
How to test
yarn run jest packages/picasso-codemod/src/v38.1.0/__tests__
npx @toptal/picasso-codemod v38.1.0
Screenshots
Typical change from https://github.com/toptal/staff-portal/pull/10942/files
Running in Staff Portal (https://github.com/toptal/staff-portal/pull/10942)
Development checks
props
in component with documentationexamples
for componentPR commands
List of available commands:
@toptal-bot run package:alpha-release
- Release alpha version@toptal-anvil ping reviewers
- Ping FX team for reviewPR Review Guidelines
When to approve? ✅
You are OK with merging this PR and
nit:
to your comment. (ex.nit: I'd rename this variable from makeCircle to getCircle
)When to request changes? ❌
You are not OK with merging this PR because
When to comment (neither ✅ nor ❌)
You want your comments to be addressed before merging this PR in cases like:
How to handle the comments?