bump(bluebird): upgrade bluebird

Summary:
I upgraded bluebird because I thought there was some missing dependency
issue when I booted K2. It actually turned out that the issue was missing
`striptags` require in the K2 local-sync package json and had nothing to
do with Bluebird.

But since were here and about to QA I figured I might as well bump it
anyway. Especially since I'll need it later to better diagnose async
tests.

I carefully went through the 3.0 changelog and believe I fixed the
outstanding issues

Test Plan: manual

Reviewers: juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D3523
This commit is contained in:
Evan Morikawa 2016-12-15 17:33:37 -05:00
parent d03049b403
commit f7491d7e7b
6 changed files with 11 additions and 9 deletions

View file

@ -21,7 +21,7 @@
"babel-preset-react": "^6.16.0",
"babel-regenerator-runtime": "6.5.0",
"better-sqlite3": "bengotow/better-sqlite3#a888061ad334c76d2db4c06554c90785cc6e7cce",
"bluebird": "^2.9",
"bluebird": "3.4.x",
"chromium-net-errors": "1.0.3",
"chrono-node": "^1.1.2",
"classnames": "1.2.1",

View file

@ -11,7 +11,7 @@
"license": "GPL-3.0",
"dependencies": {
"babel-register": "6.8.x",
"bluebird": "^3.0.5",
"bluebird": "3.4.x",
"jasmine": "^2.3.2",
"spectron": "^0.34.1",
"chalk": "^1.1"

2
src/K2

@ -1 +1 @@
Subproject commit 8319ed3e010af9e3f1c6830dcc47627e68675a70
Subproject commit b2f286371265d18d76a55c372e52801553b9e3fc

View file

@ -87,16 +87,16 @@ class APMWrapper
handleProcessErrors(apmProcess, errorMessage, callback)
getInstalled: ->
Promise.promisify(@loadInstalled, this)()
Promise.promisify(@loadInstalled, {context: this})()
getFeatured: (options = {}) ->
Promise.promisify(@loadFeatured, this)(options)
Promise.promisify(@loadFeatured, {context: this})(options)
getOutdated: ->
Promise.promisify(@loadOutdated, this)()
Promise.promisify(@loadOutdated, {context: this})()
getPackage: (packageName) ->
@packagePromises[packageName] ?= Promise.promisify(@loadPackage, this, packageName)()
@packagePromises[packageName] ?= Promise.promisify(@loadPackage, {context: this})()
satisfiesVersion: (version, metadata) ->
engine = metadata.engines?.nylas ? '*'

View file

@ -139,7 +139,9 @@ class DraftStore extends NylasStore {
// Important: There are some scenarios where all the promises resolve instantly.
// Firing NylasEnv.close() does nothing if called within an existing beforeUnload
// handler, so we need to always defer by one tick before re-firing close.
Promise.settle(promises).then(() => {
// NOTE: this replaces Promise.settle:
// http://bluebirdjs.com/docs/api/reflect.html
Promise.all(promises.map(p => p.reflect())).then(() => {
this._draftSessions = {};
// We have to wait for accumulateAndTrigger() in the DatabaseStore to
// send events to ActionBridge before closing the window.

View file

@ -31,7 +31,7 @@ export default class ReprocessMailRulesTask extends Task {
}
performRemote() {
return Promise.fromNode(this._processAllMessages).thenReturn(Task.Status.Success);
return Promise.fromCallback(this._processAllMessages).thenReturn(Task.Status.Success);
}
_processAllMessages = (callback) => {