remove bluebird from client, use ES6 promise instead
This commit is contained in:
@ -33,7 +33,7 @@ module.exports = {
|
|||||||
ignore: [
|
ignore: [
|
||||||
'src/lib/connectors/jquery.js',
|
'src/lib/connectors/jquery.js',
|
||||||
'src/lib/connectors/xhr.js',
|
'src/lib/connectors/xhr.js',
|
||||||
'bluebird'
|
'promise-js'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -45,7 +45,7 @@ module.exports = {
|
|||||||
ignore: [
|
ignore: [
|
||||||
'src/lib/connectors/angular.js',
|
'src/lib/connectors/angular.js',
|
||||||
'src/lib/connectors/xhr.js',
|
'src/lib/connectors/xhr.js',
|
||||||
'bluebird'
|
'promise-js'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,6 +42,7 @@
|
|||||||
"aliasify": "~1.2.4",
|
"aliasify": "~1.2.4",
|
||||||
"async": "~0.8.0",
|
"async": "~0.8.0",
|
||||||
"blanket": "~1.1.5",
|
"blanket": "~1.1.5",
|
||||||
|
"bluebird": "^2.9.14",
|
||||||
"browserify": "~2.35.1",
|
"browserify": "~2.35.1",
|
||||||
"expect.js": "~0.2.0",
|
"expect.js": "~0.2.0",
|
||||||
"express": "~3.4.7",
|
"express": "~3.4.7",
|
||||||
@ -84,11 +85,11 @@
|
|||||||
},
|
},
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bluebird": "^2.9.14",
|
|
||||||
"chalk": "^1.0.0",
|
"chalk": "^1.0.0",
|
||||||
"forever-agent": "^0.6.0",
|
"forever-agent": "^0.6.0",
|
||||||
"lodash": "^3.10.0",
|
"lodash": "^3.10.0",
|
||||||
"lodash-compat": "^3.0.0"
|
"lodash-compat": "^3.0.0",
|
||||||
|
"promise-js": "0.0.6"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@ -7,7 +7,7 @@ module.exports = Transport;
|
|||||||
var _ = require('./utils');
|
var _ = require('./utils');
|
||||||
var errors = require('./errors');
|
var errors = require('./errors');
|
||||||
var Host = require('./host');
|
var Host = require('./host');
|
||||||
var Promise = require('bluebird');
|
var Promise = require('promise-js');
|
||||||
var patchSniffOnConnectionFault = require('./transport/sniff_on_connection_fault');
|
var patchSniffOnConnectionFault = require('./transport/sniff_on_connection_fault');
|
||||||
var findCommonProtocol = require('./transport/find_common_protocol');
|
var findCommonProtocol = require('./transport/find_common_protocol');
|
||||||
|
|
||||||
@ -105,7 +105,12 @@ Transport.nodesToHostCallbacks = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Transport.prototype.defer = function () {
|
Transport.prototype.defer = function () {
|
||||||
return Promise.defer();
|
var defer = {};
|
||||||
|
defer.promise = new Promise(function (resolve, reject) {
|
||||||
|
defer.resolve = resolve;
|
||||||
|
defer.reject = reject;
|
||||||
|
});
|
||||||
|
return defer;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user