bcoe / c8

output coverage reports using Node.js' built in coverage
ISC License
1.98k stars 89 forks source link

Add support for yaml/.js configuration files #431

Open bcoe opened 1 year ago

bcoe commented 1 year ago

We've had a few requests for yaml and .js configuration files:

https://github.com/bcoe/c8/issues/425 https://github.com/bcoe/c8/issues/420


One issue with .yaml is that the available yaml parsers are massive, 10x the size of c8 itself.

.js configuration would perhaps be less unwieldy. We should look at how mocha approaches this (as I think there are potentially security pitfalls, we shouldn't just go with the naive approach).

kf6kjg commented 1 year ago

Parsers may be massive, but they are also already deeply embedded in the ecosystem. E.g. a lot of the dev packages a user will install already include such.

That said you could make such a parser an optional dependency. Then the user install it if the user wants to configure that way.

As to using javascript, not my preference unless the system can also accept Typescript. That has been a difficult proposition in most projects I've interacted with.

mcknasty commented 1 year ago

Hi @bcoe and @kf6kjg

I just put in Pull Request #436 for this feature. Need a maintainer to review before starting the workflow.

Thanks!