-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add multipleResolves event support #8
Conversation
(this is a semver-major change) |
|
||
install('multipleResolves', function (type, promise, reason) { | ||
console.error(type, promise, reason) | ||
abortOrExit() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if it's actually "safe" to do this based on actual real world usage - but sure :) (the error - for sure, the exit - not 100% sure)
README.md
Outdated
## License | ||
|
||
MIT | ||
|
||
[unhandled]: https://nodejs.org/dist/latest-v8.x/docs/api/deprecations.html#deprecations_dep0018_unhandled_promise_rejections | ||
[unhandled-event]: https://nodejs.org/dist/latest-v10.x/docs/api/process.html#process_event_unhandledrejection) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra parenthesis at the end
|
||
### The Solution | ||
|
||
`make-promises-safe` installs an [`process.on('multipleResolves')`][multiple-event] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's no "multiple-event" link
Fixes #7.
@BridgeAR @targos @jasnell @benjamingr can you please review this?