kmagiera / babel-watch

Reload your babel-node app on JS source file changes. And do it fast.
MIT License
529 stars 70 forks source link

fix(process): don't assume we're the only ones sending process msgs #82

Closed STRML closed 6 years ago

STRML commented 6 years ago

Fixes crash if the process we're wrapping uses process.send().

Essentially, what can happen is that the wrapped process uses process.send() for a test hook or a way to talk to a cluster master, and babel-watch will just happily try to pull filename off whatever object was sent and pass it to path. This can lead to a nasty error as path will refuse to resolve undefined.