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

Add rename-unsafe-lifecycles codemod #195

Merged
merged 2 commits into from
Jan 19, 2018
Merged

Conversation

bvaughn
Copy link
Contributor

@bvaughn bvaughn commented Jan 16, 2018

This codemod corresponds with reactjs/rfcs/pull/6 and facebook/react/pull/12028

This codemod was tested in the React repo by running:

jscodeshift \
  -t ../react-codemod/transforms/rename-unsafe-lifecycles.js \
  --parser=flow \
    ./packages/**/src/**/*.js

I also ran this codemod internally on fbsource and it seemed to work okay, except for a single parse error (before the transform was applied).

This codemod accompanies React RFC 6. Learn more about it here reactjs/rfcs#6
@bvaughn bvaughn requested a review from flarnie January 16, 2018 22:00
@bvaughn bvaughn changed the title Add new rename-unsafe-lifecycles codemod Add rename-unsafe-lifecycles codemod Jan 16, 2018
@TrySound
Copy link

Will new lifecycle names be landed in near minor version?

@bvaughn
Copy link
Contributor Author

bvaughn commented Jan 16, 2018

Yup. Work-in-progress PR @ facebook/react/pull/12028

Copy link
Contributor

@flarnie flarnie left a comment

Choose a reason for hiding this comment

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

Wish I had some corner cases to point out but this looks pretty good to me. Exciting to see things moving forward!

@bvaughn bvaughn merged commit b69f982 into reactjs:master Jan 19, 2018
@bvaughn bvaughn deleted the react-rfc-6 branch January 19, 2018 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants