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

Revert "Revert babel-helper-builder-react-jsx change from #4988" #9119

Merged
merged 1 commit into from Jan 6, 2019
Merged

Revert "Revert babel-helper-builder-react-jsx change from #4988" #9119

merged 1 commit into from Jan 6, 2019

Conversation

danez
Copy link
Member

@danez danez commented Dec 3, 2018

Q                       A
Fixed Issues? Fixes #5492, Fixes #8456
Patch: Bug Fix? y
Major: Breaking Change? n
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

This readds the throw for JSXSpreadChild in the react transform.

It was initially added in #4988 but later reverted (#5015) because there were breaking cases when people used the latest version of the react transform but an older versions of babel-types (which did not yet know the new node JSXSpreadChild).

We now do not have this problem anymore as a) we released a major and b) renamed the project after the node was added.

I thought about adding a flag similar to the namespace flag, but atm if someone would use the react-transform with the SpreacChildren it would throw anyway with:

TypeError: Property arguments[2] of CallExpression expected node to
 be of a type ["Expression","SpreadElement","JSXNamespacedName"] but in
stead got "JSXSpreadChild"

This reverts commit dbc0722.

# Conflicts:
#	packages/babel-helper-builder-react-jsx/src/index.js
@danez danez added PR: Bug Fix 🐛 A type of pull request used for our changelog categories area: react area: jsx labels Dec 3, 2018
@babel-bot
Copy link
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/9520/

@danez danez merged commit 54f0729 into babel:master Jan 6, 2019
@danez danez deleted the revert-jsx-spread-child branch January 6, 2019 06:22
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: jsx 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
3 participants