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
39 stars 14 forks source link

feature: Add async support #32

Closed coreyfarrell closed 4 years ago

coreyfarrell commented 5 years ago

Since the next release will already be semver-major I think node.js 6 should be dropped before the release.

CC @demurgos

demurgos commented 5 years ago

I agree. I don't think this module needs any of the new features, but it's still good for maintenance.

coreyfarrell commented 5 years ago

IMO testing should pass on any version which package.json advertises. Requiring node.js 8 is allows us to use the latest tap and the next version of nyc.

demurgos commented 5 years ago

Okay, I wasn't aware that nyc and tap dropped Node 6 support. Then it's definitely a higher priority.

coreyfarrell commented 5 years ago

tap 13 dropped node 6. nyc 15 will drop node 6 (nyc@14 is current and still supports node 6).

coreyfarrell commented 5 years ago

I think it would be nice to support using an async function for the callback. So:

foregroundChild('executable', [...args], async () => {
  // do stuff
});

I'll probably look into this once we get your ES2015 patch merged. Obviously would still support the done callback, just thinking that in some cases using an async function would be nicer.

isaacs commented 5 years ago

Strong agree.

demurgos commented 4 years ago

Closed by #34

(Edit: outdated, this issue is no longer about just updating to Node 8 but supporting async)