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

Handle remapping of JSXIdentifier to MemberExpression in CommonJS transform. Closes #3728 #4763

Merged
merged 1 commit into from Oct 24, 2016

Conversation

Projects
None yet
4 participants
@DrewML
Member

DrewML commented Oct 23, 2016

Q A
Bug fix? yes
Breaking change? no
New feature? no
Deprecations? no
Spec compliancy? no
Tests added/pass? yes
Fixed tickets #3728, #3994
License MIT
Doc PR none
@codecov-io

This comment has been minimized.

Show comment
Hide comment
@codecov-io

codecov-io Oct 23, 2016

Current coverage is 89.38% (diff: 100%)

Merging #4763 into master will increase coverage by <.01%

@@             master      #4763   diff @@
==========================================
  Files           196        196          
  Lines         13887      13891     +4   
  Methods        1434       1434          
  Messages          0          0          
  Branches       3198       3199     +1   
==========================================
+ Hits          12412      12416     +4   
  Misses         1475       1475          
  Partials          0          0          

Powered by Codecov. Last update fd4667e...109c3b0

codecov-io commented Oct 23, 2016

Current coverage is 89.38% (diff: 100%)

Merging #4763 into master will increase coverage by <.01%

@@             master      #4763   diff @@
==========================================
  Files           196        196          
  Lines         13887      13891     +4   
  Methods        1434       1434          
  Messages          0          0          
  Branches       3198       3199     +1   
==========================================
+ Hits          12412      12416     +4   
  Misses         1475       1475          
  Partials          0          0          

Powered by Codecov. Last update fd4667e...109c3b0

@danez

This comment has been minimized.

Show comment
Hide comment
@danez

danez Oct 23, 2016

Member

Can you describe how this change works? By looking at the code I somehow can't figure out why the parentPath has to be JSXMemberExpression to make it's child be a JSXMemberExpression.

Member

danez commented Oct 23, 2016

Can you describe how this change works? By looking at the code I somehow can't figure out why the parentPath has to be JSXMemberExpression to make it's child be a JSXMemberExpression.

@DrewML

This comment has been minimized.

Show comment
Hide comment
@DrewML

DrewML Oct 23, 2016

Member

@danez Thanks for making me think that through. Your instinct is totally right that the parent doesn't need to be a JSXMemberExpression (in fact, I'm probably missing some cases with that check).

I believe the check should just be path.isJSXIdentifier() && t.isMemberExpression(remap). Will push an update shortly.

Member

DrewML commented Oct 23, 2016

@danez Thanks for making me think that through. Your instinct is totally right that the parent doesn't need to be a JSXMemberExpression (in fact, I'm probably missing some cases with that check).

I believe the check should just be path.isJSXIdentifier() && t.isMemberExpression(remap). Will push an update shortly.

@DrewML DrewML changed the title from Handle remapping of identifier to member expression in commonjs transform when dealing with JSXIdentifier. Closes #3728 to Handle remapping of JSXIdentifier to MemberExpression in CommonJS transform. Closes #3728 Oct 23, 2016

@danez

danez approved these changes Oct 23, 2016

@hzoo hzoo merged commit de46827 into babel:master Oct 24, 2016

4 checks passed

ci/circleci Your tests passed on CircleCI!
Details
codecov/patch Coverage not affected when comparing fd4667e...109c3b0
Details
codecov/project 89.38% (+<.01%) compared to fd4667e
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

panagosg7 added a commit to panagosg7/babel that referenced this pull request Jan 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment