-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[SEMVER-MAJOR] Always use bluebird as promise library #1896
Conversation
LGTM but @bajtos should confirm this one before you merge. Also, why so many fails on CI? |
@@ -48,6 +48,3 @@ assert.isFunc = function(obj, name) { | |||
assert(typeof obj[name] === 'function', name + ' is not a function'); | |||
}; | |||
|
|||
if (!('Promise' in global)) { |
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.
Please remove the trailing empty line at L50.
@jannyHou code changes LGTM. Please rebase your patch on top of the current master and add an entry to @superkhau could you please help here? |
@@ -34,6 +34,7 @@ | |||
"dependencies": { | |||
"async": "^0.9.0", | |||
"bcryptjs": "^2.1.0", | |||
"bluebird": "^2.9.9", |
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.
Please use 3.x
version - the same as we do in juggler (loopbackio/loopback-datasource-juggler#790)
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.
Didn't notice the older version of bluebird here. As suggested by @bajtos, please use 3.1.1 (latest on NPM - I checked for you).
"mostly good" would be a better description - we should upgrade to |
} | ||
|
||
var promise = new global.Promise(function(resolve, reject) { | ||
var promise = new Promise(function(resolve, reject) { | ||
cb = function(err, data) { | ||
if (err) return reject(err); | ||
return resolve(data); |
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 don't think the return is necessary here.
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.
It's fine to leave this since it's in the original code and not part of your changes anyways.
Sure. @jannyHou Ping me when you're working on this. |
8b48981
to
680317f
Compare
Replace `global.Promise` with `bluebird`
680317f
to
889c561
Compare
[SEMVER-MAJOR] Always use bluebird as promise library
This pr is created for updating files to use
bluebird
as promise library.See details here:
Connect to strongloop-internal/scrum-loopback#615
Related: loopbackio/loopback-datasource-juggler#790