Skip to content
This repository has been archived by the owner on Jul 9, 2018. It is now read-only.

Babel preset: Enable support for async generator functions #126

Merged
merged 3 commits into from
May 22, 2018

Conversation

gziolo
Copy link
Member

@gziolo gziolo commented May 21, 2018

Async generator functions were enabled in Gutenberg to use with data module. See:
https://github.com/WordPress/gutenberg/blob/master/package.json#L108

Given that plugins might want to use the same syntax, let's enable this Babel plugin for everyone.

@gziolo gziolo changed the title Babel preset: Enabled support for async generator functions Babel preset: Enable support for async generator functions May 21, 2018
Copy link
Collaborator

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@gziolo gziolo merged commit 4a991ec into master May 22, 2018
@gziolo gziolo deleted the update/babl-config branch May 22, 2018 06:48
@@ -0,0 +1,15 @@
describe( 'Babel preset default', () => {
Copy link
Member

Choose a reason for hiding this comment

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

Depending on the environment in which these tests are run (i.e. Node v10+ where asynchronous generators are supported natively), couldn't these tests pass even if the transform were not applied?

Copy link
Member Author

Choose a reason for hiding this comment

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

Aren't we using LTS (node 8) on Travis?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

They are much faster this time 👍

We can simply remove this test if it isn't useful in the long run. What would you recommend instead?

Copy link
Member

Choose a reason for hiding this comment

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

I don't know that I would test a preset, which is effectively intended as a configuration. Maybe a snapshot of transpiled code? That the configuration includes expected plugins?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants