istanbuljs / nyc

the Istanbul command line interface
https://istanbul.js.org/
ISC License
5.59k stars 359 forks source link

Is this repository deprecated/abandoned? #1514

Open rennerg opened 1 year ago

rennerg commented 1 year ago

Link to bug demonstration repository

Expected Behavior

Observed Behavior

Troubleshooting steps

Environment Information

# paste the output here
Swivelgames commented 1 year ago

I think most people have moved over to using bcoe/c8

Unfortunately, c8 is broken if you're developing a native ESM module. Otherwise, it works wonderfully and is actively developed.

jcready commented 1 year ago

Otherwise, it works wonderfully

Hard disagree. Regardless of ESM modules c8 (or rather V8) coverage is FAR less accurate with coverage results as it doesn't perform any instrumentation or operate on the AST at all. See https://github.com/jestjs/jest/issues/11188 and https://github.com/vitest-dev/vitest/issues/1252 for more detail, but to summarize:

If you're depending on coverage thresholds in CI for a public repo you should be extremely cautious of c8 because contributors can easily game the statement/line coverage results by adding whitespace or multiline comments. They can also game the branch coverage by only exercising the truthy side of a branch.

While c8 is faster than nyc, it's only faster because it's sacrifices a LOT of accuracy.

Swivelgames commented 7 months ago

@jcready Unfortunately, I'm having the same issues. The lack of accuracy makes it really hard to justify continuing to use c8, especially given the lack of traction on c8/34.

It's disappointing that code coverage projects have lost so much traction and attention.