Bugfixes:
- Fix
.return(primitiveValue)
returning a wrapped version of the primitive value when a Node.js domain is active (#689).
Bugfixes:
- Fix Promises/A+ compliance issue regarding circular thenables: the correct behavior is to go into an infinite loop instead of warning with an error (Fixes #682).
- Fix "(node) warning: possible EventEmitter memory leak detected" (#661).
- Fix callbacks sometimes being called with a wrong node.js domain (#664).
- Fix callbacks sometimes not being called at all in iOS 8.1 WebApp mode (#666, #687).
Bugfixes:
- Fix regression with
promisifyAll
not promisifying certain methods
Bugfixes:
- Improve
promisifyAll
detection of functions that are class constructors. Fixes mongodb 2.x promisification.
Bugfixes:
- Fix handled rejection being reported as unhandled in certain scenarios when using .all or Promise.join (#645)
- Fix custom scheduler not being called in Google Chrome when long stack traces are enabled (#650)
Bugfixes:
- Fix
sinon.useFakeTimers()
breaking scheduler (#631)
Misc:
- Add nw testing facilities (
node tools/test --nw
)
Bugfixes:
Bugfixes:
- Fix crash in node 0.8
Bugfixes:
Bugfixes:
- Fix node.js domain propagation (#521).
- Fix
.promisify
crashing in phantom JS (#556)
- Fix error object's
'stack'
' overwriting causing an error when its defined to be a setter that throws an error (#552).
Bugfixes:
- Fix regression where there is a long delay between calling
.cancel()
and promise actually getting cancelled in Chrome when long stack traces are enabled
Bugfixes:
- Fix crashing in Chrome when long stack traces are disabled
Bugfixes:
- Fix settlePromises using trampoline
Bugfixes:
- Fix Chrome DevTools async stack traceability (#542).
Features:
- Use setImmediate if available
Features:
- Added
.asCallback
alias for.nodeify
.
Bugfixes:
- Don't always use nextTick, but try to pick up setImmediate or setTimeout in NW. Fixes #534, #525
- Make progress a core feature. Fixes #535 Note that progress has been removed in 3.x - this is only a fix necessary for 2.x custom builds.
Bugfixes:
- Always use process.nextTick. Fixes #525
Bugfixes:
- Fix .each, .filter, .reduce and .map callbacks being called synchornously if the input is immediate. (#513)
Bugfixes:
- Fix memory leak introduced in 2.9.0 (#502)
Bugfixes:
- Fix #503
Bugfixes:
- Fix #501
Bugfixes:
- Fix
TypeError: Cannot assign to read only property 'length'
when jsdom has declared a read-only length for all objects to inherit.
Bugfixes:
- Fix regression introduced in 2.9.7 where promisify didn't properly dynamically look up methods on
this
Bugfixes:
- Fix
promisify
not retaining custom properties of the function. This enables promisifying the"request"
module's export function and its methods at the same time. - Fix
promisifyAll
methods being dependent onthis
when they are not originally dependent onthis
. This enables e.g. passing promisifiedfs
functions directly as callbacks without having to bind them tofs
. - Fix
process.nextTick
being used oversetImmediate
in node.
Bugfixes:
- Node environment detection can no longer be fooled
Misc:
- Warn when
.then()
is passed non-functions
Bugfixes:
- Fix .timeout() not calling
clearTimeout
with the proper handle in node causing the process to wait for unneeded timeout. This was a regression introduced in 2.9.1.
Bugfixes:
- Fix node-webkit compatibility issue (#467)
- Fix long stack trace support in recent firefox versions
Bugfixes:
- Fix critical bug regarding to using promisifyAll in browser that was introduced in 2.9.0 (#466).
Misc:
- Add
"browser"
entry point to package.json
Features:
- If a bound promise is returned by the callback to
Promise.method
andPromise.try
, the returned promise will be bound to the same value
Features:
- Add
Promise.fromNode
- Add new paramter
value
forPromise.bind
Bugfixes:
- Fix several issues with
cancellation
and.bind()
interoperation whenthisArg
is a promise or thenable - Fix promises created in
disposers
not having proper long stack trace context - Fix
Promise.join
sometimes passing the passed in callback function as the last argument to itself.
Misc:
- Reduce minified full browser build file size by not including unused code generation functionality.
- Major internal refactoring related to testing code and source code file layout
Features:
- Global rejection events are now fired both as DOM3 events and as legacy events in browsers
Bugfixes:
- Fix long stack trace stiching consistency when rejected from thenables
Features:
- Major debuggability improvements:
- Long stack traces have been re-designed. They are now much more readable, succint, relevant and consistent across bluebird features.
- Long stack traces are supported now in IE10+
Bugfixes:
- Fix #447
Features:
- Added more context to stack traces originating from coroutines (#421)
- Implemented global rejection events (#428, #357)
- Custom promisifiers are now passed the default promisifier which can be used to add enhancements on top of normal node promisification
- Promisification filters are now passed
passesDefaultFilter
boolean
Bugfixes:
- Fix
.noConflict()
call signature (#446) - Fix
Promise.method
ified functions being called withundefined
when they were called with no arguments
Bugfixes:
OperationalErrors
thrown by promisified functions retain custom properties, such as.code
and.path
.
Bugfixes:
Bugfixes:
- Fix #426
Bugfixes:
- Fixed built browser files not being included in the git tag release for bower
Features:
- Significantly improve parallel promise performance and memory usage (+50% faster, -50% less memory)
Bugfixes:
- Fix bug where already resolved promise gets attached more handlers while calling its handlers resulting in some handlers not being called
- Fix bug where then handlers are not called in the same order as they would run if Promises/A+ 2.3.2 was implemented as adoption
- Fix bug where using
Object.create(null)
as a rejection reason would crash bluebird
Bugfixes:
- Fix
.finally
throwing null error when it is derived from a promise that is resolved with a promise that is resolved with a promise
Features:
.get
now supports negative indexing.
Bugfixes:
- Fix bug with
Promise.method
wrapped function returning a promise that never resolves if the function returns a promise that is resolved with another promise - Fix bug with
Promise.delay
never resolving if the value is a promise that is resolved with another promise
Bugfixes:
- Fix memory leak as described in this Promises/A+ spec issue.
Bugfixes:
- Fix bug where spread rejected handler is ignored in case of rejection
- Fix synchronous scheduler passed to
setScheduler
causing infinite loop
Features:
- Error messages now have links to wiki pages for additional information
- Promises now clean up all references (to handlers, child promises etc) as soon as possible.
Features:
- Better filtering of bluebird internal calls in long stack traces, especially when using minified file in browsers
- Small performance improvements for all collection methods
- Promises now delete references to handlers attached to them as soon as possible
- Additional stack traces are now output on stderr/
console.warn
for errors that are thrown in the process/window from rejected.done()
promises. See #411
Bugfixes:
Features:
Promise.method
no longer wraps primitive errorsPromise.try
no longer wraps primitive errors
Bugfixes:
Features:
- Implement
.reflect()
Bugfixes:
- Fix issue when promisifying methods whose names contain the string 'args'
P
alias was not declared inside WebWorkers
Bugfixes:
Bugfixes:
P
alias forPromise
now exists in global scope when using browser builds without a module loader, fixing an issue with firefox extensions
Features:
.using
can now be used with disposers created from different bluebird copy
Features:
.bind()
andPromise.bind()
now await for the resolution of thethisArg
if it's a promise or a thenable
Bugfixes:
- Fix #276
- Fix #259
- Fix multiline error messages only showing the first line
Bugfixes:
.any
and.some
now consistently reject with RangeError when input array contains too few promises- Fix iteration bug with
.reduce
when input array contains already fulfilled promises
Bugfixes:
- Fix #235
Bugfixes:
- Fix #232
Features:
- Add
promisifier
option toPromise.promisifyAll()
- Improve performance of
.props()
and collection methods when used with immediate values
Bugfixes:
- Fix a bug where .reduce calls the callback for an already visited item
- Fix a bug where stack trace limit is calculated to be too small, which resulted in too short stack traces
Add undocumented experimental yieldHandler
option to Promise.coroutine
#What's new in 2.0
- Resource management - never leak resources again
- Promisification on steroids - entire modules can now be promisified with one line of code
.map()
,.each()
,.filter()
,.reduce()
reimagined from simple sugar to powerful concurrency coordination tools- API Documentation has been reorganized and more elaborate examples added
- Deprecated progression and deferreds
- Improved performance and readability
Features:
- Added
using()
anddisposer()
.map()
now calls the handler as soon as items in the input array become fulfilled- Added a concurrency option to
.map()
.filter()
now calls the handler as soon as items in the input array become fulfilled- Added a concurrency option to
.filter()
.reduce()
now calls the handler as soon as items in the input array become fulfilled, but in-order- Added
.each()
Promise.resolve()
behaves likePromise.cast
.Promise.cast
deprecated.- Synchronous inspection: Removed
.inspect()
, added.value()
and.reason()
Promise.join()
now takes a function as the last argument- Added
Promise.setScheduler()
.cancel()
supports a custom cancellation reason.timeout()
now cancels the promise instead of rejecting it.nodeify()
now supports passing multiple success results when mapping promises to nodebacks- Added
suffix
andfilter
options toPromise.promisifyAll()
Breaking changes:
- Sparse array holes are not skipped by collection methods but treated as existing elements with
undefined
value .map()
and.filter()
do not call the given mapper or filterer function in any specific order- Removed the
.inspect()
method - Yielding an array from a coroutine is not supported by default. You can use
coroutine.addYieldHandler()
to configure the old behavior (or any behavior you want). .any()
and.some()
no longer use an array as the rejection reason.AggregateError
is used instead.
Bugfixes:
- Fix promisifyAll causing a syntax error when a method name is not a valid identifier
- Fix syntax error when es5.js is used in strict mode
Bugfixes:
- Fix #179
Bugfixes:
- Promisified methods from promisifyAll no longer call the original method when it is overriden
- Nodeify doesn't pass second argument to the callback if the promise is fulfilled with
undefined
Bugfixes:
- Fix #168
Features:
- New method:
.value()
- New method:
.reason()
- New method:
Promise.onUnhandledRejectionHandled()
Promise.map()
,.map()
,Promise.filter()
and.filter()
start calling their callbacks as soon as possible while retaining a correct order. See8085922f
.
Bugfixes:
Bugfixes:
Features:
- Implement
Promise.prototype.tap()
- Implement
Promise.coroutine.addYieldHandler()
- Deprecate
Promise.prototype.spawn
Bugfixes:
- Fix already rejected promises being reported as unhandled when handled through collection methods
- Fix browserisfy crashing from checking
process.version.indexOf
Bugfixes:
- Fix active domain being lost across asynchronous boundaries in Node.JS 10.xx
Bugfixes:
- Fix handled errors being reported
Bugfixes:
- Fix bug with unhandled rejections not being reported
when using
Promise.try
orPromise.method
without attaching further handlers
Features:
- Node.js performance: promisified functions try to check amount of passed arguments in most optimal order
- Node.js promisified functions will have same
.length
as the original function minus one (for the callback parameter)
Features:
- Possibly unhandled rejection handler will always get a stack trace, even if the rejection or thrown error was not an error
- Unhandled rejections are tracked per promise, not per error. So if you create multiple branches from a single ancestor and that ancestor gets rejected, each branch with no error handler with the end will cause a possibly unhandled rejection handler invocation
Bugfixes:
- Fix unhandled non-writable objects or primitives not reported by possibly unhandled rejection handler
Bugfixes:
Features:
- Significantly improve performance of foreign bluebird thenables
Bugfixes:
Features:
- Error objects that have property
.isAsync = true
will now be caught by.error()
Bugfixes:
- Fix TypeError and RangeError shims not working without
new
operator
Features:
.filter
,.map
, and.reduce
no longer skip sparse array holes. This is a backwards incompatible change.- Like
.map
and.filter
,.reduce
now allows returning promises and thenables from the iteration function.
Bugfixes:
Features:
-
You may now return promises and thenables from the filterer function used in
Promise.filter
andPromise.prototype.filter
. -
.error()
now catches additional sources of rejections:-
Rejections originating from
Promise.reject
-
Rejections originating from thenables using the
reject
callback -
Rejections originating from promisified callbacks which use the
errback
argument -
Rejections originating from
new Promise
constructor where thereject
callback is called explicitly -
Rejections originating from
PromiseResolver
where.reject()
method is called explicitly
-
Bugfixes:
- Fix
captureStackTrace
being called when it wasnull
- Fix
Promise.map
not unwrapping thenables
Features:
- Improve performance of collection methods
- Improve performance of promise chains
Bugfixes:
- Fix
Promise.some
behavior with arguments like negative integers, 0... - Fix stack traces of synchronously throwing promisified functions'
Features:
- Improve performance of generators
Bugfixes:
- Fix critical bug with collection methods.
Features:
- Improve performance of all collection methods
Features:
- Improve overall performance.
- Improve performance of promisified functions.
- Improve performance of catch filters.
- Improve performance of .finally.
Bugfixes:
- Fix
.finally()
rejecting if passed non-function. It will now ignore non-functions like.then
. - Fix
.finally()
not converting thenables returned from the handler to promises. .spread()
now rejects if the ultimate value given to it is not spreadable.
Features:
- Improve overall performance when not using
.bind()
or cancellation. - Promises are now not cancellable by default. This is backwards incompatible change - see
.cancellable()
Promise.delay
.delay()
.timeout()
Bugfixes:
- Fix race condition when mixing 3rd party asynchrony.
Bugfixes:
- Fix another bug with progression.
Bugfixes:
- Fix bug with progression.
Bugfixes:
- Fix
.race()
not propagating bound values.
Features:
- Improve performance of
Promise.race
Bugfixes:
- Fixed
Promise.promisifyAll
invoking property accessors. Only data properties with function values are considered.
Features:
- Disable long stack traces in browsers by default. Call
Promise.longStackTraces()
to enable them.
Bugfixes:
- Fail early when
new Promise
is constructed incorrectly
Bugfixes:
- Promise.props now takes a thenable-for-collection
- All promise collection methods now reject when a promise-or-thenable-for-collection turns out not to give a collection
Features:
- All static collection methods take thenable-for-collection
Features:
- throw TypeError when thenable resolves with itself
- Make .race() and Promise.race() forever pending on empty collections
Bugfixes:
- Promise.resolve and PromiseResolver.resolve follow thenables too.
Bugfixes:
- Fix infinite loop when thenable resolves with itself
Bugfixes:
- Fix a file missing from build. (Critical fix)
Features:
- Remove dependency of es5-shim and es5-sham when using ES3.
Features:
- Improve performance of
Promise.method
Features:
- Rename PromiseResolver#asCallback to PromiseResolver#callback
Features:
- Remove memoization of thenables
Features:
- Add methods
Promise.resolve()
,Promise.reject()
,Promise.defer()
and.resolve()
.
Features:
- Implement
Promise.method()
- Implement
.return()
- Implement
.throw()
Bugfixes:
- Fix promises being able to use themselves as resolution or follower value
Features:
- Implicit
Promise.all()
when yielding an array from generators
Bugfixes:
- Fix
.spread
not unwrapping thenables
Features:
- Improve performance of promisified functions on V8
Bugfixes:
- Report unhandled rejections even when long stack traces are disabled
- Fix
.error()
showing up in stack traces
Bugfixes:
- Catch filter method calls showing in stack traces
Bugfixes:
- Support primitives in catch filters
Features:
- Add
Promise.race()
and.race()
Bugfixes:
- Fix bug with
Promise.try
not unwrapping returned promises and thenables
Bugfixes:
- Fix bug with build files containing duplicated code for promise.js
Features:
- Improve output of reporting unhandled non-errors
- Implement RejectionError wrapping and
.error()
method
Features:
- Allow fresh copies of the library to be made
Bugfixes:
- Rollback non-working multiple fresh copies feature
Features:
- Allow fresh copies of the library to be made
- Add more components to customized builds
Features:
- Allow custom builds
Bugfixes:
- Fix unhandled rethrown exceptions not reported
Features:
- Improve performance of
Promise.try
- Extend
Promise.try
to accept arguments and ctx to make it more usable in promisification of synchronous functions.
Features:
- Implement
.bind
andPromise.bind
Bugfixes:
- Fix
.some()
when argument is a pending promise that later resolves to an array
Features:
- Enable process wide long stack traces through BLUEBIRD_DEBUG environment variable
Features:
- Improve performance of all collection methods
Bugfixes:
- Fix .finally passing the value to handlers
- Remove kew from benchmarks due to bugs in the library breaking the benchmark
- Fix some bluebird library calls potentially appearing in stack traces
Bugfixes:
- Fix .pending() call showing in long stack traces
Bugfixes:
- Fix PromiseArray and its sub-classes swallowing possibly unhandled rejections
Bugfixes:
- Fix AMD-declaration using named module.
Features:
- The mortals that can handle it may now release Zalgo by
require("bluebird/zalgo");
Bugfixes:
- Fix memory leak when using the same promise to attach handlers over and over again
Features:
- Add
Promise.props()
andPromise.prototype.props()
. They work like.all()
for object properties.
Bugfixes:
- Fix bug with .some returning garbage when sparse arrays have rejections
Features:
- Improve performance of
.reduce()
wheninitialValue
can be synchronously cast to a value
Bugfixes:
- Fix .npmignore having irrelevant files
Features:
- Improve performance of
.some()
Bugfixes:
- Remove uses of dynamic evaluation (
new Function
,eval
etc) when strictly not necessary. Use feature detection to use static evaluation to avoid errors when dynamic evaluation is prohibited.
Features:
- Add
.asCallback
property toPromiseResolver
s
Features:
- Improve overall performance. Be able to sustain infinite recursion when using promises.
Bugfixes:
- Fix stackoverflow error when function calls itself "synchronously" from a promise handler
Bugfixes:
- Fix safari 6 not using
MutationObserver
as a scheduler - Fix process exceptions interfering with internal queue flushing
Bugfixes:
- Don't try to detect if generators are available to allow shims to be used
Features:
- Promisification now consider all functions on the object and its prototype chain
- Individual promisifcation uses current
this
if no explicit receiver is given - Give better stack traces when promisified callbacks throw or errback primitives such as strings by wrapping them in an
Error
object.
Bugfixes:
- Fix runtime APIs throwing synchronous errors
Features:
- Deprecate
Promise.promisify(Object target)
in favor ofPromise.promisifyAll(Object target)
to avoid confusion with function objects - Coroutines now throw error when a non-promise is
yielded
Features:
- Make tests pass Internet Explorer 8
Features:
- Create browser tests
Bugfixes:
- Fix promise cast bug when thenable fulfills using itself as the fulfillment value
Features:
- More performance improvements when long stack traces are enabled
Features:
- Performance improvements when long stack traces are enabled
Bugfixes:
- Fix promisified methods not turning synchronous exceptions into rejections
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix
Features:
- feature
Bugfixes:
- bugfix