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

Update bluebird dependency 2.9.24 -> 3.3.4. Fixes #1216 #1279

Merged
merged 4 commits into from Mar 16, 2016

Conversation

@wubzz
Copy link
Member

@wubzz wubzz commented Mar 15, 2016

No description provided.

@wubzz wubzz force-pushed the wubzz:update_bluebird_dependency branch from 93ab313 to 7f4813f Mar 15, 2016
@wubzz
Copy link
Member Author

@wubzz wubzz commented Mar 16, 2016

Note to self: May need to add reflect here.

@@ -229,7 +229,7 @@ function makeTxClient(trx, client, connection) {
})
}
trxClient.acquireConnection = function() {
return Promise.settle([trx._previousSibling]).then(function () {
return Promise.all([trx._previousSibling].map((p) => { p.reflect() })).then(function () {

This comment has been minimized.

@elhigu

elhigu Mar 16, 2016
Member

Here probably you should return promise in map?

.map((p) => { return p.reflect() }) or .map((p) => p.reflect()) otherwise you will get Promise.all([undefined]) here.

So maybe

return Promise.all([trx._previousSibling].map(p => p.reflect())).then(function () { return connection; });

Also since code already requires that trx._previousSibling is a Promise or otherwise p.reflect() would throw an error, so this could be further simplified:

return trx._previousSibling.reflect().then(function () { return connection; });

This comment has been minimized.

@wubzz

wubzz Mar 16, 2016
Author Member

Yeah that's a complete miss, my bad. Thought I had added 'return'

elhigu added a commit that referenced this pull request Mar 16, 2016
Update bluebird dependency 2.9.24 -> 3.3.4. Fixes #1216
@elhigu elhigu merged commit cb1bea1 into knex:master Mar 16, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants