-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
Codemod tests from createClass to ES2015 classes #7321
Conversation
Just 10 files? We have 53 that have createClass in them… |
@spicyj oops, I forgot to turn off |
Is it because we usually require in beforeEach instead of at the top level? |
3bd05c3
to
f4fe06a
Compare
@spicyj yeah, I was wrong -- our codemod only searches for variable declarators and ES6 imports but not assignments (https://github.com/reactjs/react-codemod/blob/master/transforms/utils/ReactUtils.js#L28). I re-ran the codemod and updated the PR. There are some failing tests and they'll be fixed by #7326 and babel/babel#3589. |
f4fe06a
to
43f55c8
Compare
Accepting, feel free to merge when the babel stuff is sorted out. |
This is really exciting! |
de6bb6e
to
61b14f9
Compare
- babel/babel#3589 fixed inferring class name
- reverted more files under classic
61b14f9
to
4d8a5bc
Compare
Codemod tests from createClass to ES2015 classes (cherry picked from commit 484f96b)
Codemodded automatically using https://github.com/reactjs/react-codemod#explanation-of-the-new-es2015-class-transform-with-property-initializers.
Reviewers: @sebmarkbage @spicyj
codemod log:
Then I reverted some non-test files and things under
./src/isomorphic/classic/class
.