-
Notifications
You must be signed in to change notification settings - Fork 788
Nodejs 7.2 async/await #733
Comments
I get a bunch or errors that look like
Maybe |
@gbahamondezc,
|
@sabakugaara the most recent version of istanbul is 0.4.5; do you mean gulp-istanbul >= 1.0.0? Also as far as I can tell, the problem is that the parser being used is esprima, and it does not yet support async/await it only claims to support ES2016. So I think the answer here is that esprima needs to support ES2017 and then istanbul needs to be upgraded to a compliant version of esprima, and then gulp-istanbul needs to be bumped to take that new version of istanbul. If you'd like to verify for yourself that this is the case, you can look at the esprima online parser, just type in a simple do nothing async function and it will complain: http://esprima.org/demo/parse.html. |
@kevinludwig try this: istanbul 1.1-alpha |
npm ERR! No compatible version found: [email protected] |
maybe |
don't think that helps. Latest version of |
for what its worth, I tried upgrading |
Welp, node 7.6 landed and async/await is no longer behind a harmony flag, but I still can't get coverage for async/await. |
yep, async/await is not working :( i think it is the last important language update for a while. |
Install
|
works! thanks! |
use |
Works, perfect with alpha version. |
what would you recommend as the way to get gulp-istanbul working? I have this vague feeling that if I make a PR to that repo saying "just use the alpha version of istanbul" I will get rejected. |
also if I just do
So did the interface change for |
It's trying to do |
@gotwarlost |
Is there any improvements on this issue? |
From the readme:
async/await is supported by default in the new version: https://github.com/istanbuljs/istanbuljs Took me a while to realize that there's a difference between |
Also * Use istanbul@next to parse async/await js files * gotwarlost/istanbul#733 * Make istanbul to report the whole coverage under lib directory
A few questions: Is |
Nyc does not require banel with latest node. Its vastly simpler than the gulp plugin. |
Oh, looks like I misunderstood the istanbul website which wasn't clear on whether babel-plugin-istanbul was required. @kevinludwig is correct, this is not required. |
I also had problems using Here is my npm "coverage" script:
|
This is an initial implementation of ShareDB's [`MilestoneDB`][1]. The base bones of `MongoMilestoneDB` are based on the [`sharedb-mongo`][2] database adapter. This adapter is a slight departure from other ShareDB code, as it is written in ES7 for easier maintenance, especially when dealing with asynchronous code, as this gives us access to the `async`/`await` notation (although we can't realise its full potential due to needing to deal with consumer callbacks to be consistent with the rest of ShareDB). The move to ES7 drops support for Node v6. This library notably uses v2 of [`mongodb`][3] instead of the newer v3. This is to stay consistent with `sharedb-mongo`, so in theory the same config (or style of config) can be used in both `sharedb-mongo` and in `sharedb-milestone-mongo`. The version of [`istanbul`][4] is also bumped to the alpha version to [support ES7 syntax][5]. We also move away from `jshint` and use `eslint` with some more aggressive linting. [1]: share/sharedb#236 [2]: https://github.com/share/sharedb-mongo [3]: https://mongodb.github.io/node-mongodb-native/ [4]: https://github.com/gotwarlost/istanbul [5]: gotwarlost/istanbul#733
This is an initial implementation of ShareDB's [`MilestoneDB`][1]. The base bones of `MongoMilestoneDB` are based on the [`sharedb-mongo`][2] database adapter. This adapter is a slight departure from other ShareDB code, as it is written in ES7 for easier maintenance, especially when dealing with asynchronous code, as this gives us access to the `async`/`await` notation (although we can't realise its full potential due to needing to deal with consumer callbacks to be consistent with the rest of ShareDB). The move to ES7 drops support for Node v6. This library notably uses v2 of [`mongodb`][3] instead of the newer v3. This is to stay consistent with `sharedb-mongo`, so in theory the same config (or style of config) can be used in both `sharedb-mongo` and in `sharedb-milestone-mongo`. The version of [`istanbul`][4] is also bumped to the alpha version to [support ES7 syntax][5]. We also move away from `jshint` and use `eslint` with some more aggressive linting. [1]: share/sharedb#236 [2]: https://github.com/share/sharedb-mongo [3]: https://mongodb.github.io/node-mongodb-native/ [4]: https://github.com/gotwarlost/istanbul [5]: gotwarlost/istanbul#733
I'm using NodeJS 7 + gulp-istanbul for my test coverage and i'm getting Unexpected identifier with a async method of a class.
Is this issue related direct with Istanbul?
If so, there's some way to support this case?
The text was updated successfully, but these errors were encountered: