-
Notifications
You must be signed in to change notification settings - Fork 457
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
Conversation
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), |
There was a problem hiding this comment.
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()) { |
There was a problem hiding this comment.
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()) {
There was a problem hiding this comment.
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), |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 👍
Great work @timneutkens |
No description provided.