Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

top level async iterator #534

Closed
dnalborczyk opened this issue Jul 31, 2018 · 3 comments
Closed

top level async iterator #534

dnalborczyk opened this issue Jul 31, 2018 · 3 comments
Labels

Comments

@dnalborczyk
Copy link
Contributor

dnalborczyk commented Jul 31, 2018

not sure if this is a bug or a feature request - or neither: not sure if async iterators is part of the top-level-await proposal.

const imports = [
  import("./a.js"),
  import("./b.js")
]

for await (const i of imports) {}

// throws: 
// for await (const i of imports) {}
//    ^
// SyntaxError: Invalid or unexpected token
//      at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
@jdalton
Copy link
Member

jdalton commented Jul 31, 2018

Patched f13ed28; Related to acornjs/acorn#712.

@jdalton jdalton closed this as completed Jul 31, 2018
@dnalborczyk
Copy link
Contributor Author

dnalborczyk commented Jul 31, 2018

@jdalton thanks for the quick implementation!!

uh, I think we need a condition for node v10+ support only in the tests. I'll add it soon...

btw, do you think it needs to be fixed on the babel side of things as well? babel/babel#7637 I can file a bug if needed.

@jdalton
Copy link
Member

jdalton commented Jul 31, 2018

No need to patch the esm test, I have it fixed locally.
Good catch on the babel side. Pinging them with a bug isn't a bad idea.

Update:

Patched 7abe703.

Update:

v3.0.73 is released 🎉

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

No branches or pull requests

2 participants