bluebird
Advanced tools
Comparing version 2.9.34 to 2.10.0
@@ -0,1 +1,14 @@ | ||
## 2.10.0 (2015-09-08) | ||
Features: | ||
- `Promise.using` can now take the promises-for-resources as an array ([#733](.)). | ||
- Browser builds for minimal core are now hosted on CDN ([#724](.)). | ||
Bugfixes: | ||
- Disabling debug mode with `BLUEBIRD_DEBUG=0` environment variable now works ([#719](.)). | ||
- Fix unhandled rejection reporting when passing rejected promise to `.return()` ([#721](.)). | ||
- Fix unbound promise's then handlers being called with wrong `this` value ([#738](.)). | ||
## 2.9.34 (2015-07-15) | ||
@@ -2,0 +15,0 @@ |
@@ -14,2 +14,4 @@ "use strict"; | ||
if (util.isNode && process.env["BLUEBIRD_DEBUG"] == 0) debugging = false; | ||
if (debugging) { | ||
@@ -16,0 +18,0 @@ async.disableTrampolineIfNecessary(); |
@@ -42,2 +42,4 @@ "use strict"; | ||
); | ||
} else if (value instanceof Promise) { | ||
value._ignoreRejections(); | ||
} | ||
@@ -44,0 +46,0 @@ return this._then(returner, undefined, undefined, value, undefined); |
@@ -29,2 +29,3 @@ "use strict"; | ||
var UNDEFINED_BINDING = {}; | ||
var async = require("./async.js"); | ||
@@ -314,3 +315,5 @@ var errors = require("./errors.js"); | ||
index * 5 - 5 + 4]; | ||
if (ret === undefined && this._isBound()) { | ||
if (ret === UNDEFINED_BINDING) { | ||
return undefined; | ||
} else if (ret === undefined && this._isBound()) { | ||
return this._boundValue(); | ||
@@ -360,2 +363,3 @@ } | ||
if (promise instanceof Promise) promise._setIsMigrated(); | ||
if (receiver === undefined) receiver = UNDEFINED_BINDING; | ||
this._addCallbacks(fulfill, reject, progress, promise, receiver, null); | ||
@@ -362,0 +366,0 @@ }; |
@@ -138,6 +138,16 @@ "use strict"; | ||
if (typeof fn !== "function") return apiRejection("fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a"); | ||
len--; | ||
var input; | ||
var spreadArgs = true; | ||
if (len === 2 && Array.isArray(arguments[0])) { | ||
input = arguments[0]; | ||
len = input.length; | ||
spreadArgs = false; | ||
} else { | ||
input = arguments; | ||
len--; | ||
} | ||
var resources = new Array(len); | ||
for (var i = 0; i < len; ++i) { | ||
var resource = arguments[i]; | ||
var resource = input[i]; | ||
if (Disposer.isDisposer(resource)) { | ||
@@ -166,3 +176,4 @@ var disposer = resource; | ||
try { | ||
ret = fn.apply(undefined, vals); | ||
ret = spreadArgs | ||
? fn.apply(undefined, vals) : fn.call(undefined, vals); | ||
} finally { | ||
@@ -169,0 +180,0 @@ promise._popContext(); |
{ | ||
"name": "bluebird", | ||
"description": "Full featured Promises/A+ implementation with exceptionally good performance", | ||
"version": "2.9.34", | ||
"version": "2.10.0", | ||
"keywords": [ | ||
@@ -27,3 +27,4 @@ "promise", | ||
"istanbul": "istanbul", | ||
"prepublish": "node tools/build.js --no-debug --main --zalgo --browser --minify" | ||
"prepublish": "node tools/build.js --no-debug --main --zalgo --browser --minify", | ||
"generate-browser-core": "node tools/build.js --features=core --no-debug --main --zalgo --browser --minify && mv js/browser/bluebird.js js/browser/bluebird.core.js && mv js/browser/bluebird.min.js js/browser/bluebird.core.min.js" | ||
}, | ||
@@ -30,0 +31,0 @@ "homepage": "https://github.com/petkaantonov/bluebird", |
@@ -8,2 +8,3 @@ <a href="http://promisesaplus.com/"> | ||
**Got a question?** Join us on [stackoverflow](http://stackoverflow.com/questions/tagged/bluebird), the [mailing list](https://groups.google.com/forum/#!forum/bluebird-js) or chat on [IRC](https://webchat.freenode.net/?channels=#promises) | ||
@@ -76,2 +77,4 @@ # Introduction | ||
- Full build minified [bluebird.min.js](https://cdn.jsdelivr.net/bluebird/latest/bluebird.min.js) | ||
- Core build [bluebird.core.js](https://cdn.jsdelivr.net/bluebird/latest/bluebird.core.js) | ||
- Core build minified [bluebird.core.min.js](https://cdn.jsdelivr.net/bluebird/latest/bluebird.core.min.js) | ||
- You may use browserify on the main export | ||
@@ -236,3 +239,3 @@ - You may use the [bower](http://bower.io) package. | ||
If you find a bug in bluebird or have a feature request, file an issue in the [github issue tracker](https://github.com/petkaantonov/bluebird/issues). Anything else, such as questions for help in using the library, should be posted in [StackOverflow](http://stackoverflow.com/questions/tagged/bluebird) under tags `promise` and `bluebird`. | ||
The [github issue tracker](https://github.com/petkaantonov/bluebird/issues) is **_only_** for bug reports and feature requests. Anything else, such as questions for help in using the library, should be posted in [StackOverflow](http://stackoverflow.com/questions/tagged/bluebird) under tags `promise` and `bluebird`. | ||
@@ -239,0 +242,0 @@ # Error handling |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
440539
8886
680
5