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
chore(promises): removed support for custom promise libraries #12878
Conversation
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.
In test/connection.test.js we use the package q and bluebird. I wonder if we can remove those tests too? @vkarpov15
lib/helpers/promiseOrCallback.js
Outdated
@@ -35,7 +34,7 @@ module.exports = function promiseOrCallback(callback, fn, ee, Promise) { | |||
} | |||
} | |||
|
|||
Promise = Promise || PromiseProvider.get(); | |||
Promise = Promise || global.Promise || require('bluebird'); |
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.
What happens if bluebird is not installed? Crash gracefully?
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.
mostly looks good to me, though there are some test things that should maybe be changed
also i think this change should target the next major version instead of master
(/ 6.x)
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.
LGTM
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.
LGTM, i think that bluebird
and q
can now be removed from the package.json
just as a note, if you still want to use custom promises, you should be able to do: global.Promise = YourCustomPromise; |
closes #12872