UNPKG

3.19 kBMarkdownView Raw
1# Changelog
2
3## 6.0.0 Deprecated `Promise._setImmediateFn` and `Promise._setUnhandledRejectionFn`
4This allows subclassing Promise without rewriting functions
5- `Promise._setImmediateFn(<immediateFn>)` has been deprecated. Use `Promise._immediateFn = <immediateFn>` instead.
6- `Promise._setUnhandledRejectionFn(<rejectionFn>)` has been deprecated. Use `Promise._unhandledRejectionFn = <rejectionFn>` instead.
7These functions will be removed in the next major version.
8
9### 5.2.1 setTimeout to 0
10Fixed bug where setTimeout was set to 1 instead of 0 for async execution
11
12### 5.2.0 Subclassing
13Allowed Subclassing. [#27](https://github.com/taylorhakes/promise-polyfill/pull/27)
14
15### 5.1.0 Fixed reliance on setTimeout
16Changed possibly unhanded warnings to use asap function instead of setTimeout
17
18## 5.0.0 Removed multiple params from Promise.all
19Removed non standard functionality of passing multiple params to Promise.all. You must pass an array now. You must change this code
20```js
21Promise.all(prom1, prom2, prom3);
22```
23to this
24```js
25Promise.all([prom1, prom2, prom3]);
26```
27
28### 4.0.4 IE8 console.warn fix
29IE8 does not have console, unless you open the developer tools. This fix checks to makes sure console.warn is defined before calling it.
30
31### 4.0.3 Fix case in bower.json
32bower.json had Promise.js instead of promise.js
33
34### 4.0.2 promise.js case fix in package.json
35Fixed promise.js in package.json. It was accidently published as Promise.js
36
37## 4.0.1 Unhandled Rejections and Other Fixes
38- Added unhandled rejection warnings to the console
39- Removed Grunt, jasmine and other unused code
40- Renamed Promise.js to lowercase promise.js in multiple places
41
42### 3.0.1 Fixed shadowing issue on setTimeout
43New version fixing this major bug https://github.com/taylorhakes/promise-polyfill/pull/17
44
45## 3.0.0 Updated setTimeout to not be affected by test mocks
46This 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.
47
48```js
49var Promise = require('promise-polyfill');
50Promise._setImmedateFn(function(fn) {
51 setTimeout(fn, 1);
52});
53```
54
55### 2.1.0 Promise._setImmedateFn
56Removed dead code Promise.immedateFn and added Promise._setImmediateFn(fn);
57
58### 2.0.2 Simplified Global detection
59Simplified attaching to global object
60
61### 2.0.1 Webworker bugfixes
62Fixed Webworkers missing window object
63
64## 2.0.0
65**Changed the following line**
66```
67module.exports = root.Promise ? root.Promise : Promise;
68```
69to
70```
71module.exports = Promise;
72```
73
74This means the library will not use built-in Promise by default. This allows for more consistency.
75
76You can easily add the functionality back.
77```
78var Promise = window.Promise || require('promise-polyfill');
79```
80
81**Added Promise.immediateFn to allow changing the setImmedate function**
82```
83Promise.immediateFn = window.setAsap;
84```
85
86### 1.1.4 Updated Promise to use correct global object in Browser and Node
87
88### 1.1.3 Fixed browserify issue with `this`
89
90### 1.1.2 Updated Promise.resolve to resolve with original Promise
91
92### 1.1.0 Performance Improvements for Modern Browsers
93
94## 1.0.1 Update README.md