Skip to content
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

Merged
merged 3 commits into from
Oct 25, 2018
Merged

Conversation

mcollina
Copy link
Owner

Fixes #7.

@BridgeAR @targos @jasnell @benjamingr can you please review this?

@mcollina
Copy link
Owner Author

(this is a semver-major change)


install('multipleResolves', function (type, promise, reason) {
console.error(type, promise, reason)
abortOrExit()
Copy link
Contributor

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)
Copy link
Collaborator

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]
Copy link
Collaborator

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

@mcollina mcollina merged commit c1a7c2e into master Oct 25, 2018
@mcollina mcollina deleted the add-multiple-resolves branch October 25, 2018 17:42
mcollina added a commit that referenced this pull request Nov 20, 2018
This reverts commit c1a7c2e, reversing
changes made to c6c6604.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants