jprichardson / node-kexec

Node.js exec function to replace running process; like Ruby's exec.
MIT License
50 stars 25 forks source link

feat: add support for node 12 and node 13 #38

Open jrmclaurin opened 4 years ago

jrmclaurin commented 4 years ago

This is a port of kexec from nan to node-addon-api, which cleans up the code and provides support for node versions up to the latest (currently node 13). Migrating from nan to node-addon-api removes support for node 7 and below, so this would need to be released as a breaking change.

This PR also cleans up error handling by checking of the return values of all system calls, and throwing JS exceptions with information about any system call failures.

Not sure if this is the direction you want to take the project, but I wanted to offer the contribution in case you feel that migrating to node-addon-api is the right call.