- 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 taylorhakes#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;