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" support to the for-of transform #11266

Merged
merged 3 commits into from May 24, 2020

Conversation

nicolo-ribaudo
Copy link
Member

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

Q                       A
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
using for-of on DOM lists, strings or arguments in browsers without Symbol.iterator
support.

@nicolo-ribaudo nicolo-ribaudo added the PR: New Feature 🚀 A type of pull request used for our changelog categories label Mar 15, 2020
@nicolo-ribaudo nicolo-ribaudo changed the title Add "allowArrayLike" support to the for-of transform [DRAFT] Add "allowArrayLike" support to the for-of transform Mar 15, 2020
@nicolo-ribaudo nicolo-ribaudo added this to Blocked in Iterables DX Mar 15, 2020
@nicolo-ribaudo nicolo-ribaudo force-pushed the iterables-dx/for-of-no-symbol-allow-array branch from d5b9ea3 to fe088fe Compare March 17, 2020 01:06
@nicolo-ribaudo nicolo-ribaudo moved this from Blocked to Ready for review in Iterables DX Mar 19, 2020
@nicolo-ribaudo nicolo-ribaudo moved this from Ready for review to allowArrayLike optoin in Iterables DX Mar 19, 2020
@nicolo-ribaudo nicolo-ribaudo force-pushed the iterables-dx/for-of-allowArrayLike branch from 77adb90 to 2811336 Compare March 20, 2020 08:54
@nicolo-ribaudo nicolo-ribaudo moved this from allowArrayLike optoin to Ready for review in Iterables DX Mar 20, 2020
@nicolo-ribaudo nicolo-ribaudo changed the title [DRAFT] Add "allowArrayLike" support to the for-of transform Add "allowArrayLike" support to the for-of transform Mar 20, 2020
@nicolo-ribaudo nicolo-ribaudo changed the base branch from iterables-dx/for-of-no-symbol-allow-array to master March 20, 2020 09:11
@nicolo-ribaudo nicolo-ribaudo added this to the v7.10.0 milestone Mar 20, 2020
@@ -6,14 +6,20 @@ import transformWithoutHelper from "./no-helper-implementation";
export default declare((api, options) => {
api.assertVersion(7);

const { loose, assumeArray } = options;
const { loose, assumeArray, allowArrayLike } = options;
Copy link
Contributor

@JLHwung JLHwung Mar 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might worthy to note that this option requires babel/core@7.9.0, otherwise it is an no-op.

@nicolo-ribaudo nicolo-ribaudo force-pushed the iterables-dx/for-of-allowArrayLike branch from 2811336 to 2a06541 Compare April 9, 2020 21:56
@nicolo-ribaudo nicolo-ribaudo added PR: Ready to be Merged A pull request with already two approvals, but waiting for the next minor release and removed PR: Needs Docs labels Apr 27, 2020
@nicolo-ribaudo nicolo-ribaudo merged commit 28231e1 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/for-of-allowArrayLike branch May 24, 2020 20:58
@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.

None yet

5 participants