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

Check if async is available before loading async-to-gen #114

Merged
merged 5 commits into from Dec 24, 2016

Conversation

timneutkens
Copy link
Member

No description provided.

We now use [async-to-gen](https://github.com/leebyron/async-to-gen),
so that the only transformation that happens is converting `async`
and `await` to generators.
We now use [is-async-supported](https://github.com/timneutkens/is-async-supported) combined with [async-to-gen](https://github.com/leebyron/async-to-gen),
Copy link
Contributor

Choose a reason for hiding this comment

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

neat stuff 🎉

@@ -57,7 +58,9 @@ if ('/' !== file[0]) {
file = resolve(process.cwd(), file)
}

require('async-to-gen/register')
if(!isAsyncSupported()) {
Copy link
Contributor

@albinekb albinekb Dec 21, 2016

Choose a reason for hiding this comment

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

Add a space for consistency (looks like there are spaces further down in this file)

if (!isAsyncSupported()) {

Copy link
Member Author

Choose a reason for hiding this comment

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

Added 🔥

We now use [async-to-gen](https://github.com/leebyron/async-to-gen),
so that the only transformation that happens is converting `async`
and `await` to generators.
We now use [is-async-supported](https://github.com/timneutkens/is-async-supported) combined with [async-to-gen](https://github.com/leebyron/async-to-gen),
Copy link
Member

Choose a reason for hiding this comment

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

The temporal reference ("now") is only interesting to people who already knew about the implementation details. I'd take it out

Copy link
Member Author

Choose a reason for hiding this comment

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

Done 👍

@rauchg rauchg merged commit f3d34c0 into vercel:master Dec 24, 2016
@rauchg
Copy link
Member

rauchg commented Dec 24, 2016

Great work @timneutkens

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

Successfully merging this pull request may close these issues.

None yet

4 participants