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

refactor: use ES2015 #31

Closed demurgos closed 4 years ago

demurgos commented 5 years ago

Why

Following tapjs/foreground-child#24, the library requires Node 6. This allows to use ES2015 features to make the code more expressive and easier to maintain.

What

Replace var declarations by const or let. Use arrow functions. Replace arguments slicing with rest arguments. Use Map to store the listeners.

isaacs commented 5 years ago

+1, but this has conflicts with master, please rebase.

coreyfarrell commented 5 years ago

@demurgos do you have a chance to work on this?

demurgos commented 4 years ago

Thanks for the reminder @coreyfarrell I'll rebase the commit and fix the conflicts.

demurgos commented 4 years ago

I rebased the PR and fixed the conflicts. The only change was in the proxySignals function (extra parameter).

demurgos commented 4 years ago

I am looking into the errors: they seem to also be present on master.

demurgos commented 4 years ago

CI is failing on Node 6 because tap dropped support for Node 6. It passes on Node 8. I don't know why it fails on Node 10. It passes locally using Node 10: is the test flaky?