Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

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