- Add Promise.any
- Added Promise.allSettled
- Added Closure compiler type definitions
- Polyfill default promise with
finally
if it doesn't exist if you use polyfill.js - If using
require
with webpack 2+, you now need to do
var Promise = require('promise-polyfill').default;
instead of
var Promise = require('promise-polyfill');
- Removed files /dist/promise.js and /dist/promise.min.js. These files were not used unless you downloaded them directly from the repo. They were not used by ES6 modules, CommonJS or polyfill.js The file lead to issues because they overrode the global Promise by default.
- Fixed bug in Node JS Promise polyfill
- Added Promise.prototype.finally
- Added IE8 compatability back to minify
- Fixed a bug in 'catch' keyword in IE8
- Fixed import error when using
require
- Updated code to ES6 module definitions (thanks Andarist)
- Added polyfill.js file
- move compiled files to dist folder
- Bug fix for non-array values in
Promise.all()
- Small optimization checking for making sure
Promise
is called withnew
This allows subclassing Promise without rewriting functions
Promise._setImmediateFn(<immediateFn>)
has been deprecated. UsePromise._immediateFn = <immediateFn>
instead.Promise._setUnhandledRejectionFn(<rejectionFn>)
has been deprecated. UsePromise._unhandledRejectionFn = <rejectionFn>
instead. These functions will be removed in the next major version.
Fixed bug where setTimeout was set to 1 instead of 0 for async execution
Allowed Subclassing. #27
Changed possibly unhanded warnings to use asap function instead of setTimeout
Removed non standard functionality of passing multiple params to Promise.all. You must pass an array now. You must change this code
Promise.all(prom1, prom2, prom3);
to this
Promise.all([prom1, prom2, prom3]);
IE8 does not have console, unless you open the developer tools. This fix checks to makes sure console.warn is defined before calling it.
bower.json had Promise.js instead of promise.js
Fixed promise.js in package.json. It was accidently published as Promise.js
- Added unhandled rejection warnings to the console
- Removed Grunt, jasmine and other unused code
- Renamed Promise.js to lowercase promise.js in multiple places
New version fixing this major bug #17
This is considered a breaking change because people may have been using this functionality. If you would like to keep version 2 functionality, set Promise._setImmediateFn on promise-polyfill
like the code below.
var Promise = require('promise-polyfill');
Promise._setImmedateFn(function(fn) {
setTimeout(fn, 1);
});
Removed dead code Promise.immedateFn and added Promise._setImmediateFn(fn);
Simplified attaching to global object
Fixed Webworkers missing window object
Changed the following line
module.exports = root.Promise ? root.Promise : Promise;
to
module.exports = Promise;
This means the library will not use built-in Promise by default. This allows for more consistency.
You can easily add the functionality back.
var Promise = window.Promise || require('promise-polyfill');
Added Promise.immediateFn to allow changing the setImmedate function
Promise.immediateFn = window.setAsap;