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 "allowArrayLike" option to the destructuring and spread transforms #11265

Merged
merged 1 commit into from May 24, 2020

Conversation

nicolo-ribaudo
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo commented Mar 14, 2020

Q                       A
Fixed issues Fixes #10509. These issues are closed as "working as intended", but would be fixed by this PR: #10453, #545, #4616
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature? Yes
Tests Added + Pass? Yes
Documentation PR Link babel/website#2234
Any Dependency Changes?
License MIT

When enabled, this option makes Babel treat array-like objects as if
they were iterables. This makes it possible to avoid a Symbol polyfill when
spreading or destructuring DOM lists in browsers without Symbol.iterator
support.

This is implemented as a separate helper to avoid adding unnecessary code when it's disabled.

Part 1c/n

@nicolo-ribaudo nicolo-ribaudo added the PR: New Feature 🚀 A type of pull request used for our changelog categories label Mar 14, 2020
@nicolo-ribaudo nicolo-ribaudo added this to Ready for review in Iterables DX Mar 14, 2020
@nicolo-ribaudo nicolo-ribaudo marked this pull request as ready for review March 15, 2020 14:01
@nicolo-ribaudo nicolo-ribaudo moved this from Ready for review to allowArrayLike optoin in Iterables DX Mar 19, 2020
When enabled, this option makes Babel treat array-like objects as if
they were iterables. This makes it possible to avoid a Symbol polyfill when
spreading or destructuring DOM lists in browsers without Symbol.iterator
support.
@nicolo-ribaudo nicolo-ribaudo force-pushed the iterables-dx/rest-spread-allowArrayLike branch from 1eda6df to 71d0f21 Compare March 20, 2020 08:33
@nicolo-ribaudo nicolo-ribaudo moved this from allowArrayLike optoin to Ready for review in Iterables DX Mar 20, 2020
@nicolo-ribaudo nicolo-ribaudo added this to the v7.10.0 milestone Mar 20, 2020
@nicolo-ribaudo nicolo-ribaudo added the PR: Ready to be Merged A pull request with already two approvals, but waiting for the next minor release label Apr 29, 2020
@nicolo-ribaudo nicolo-ribaudo merged commit 9397826 into master May 24, 2020
Iterables DX automation moved this from Ready for review to Done May 24, 2020
@nicolo-ribaudo nicolo-ribaudo deleted the iterables-dx/rest-spread-allowArrayLike branch May 24, 2020 21:00
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Aug 24, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: New Feature 🚀 A type of pull request used for our changelog categories PR: Ready to be Merged A pull request with already two approvals, but waiting for the next minor release
Projects
No open projects
Iterables DX
  
Done
Development

Successfully merging this pull request may close these issues.

TypeError: Invalid attempt to spread non-iterable instance [occurs only iOS Safari]
3 participants