tapjs / foreground-child

Run a child as if it's the foreground process. Give it stdio. Exit when it exits.
http://tapjs.github.io/foreground-child/
ISC License
40 stars 14 forks source link

Update API #22

Closed demurgos closed 6 years ago

demurgos commented 6 years ago

This PR is part of the effort to improve Node's support for code coverage (see discussion on c8).

This PR exposes two new functions to support foreground childs:

The original API is still there. The only breaking change is dropping support for unmaintained Node versions (require Node 6+).

The new spawn function would allow to pass the env NODE_V8_COVERAGE variable directly in c8. There are a few other changes:

Other comments:

Discussions:

demurgos commented 6 years ago

Closing for now, I'll send smaller PRs.