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

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

Merged
merged 1 commit into from Oct 24, 2016

Conversation

DrewML
Copy link
Member

@DrewML 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
Copy link

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
Copy link
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
Copy link
Member Author

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 Handle remapping of identifier to member expression in commonjs transform when dealing with JSXIdentifier. Closes #3728 Handle remapping of JSXIdentifier to MemberExpression in CommonJS transform. Closes #3728 Oct 23, 2016
@danez danez added PR: Bug Fix 🐛 A type of pull request used for our changelog categories reviewed once area: react labels Oct 23, 2016
@hzoo hzoo merged commit de46827 into babel:master Oct 24, 2016
panagosg7 pushed a commit to panagosg7/babel that referenced this pull request Jan 17, 2017
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 7, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: react outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Bug Fix 🐛 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants