-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for hooking spawn / spawnSync without patching. #48
Comments
This comment has been minimized.
This comment has been minimized.
Closed
11 tasks
@Qard Where is the best place for us to engage on the proposal for unified hooks and this feature? |
The plan is to continue the discussion in nodejs/diagnostics#401. I'll be getting back to working on this stuff full-time again in about a week. Until then, I'll be a bit less active for now. If you have any thoughts to share now though, I'm happy to discuss. :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
By default nyc 15 will be using node-preload instead of spawn-wrap. v0.1.x was fine for nyc's specific use case but I do not believe it's generic enough to be part of node.js. In particular it did not support alteration of variables (prepending / appending an existing value) nor does it allow control over conditional variable propagation (setting a variable only if it doesn't already exist).
I've created process-on-spawn. I think this may be generic enough to serve any situation where the environment of child processes must be centrally manipulated/controlled. This new module does not have direct support for propagating variables to grand-child processes and it doesn't help with adding
--require
options toNODE_OPTIONS
. I've altering node-preload to use process-on-spawn instead of directly patching spawn / spawnSync functions, so the two modules work together.My hope is to work towards getting the functionality of process-on-spawn into node.js so nyc can eventually avoid patching spawn / spawnSync.
Ref nodejs/node#27344
CC @bcoe
Edit: I've renamed the module to
process-on-spawn
which provides anoptions
object to listener functions.The text was updated successfully, but these errors were encountered: