c8 icon indicating copy to clipboard operation
c8 copied to clipboard

Request for js configuration files as supported by nyc

Open mkrei opened this issue 3 years ago • 1 comments

Hi,

during an ongoing attempt to port an existing project running from nyc to c8, I noticed c8 currently does not support configuration files in a .js format. While there may be (undocumented) reasons I don't know for this decision, it also reduces the configuration options for c8 in comparison to nyc quite a bit.

Before you could have a dynamic configuration like

module.exports = {
    'report-dir': './coverage/process.env.TEST_CLASS'
    all: true
[...]
}

which would allow using a configuration file for different kinds of tests executed in a complex project. Currently the only work-around I could think of would be to instead pass the configuration as CLI parameter of c8 instead, which increases the complexity of the scripts quite a bit.

As such, would it be possible to increase feature-parity between nyc and c8 by also allowing .js files as configuration?

mkrei avatar Apr 07 '22 09:04 mkrei

See also https://github.com/bcoe/c8/issues/431

kf6kjg avatar Jul 11 '23 21:07 kf6kjg