UNPKG

4.38 kBMarkdownView Raw
1# Changelog
2### 8.2.0
3* Added Promise.allSettled
4
5### 8.1.0
6
7* Added Closure compiler type definitions
8
9### 8.0.0
10
11* Polyfill default promise with `finally` if it doesn't exist if you use polyfill.js
12* If using `require` with webpack 2+, you now need to do
13
14```js
15var Promise = require('promise-polyfill').default;
16```
17
18instead of
19
20```js
21var Promise = require('promise-polyfill');
22```
23
24* 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
25 The file lead to issues because they overrode the global Promise by default.
26
27### 7.1.2
28
29* Fixed bug in Node JS Promise polyfill
30
31### 7.1.0
32
33* Added Promise.prototype.finally
34
35### 7.0.2
36
37* Added IE8 compatability back to minify
38
39### 7.0.1
40
41* Fixed a bug in 'catch' keyword in IE8
42* Fixed import error when using `require`
43
44## 7.0.0
45
46* Updated code to ES6 module definitions (thanks Andarist)
47* Added polyfill.js file
48* move compiled files to dist folder
49
50## 6.1.0
51
52* Bug fix for non-array values in `Promise.all()`
53* Small optimization checking for making sure `Promise` is called with `new`
54
55## 6.0.0 Deprecated `Promise._setImmediateFn` and `Promise._setUnhandledRejectionFn`
56
57This allows subclassing Promise without rewriting functions
58
59* `Promise._setImmediateFn(<immediateFn>)` has been deprecated. Use `Promise._immediateFn = <immediateFn>` instead.
60* `Promise._setUnhandledRejectionFn(<rejectionFn>)` has been deprecated. Use `Promise._unhandledRejectionFn = <rejectionFn>` instead.
61 These functions will be removed in the next major version.
62
63### 5.2.1 setTimeout to 0
64
65Fixed bug where setTimeout was set to 1 instead of 0 for async execution
66
67### 5.2.0 Subclassing
68
69Allowed Subclassing. [#27](https://github.com/taylorhakes/promise-polyfill/pull/27)
70
71### 5.1.0 Fixed reliance on setTimeout
72
73Changed possibly unhanded warnings to use asap function instead of setTimeout
74
75## 5.0.0 Removed multiple params from Promise.all
76
77Removed non standard functionality of passing multiple params to Promise.all. You must pass an array now. You must change this code
78
79```js
80Promise.all(prom1, prom2, prom3);
81```
82
83to this
84
85```js
86Promise.all([prom1, prom2, prom3]);
87```
88
89### 4.0.4 IE8 console.warn fix
90
91IE8 does not have console, unless you open the developer tools. This fix checks to makes sure console.warn is defined before calling it.
92
93### 4.0.3 Fix case in bower.json
94
95bower.json had Promise.js instead of promise.js
96
97### 4.0.2 promise.js case fix in package.json
98
99Fixed promise.js in package.json. It was accidently published as Promise.js
100
101## 4.0.1 Unhandled Rejections and Other Fixes
102
103* Added unhandled rejection warnings to the console
104* Removed Grunt, jasmine and other unused code
105* Renamed Promise.js to lowercase promise.js in multiple places
106
107### 3.0.1 Fixed shadowing issue on setTimeout
108
109New version fixing this major bug https://github.com/taylorhakes/promise-polyfill/pull/17
110
111## 3.0.0 Updated setTimeout to not be affected by test mocks
112
113This 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.
114
115```js
116var Promise = require('promise-polyfill');
117Promise._setImmedateFn(function(fn) {
118 setTimeout(fn, 1);
119});
120```
121
122### 2.1.0 Promise.\_setImmedateFn
123
124Removed dead code Promise.immedateFn and added Promise.\_setImmediateFn(fn);
125
126### 2.0.2 Simplified Global detection
127
128Simplified attaching to global object
129
130### 2.0.1 Webworker bugfixes
131
132Fixed Webworkers missing window object
133
134## 2.0.0
135
136**Changed the following line**
137
138```
139module.exports = root.Promise ? root.Promise : Promise;
140```
141
142to
143
144```
145module.exports = Promise;
146```
147
148This means the library will not use built-in Promise by default. This allows for more consistency.
149
150You can easily add the functionality back.
151
152```
153var Promise = window.Promise || require('promise-polyfill');
154```
155
156**Added Promise.immediateFn to allow changing the setImmedate function**
157
158```
159Promise.immediateFn = window.setAsap;
160```
161
162### 1.1.4 Updated Promise to use correct global object in Browser and Node
163
164### 1.1.3 Fixed browserify issue with `this`
165
166### 1.1.2 Updated Promise.resolve to resolve with original Promise
167
168### 1.1.0 Performance Improvements for Modern Browsers
169
170## 1.0.1 Update README.md