You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

800 lines
29 KiB

4 years ago
  1. ## 1.5.1
  2. - Q.any now annotates its error message to clarify that Q.any was involved and
  3. includes only the last error emitted. (Ivan Etchart)
  4. - Avoid domain.dispose during tests in preparation for Node.js 9. (Anna
  5. Henningsen)
  6. ## 1.5.0
  7. - Q.any gives an error message from the last rejected promise
  8. - Throw if callback supplied to "finally" is invalid (@grahamrhay)
  9. - Long stack trace improvements, can now construct long stack traces
  10. across rethrows.
  11. ## 1.4.1
  12. - Address an issue that prevented Q from being used as a `<script>` for
  13. Firefox add-ons. Q can now be used in any environment that provides `window`
  14. or `self` globals, favoring `window` since add-ons have an an immutable
  15. `self` that is distinct from `window`.
  16. ## 1.4.0
  17. - Add `noConflict` support for use in `<script>` (@jahnjw).
  18. ## 1.3.0
  19. - Add tracking for unhandled and handled rejections in Node.js (@benjamingr).
  20. ## 1.2.1
  21. - Fix Node.js environment detection for modern Browserify (@kahnjw).
  22. ## 1.2.0
  23. - Added Q.any(promisesArray) method (@vergara).
  24. Returns a promise fulfilled with the value of the first resolved promise in
  25. promisesArray. If all promises in promisesArray are rejected, it returns
  26. a rejected promise.
  27. ## 1.1.2
  28. - Removed extraneous files from the npm package by using the "files"
  29. whitelist in package.json instead of the .npmignore blacklist.
  30. (@anton-rudeshko)
  31. ## 1.1.1
  32. - Fix a pair of regressions in bootstrapping, one which precluded
  33. WebWorker support, and another that precluded support in
  34. ``<script>`` usage outright. #607
  35. ## 1.1.0
  36. - Adds support for enabling long stack traces in node.js by setting
  37. environment variable `Q_DEBUG=1`.
  38. - Introduces the `tap` method to promises, which will see a value
  39. pass through without alteration.
  40. - Use instanceof to recognize own promise instances as opposed to
  41. thenables.
  42. - Construct timeout errors with `code === ETIMEDOUT` (Kornel Lesiński)
  43. - More descriminant CommonJS module environment detection.
  44. - Dropped continuous integration for Node.js 0.6 and 0.8 because of
  45. changes to npm that preclude the use of new `^` version predicate
  46. operator in any transitive dependency.
  47. - Users can now override `Q.nextTick`.
  48. ## 1.0.1
  49. - Adds support for `Q.Promise`, which implements common usage of the
  50. ES6 `Promise` constructor and its methods. `Promise` does not have
  51. a valid promise constructor and a proper implementation awaits
  52. version 2 of Q.
  53. - Removes the console stopgap for a promise inspector. This no longer
  54. works with any degree of reliability.
  55. - Fixes support for content security policies that forbid eval. Now
  56. using the `StopIteration` global to distinguish SpiderMonkey
  57. generators from ES6 generators, assuming that they will never
  58. coexist.
  59. ## 1.0.0
  60. :cake: This is all but a re-release of version 0.9, which has settled
  61. into a gentle maintenance mode and rightly deserves an official 1.0.
  62. An ambitious 2.0 release is already around the corner, but 0.9/1.0
  63. have been distributed far and wide and demand long term support.
  64. - Q will now attempt to post a debug message in browsers regardless
  65. of whether window.Touch is defined. Chrome at least now has this
  66. property regardless of whether touch is supported by the underlying
  67. hardware.
  68. - Remove deprecation warning from `promise.valueOf`. The function is
  69. called by the browser in various ways so there is no way to
  70. distinguish usage that should be migrated from usage that cannot be
  71. altered.
  72. ## 0.9.7
  73. - :warning: `q.min.js` is no longer checked-in. It is however still
  74. created by Grunt and NPM.
  75. - Fixes a bug that inhibited `Q.async` with implementations of the new
  76. ES6 generators.
  77. - Fixes a bug with `nextTick` affecting Safari 6.0.5 the first time a
  78. page loads when an `iframe` is involved.
  79. - Introduces `passByCopy`, `join`, and `race`.
  80. - Shows stack traces or error messages on the console, instead of
  81. `Error` objects.
  82. - Elimintates wrapper methods for improved performance.
  83. - `Q.all` now propagates progress notifications of the form you might
  84. expect of ES6 iterations, `{value, index}` where the `value` is the
  85. progress notification from the promise at `index`.
  86. ## 0.9.6
  87. - Fixes a bug in recognizing the difference between compatible Q
  88. promises, and Q promises from before the implementation of "inspect".
  89. The latter are now coerced.
  90. - Fixes an infinite asynchronous coercion cycle introduced by former
  91. solution, in two independently sufficient ways. 1.) All promises
  92. returned by makePromise now implement "inspect", albeit a default
  93. that reports that the promise has an "unknown" state. 2.) The
  94. implementation of "then/when" is now in "then" instead of "when", so
  95. that the responsibility to "coerce" the given promise rests solely in
  96. the "when" method and the "then" method may assume that "this" is a
  97. promise of the right type.
  98. - Refactors `nextTick` to use an unrolled microtask within Q regardless
  99. of how new ticks a requested. #316 @rkatic
  100. ## 0.9.5
  101. - Introduces `inspect` for getting the state of a promise as
  102. `{state: "fulfilled" | "rejected" | "pending", value | reason}`.
  103. - Introduces `allSettled` which produces an array of promises states
  104. for the input promises once they have all "settled". This is in
  105. accordance with a discussion on Promises/A+ that "settled" refers to
  106. a promise that is "fulfilled" or "rejected". "resolved" refers to a
  107. deferred promise that has been "resolved" to another promise,
  108. "sealing its fate" to the fate of the successor promise.
  109. - Long stack traces are now off by default. Set `Q.longStackSupport`
  110. to true to enable long stack traces.
  111. - Long stack traces can now follow the entire asynchronous history of a
  112. promise, not just a single jump.
  113. - Introduces `spawn` for an immediately invoked asychronous generator.
  114. @jlongster
  115. - Support for *experimental* synonyms `mapply`, `mcall`, `nmapply`,
  116. `nmcall` for method invocation.
  117. ## 0.9.4
  118. - `isPromise` and `isPromiseAlike` now always returns a boolean
  119. (even for falsy values). #284 @lfac-pt
  120. - Support for ES6 Generators in `async` #288 @andywingo
  121. - Clear duplicate promise rejections from dispatch methods #238 @SLaks
  122. - Unhandled rejection API #296 @domenic
  123. `stopUnhandledRejectionTracking`, `getUnhandledReasons`,
  124. `resetUnhandledRejections`.
  125. ## 0.9.3
  126. - Add the ability to give `Q.timeout`'s errors a custom error message. #270
  127. @jgrenon
  128. - Fix Q's call-stack busting behavior in Node.js 0.10, by switching from
  129. `process.nextTick` to `setImmediate`. #254 #259
  130. - Fix Q's behavior when used with the Mocha test runner in the browser, since
  131. Mocha introduces a fake `process` global without a `nextTick` property. #267
  132. - Fix some, but not all, cases wherein Q would give false positives in its
  133. unhandled rejection detection (#252). A fix for other cases (#238) is
  134. hopefully coming soon.
  135. - Made `Q.promise` throw early if given a non-function.
  136. ## 0.9.2
  137. - Pass through progress notifications when using `timeout`. #229 @omares
  138. - Pass through progress notifications when using `delay`.
  139. - Fix `nbind` to actually bind the `thisArg`. #232 @davidpadbury
  140. ## 0.9.1
  141. - Made the AMD detection compatible with the RequireJS optimizer's `namespace`
  142. option. #225 @terinjokes
  143. - Fix side effects from `valueOf`, and thus from `isFulfilled`, `isRejected`,
  144. and `isPending`. #226 @benjamn
  145. ## 0.9.0
  146. This release removes many layers of deprecated methods and brings Q closer to
  147. alignment with Mark Miller’s TC39 [strawman][] for concurrency. At the same
  148. time, it fixes many bugs and adds a few features around error handling. Finally,
  149. it comes with an updated and comprehensive [API Reference][].
  150. [strawman]: http://wiki.ecmascript.org/doku.php?id=strawman:concurrency
  151. [API Reference]: https://github.com/kriskowal/q/wiki/API-Reference
  152. ### API Cleanup
  153. The following deprecated or undocumented methods have been removed.
  154. Their replacements are listed here:
  155. <table>
  156. <thead>
  157. <tr>
  158. <th>0.8.x method</th>
  159. <th>0.9 replacement</th>
  160. </tr>
  161. </thead>
  162. <tbody>
  163. <tr>
  164. <td><code>Q.ref</code></td>
  165. <td><code>Q</code></td>
  166. </tr>
  167. <tr>
  168. <td><code>call</code>, <code>apply</code>, <code>bind</code> (*)</td>
  169. <td><code>fcall</code>/<code>invoke</code>, <code>fapply</code>/<code>post</code>, <code>fbind</code></td>
  170. </tr>
  171. <tr>
  172. <td><code>ncall</code>, <code>napply</code> (*)</td>
  173. <td><code>nfcall</code>/<code>ninvoke</code>, <code>nfapply</code>/<code>npost</code></td>
  174. </tr>
  175. <tr>
  176. <td><code>end</code></td>
  177. <td><code>done</code></td>
  178. </tr>
  179. <tr>
  180. <td><code>put</code></td>
  181. <td><code>set</code></td>
  182. </tr>
  183. <tr>
  184. <td><code>node</code></td>
  185. <td><code>nbind</code></td>
  186. </tr>
  187. <tr>
  188. <td><code>nend</code></td>
  189. <td><code>nodeify</code></td>
  190. </tr>
  191. <tr>
  192. <td><code>isResolved</code></td>
  193. <td><code>isPending</code></td>
  194. </tr>
  195. <tr>
  196. <td><code>deferred.node</code></td>
  197. <td><code>deferred.makeNodeResolver</code></td>
  198. </tr>
  199. <tr>
  200. <td><code>Method</code>, <code>sender</code></td>
  201. <td><code>dispatcher</code></td>
  202. </tr>
  203. <tr>
  204. <td><code>send</code></td>
  205. <td><code>dispatch</code></td>
  206. </tr>
  207. <tr>
  208. <td><code>view</code>, <code>viewInfo</code></td>
  209. <td>(none)</td>
  210. </tr>
  211. </tbody>
  212. </table>
  213. (*) Use of ``thisp`` is discouraged. For calling methods, use ``post`` or
  214. ``invoke``.
  215. ### Alignment with the Concurrency Strawman
  216. - Q now exports a `Q(value)` function, an alias for `resolve`.
  217. `Q.call`, `Q.apply`, and `Q.bind` were removed to make room for the
  218. same methods on the function prototype.
  219. - `invoke` has been aliased to `send` in all its forms.
  220. - `post` with no method name acts like `fapply`.
  221. ### Error Handling
  222. - Long stack traces can be turned off by setting `Q.stackJumpLimit` to zero.
  223. In the future, this property will be used to fine tune how many stack jumps
  224. are retained in long stack traces; for now, anything nonzero is treated as
  225. one (since Q only tracks one stack jump at the moment, see #144). #168
  226. - In Node.js, if there are unhandled rejections when the process exits, they
  227. are output to the console. #115
  228. ### Other
  229. - `delete` and `set` (née `put`) no longer have a fulfillment value.
  230. - Q promises are no longer frozen, which
  231. [helps with performance](http://code.google.com/p/v8/issues/detail?id=1858).
  232. - `thenReject` is now included, as a counterpart to `thenResolve`.
  233. - The included browser `nextTick` shim is now faster. #195 @rkatic.
  234. ### Bug Fixes
  235. - Q now works in Internet Explorer 10. #186 @ForbesLindesay
  236. - `fbind` no longer hard-binds the returned function's `this` to `undefined`.
  237. #202
  238. - `Q.reject` no longer leaks memory. #148
  239. - `npost` with no arguments now works. #207
  240. - `allResolved` now works with non-Q promises ("thenables"). #179
  241. - `keys` behavior is now correct even in browsers without native
  242. `Object.keys`. #192 @rkatic
  243. - `isRejected` and the `exception` property now work correctly if the
  244. rejection reason is falsy. #198
  245. ### Internals and Advanced
  246. - The internal interface for a promise now uses
  247. `dispatchPromise(resolve, op, operands)` instead of `sendPromise(op,
  248. resolve, ...operands)`, which reduces the cases where Q needs to do
  249. argument slicing.
  250. - The internal protocol uses different operands. "put" is now "set".
  251. "del" is now "delete". "view" and "viewInfo" have been removed.
  252. - `Q.fulfill` has been added. It is distinct from `Q.resolve` in that
  253. it does not pass promises through, nor coerces promises from other
  254. systems. The promise becomes the fulfillment value. This is only
  255. recommended for use when trying to fulfill a promise with an object that has
  256. a `then` function that is at the same time not a promise.
  257. ## 0.8.12
  258. - Treat foreign promises as unresolved in `Q.isFulfilled`; this lets `Q.all`
  259. work on arrays containing foreign promises. #154
  260. - Fix minor incompliances with the [Promises/A+ spec][] and [test suite][]. #157
  261. #158
  262. [Promises/A+ spec]: http://promises-aplus.github.com/promises-spec/
  263. [test suite]: https://github.com/promises-aplus/promises-tests
  264. ## 0.8.11
  265. - Added ``nfcall``, ``nfapply``, and ``nfbind`` as ``thisp``-less versions of
  266. ``ncall``, ``napply``, and ``nbind``. The latter are now deprecated. #142
  267. - Long stack traces no longer cause linearly-growing memory usage when chaining
  268. promises together. #111
  269. - Inspecting ``error.stack`` in a rejection handler will now give a long stack
  270. trace. #103
  271. - Fixed ``Q.timeout`` to clear its timeout handle when the promise is rejected;
  272. previously, it kept the event loop alive until the timeout period expired.
  273. #145 @dfilatov
  274. - Added `q/queue` module, which exports an infinite promise queue
  275. constructor.
  276. ## 0.8.10
  277. - Added ``done`` as a replacement for ``end``, taking the usual fulfillment,
  278. rejection, and progress handlers. It's essentially equivalent to
  279. ``then(f, r, p).end()``.
  280. - Added ``Q.onerror``, a settable error trap that you can use to get full stack
  281. traces for uncaught errors. #94
  282. - Added ``thenResolve`` as a shortcut for returning a constant value once a
  283. promise is fulfilled. #108 @ForbesLindesay
  284. - Various tweaks to progress notification, including propagation and
  285. transformation of progress values and only forwarding a single progress
  286. object.
  287. - Renamed ``nend`` to ``nodeify``. It no longer returns an always-fulfilled
  288. promise when a Node callback is passed.
  289. - ``deferred.resolve`` and ``deferred.reject`` no longer (sometimes) return
  290. ``deferred.promise``.
  291. - Fixed stack traces getting mangled if they hit ``end`` twice. #116 #121 @ef4
  292. - Fixed ``ninvoke`` and ``npost`` to work on promises for objects with Node
  293. methods. #134
  294. - Fixed accidental coercion of objects with nontrivial ``valueOf`` methods,
  295. like ``Date``s, by the promise's ``valueOf`` method. #135
  296. - Fixed ``spread`` not calling the passed rejection handler if given a rejected
  297. promise.
  298. ## 0.8.9
  299. - Added ``nend``
  300. - Added preliminary progress notification support, via
  301. ``promise.then(onFulfilled, onRejected, onProgress)``,
  302. ``promise.progress(onProgress)``, and ``deferred.notify(...progressData)``.
  303. - Made ``put`` and ``del`` return the object acted upon for easier chaining.
  304. #84
  305. - Fixed coercion cycles with cooperating promises. #106
  306. ## 0.8.7
  307. - Support [Montage Require](http://github.com/kriskowal/mr)
  308. ## 0.8.6
  309. - Fixed ``npost`` and ``ninvoke`` to pass the correct ``thisp``. #74
  310. - Fixed various cases involving unorthodox rejection reasons. #73 #90
  311. @ef4
  312. - Fixed double-resolving of misbehaved custom promises. #75
  313. - Sped up ``Q.all`` for arrays contain already-resolved promises or scalar
  314. values. @ForbesLindesay
  315. - Made stack trace filtering work when concatenating assets. #93 @ef4
  316. - Added warnings for deprecated methods. @ForbesLindesay
  317. - Added ``.npmignore`` file so that dependent packages get a slimmer
  318. ``node_modules`` directory.
  319. ## 0.8.5
  320. - Added preliminary support for long traces (@domenic)
  321. - Added ``fapply``, ``fcall``, ``fbind`` for non-thisp
  322. promised function calls.
  323. - Added ``return`` for async generators, where generators
  324. are implemented.
  325. - Rejected promises now have an "exception" property. If an object
  326. isRejected(object), then object.valueOf().exception will
  327. be the wrapped error.
  328. - Added Jasmine specifications
  329. - Support Internet Explorers 7–9 (with multiple bug fixes @domenic)
  330. - Support Firefox 12
  331. - Support Safari 5.1.5
  332. - Support Chrome 18
  333. ## 0.8.4
  334. - WARNING: ``promise.timeout`` is now rejected with an ``Error`` object
  335. and the message now includes the duration of the timeout in
  336. miliseconds. This doesn't constitute (in my opinion) a
  337. backward-incompatibility since it is a change of an undocumented and
  338. unspecified public behavior, but if you happened to depend on the
  339. exception being a string, you will need to revise your code.
  340. - Added ``deferred.makeNodeResolver()`` to replace the more cryptic
  341. ``deferred.node()`` method.
  342. - Added experimental ``Q.promise(maker(resolve, reject))`` to make a
  343. promise inside a callback, such that thrown exceptions in the
  344. callback are converted and the resolver and rejecter are arguments.
  345. This is a shorthand for making a deferred directly and inspired by
  346. @gozala’s stream constructor pattern and the Microsoft Windows Metro
  347. Promise constructor interface.
  348. - Added experimental ``Q.begin()`` that is intended to kick off chains
  349. of ``.then`` so that each of these can be reordered without having to
  350. edit the new and former first step.
  351. ## 0.8.3
  352. - Added ``isFulfilled``, ``isRejected``, and ``isResolved``
  353. to the promise prototype.
  354. - Added ``allResolved`` for waiting for every promise to either be
  355. fulfilled or rejected, without propagating an error. @utvara #53
  356. - Added ``Q.bind`` as a method to transform functions that
  357. return and throw into promise-returning functions. See
  358. [an example](https://gist.github.com/1782808). @domenic
  359. - Renamed ``node`` export to ``nbind``, and added ``napply`` to
  360. complete the set. ``node`` remains as deprecated. @domenic #58
  361. - Renamed ``Method`` export to ``sender``. ``Method``
  362. remains as deprecated and will be removed in the next
  363. major version since I expect it has very little usage.
  364. - Added browser console message indicating a live list of
  365. unhandled errors.
  366. - Added support for ``msSetImmediate`` (IE10) or ``setImmediate``
  367. (available via [polyfill](https://github.com/NobleJS/setImmediate))
  368. as a browser-side ``nextTick`` implementation. #44 #50 #59
  369. - Stopped using the event-queue dependency, which was in place for
  370. Narwhal support: now directly using ``process.nextTick``.
  371. - WARNING: EXPERIMENTAL: added ``finally`` alias for ``fin``, ``catch``
  372. alias for ``fail``, ``try`` alias for ``call``, and ``delete`` alias
  373. for ``del``. These properties are enquoted in the library for
  374. cross-browser compatibility, but may be used as property names in
  375. modern engines.
  376. ## 0.8.2
  377. - Deprecated ``ref`` in favor of ``resolve`` as recommended by
  378. @domenic.
  379. - Update event-queue dependency.
  380. ## 0.8.1
  381. - Fixed Opera bug. #35 @cadorn
  382. - Fixed ``Q.all([])`` #32 @domenic
  383. ## 0.8.0
  384. - WARNING: ``enqueue`` removed. Use ``nextTick`` instead.
  385. This is more consistent with NodeJS and (subjectively)
  386. more explicit and intuitive.
  387. - WARNING: ``def`` removed. Use ``master`` instead. The
  388. term ``def`` was too confusing to new users.
  389. - WARNING: ``spy`` removed in favor of ``fin``.
  390. - WARNING: ``wait`` removed. Do ``all(args).get(0)`` instead.
  391. - WARNING: ``join`` removed. Do ``all(args).spread(callback)`` instead.
  392. - WARNING: Removed the ``Q`` function module.exports alias
  393. for ``Q.ref``. It conflicts with ``Q.apply`` in weird
  394. ways, making it uncallable.
  395. - Revised ``delay`` so that it accepts both ``(value,
  396. timeout)`` and ``(timeout)`` variations based on
  397. arguments length.
  398. - Added ``ref().spread(cb(...args))``, a variant of
  399. ``then`` that spreads an array across multiple arguments.
  400. Useful with ``all()``.
  401. - Added ``defer().node()`` Node callback generator. The
  402. callback accepts ``(error, value)`` or ``(error,
  403. ...values)``. For multiple value arguments, the
  404. fulfillment value is an array, useful in conjunction with
  405. ``spread``.
  406. - Added ``node`` and ``ncall``, both with the signature
  407. ``(fun, thisp_opt, ...args)``. The former is a decorator
  408. and the latter calls immediately. ``node`` optional
  409. binds and partially applies. ``ncall`` can bind and pass
  410. arguments.
  411. ## 0.7.2
  412. - Fixed thenable promise assimilation.
  413. ## 0.7.1
  414. - Stopped shimming ``Array.prototype.reduce``. The
  415. enumerable property has bad side-effects. Libraries that
  416. depend on this (for example, QQ) will need to be revised.
  417. ## 0.7.0 - BACKWARD INCOMPATIBILITY
  418. - WARNING: Removed ``report`` and ``asap``
  419. - WARNING: The ``callback`` argument of the ``fin``
  420. function no longer receives any arguments. Thus, it can
  421. be used to call functions that should not receive
  422. arguments on resolution. Use ``when``, ``then``, or
  423. ``fail`` if you need a value.
  424. - IMPORTANT: Fixed a bug in the use of ``MessageChannel``
  425. for ``nextTick``.
  426. - Renamed ``enqueue`` to ``nextTick``.
  427. - Added experimental ``view`` and ``viewInfo`` for creating
  428. views of promises either when or before they're
  429. fulfilled.
  430. - Shims are now externally applied so subsequent scripts or
  431. dependees can use them.
  432. - Improved minification results.
  433. - Improved readability.
  434. ## 0.6.0 - BACKWARD INCOMPATIBILITY
  435. - WARNING: In practice, the implementation of ``spy`` and
  436. the name ``fin`` were useful. I've removed the old
  437. ``fin`` implementation and renamed/aliased ``spy``.
  438. - The "q" module now exports its ``ref`` function as a "Q"
  439. constructor, with module systems that support exports
  440. assignment including NodeJS, RequireJS, and when used as
  441. a ``<script>`` tag. Notably, strictly compliant CommonJS
  442. does not support this, but UncommonJS does.
  443. - Added ``async`` decorator for generators that use yield
  444. to "trampoline" promises. In engines that support
  445. generators (SpiderMonkey), this will greatly reduce the
  446. need for nested callbacks.
  447. - Made ``when`` chainable.
  448. - Made ``all`` chainable.
  449. ## 0.5.3
  450. - Added ``all`` and refactored ``join`` and ``wait`` to use
  451. it. All of these will now reject at the earliest
  452. rejection.
  453. ## 0.5.2
  454. - Minor improvement to ``spy``; now waits for resolution of
  455. callback promise.
  456. ## 0.5.1
  457. - Made most Q API methods chainable on promise objects, and
  458. turned the previous promise-methods of ``join``,
  459. ``wait``, and ``report`` into Q API methods.
  460. - Added ``apply`` and ``call`` to the Q API, and ``apply``
  461. as a promise handler.
  462. - Added ``fail``, ``fin``, and ``spy`` to Q and the promise
  463. prototype for convenience when observing rejection,
  464. fulfillment and rejection, or just observing without
  465. affecting the resolution.
  466. - Renamed ``def`` (although ``def`` remains shimmed until
  467. the next major release) to ``master``.
  468. - Switched to using ``MessageChannel`` for next tick task
  469. enqueue in browsers that support it.
  470. ## 0.5.0 - MINOR BACKWARD INCOMPATIBILITY
  471. - Exceptions are no longer reported when consumed.
  472. - Removed ``error`` from the API. Since exceptions are
  473. getting consumed, throwing them in an errback causes the
  474. exception to silently disappear. Use ``end``.
  475. - Added ``end`` as both an API method and a promise-chain
  476. ending method. It causes propagated rejections to be
  477. thrown, which allows Node to write stack traces and
  478. emit ``uncaughtException`` events, and browsers to
  479. likewise emit ``onerror`` and log to the console.
  480. - Added ``join`` and ``wait`` as promise chain functions,
  481. so you can wait for variadic promises, returning your own
  482. promise back, or join variadic promises, resolving with a
  483. callback that receives variadic fulfillment values.
  484. ## 0.4.4
  485. - ``end`` no longer returns a promise. It is the end of the
  486. promise chain.
  487. - Stopped reporting thrown exceptions in ``when`` callbacks
  488. and errbacks. These must be explicitly reported through
  489. ``.end()``, ``.then(null, Q.error)``, or some other
  490. mechanism.
  491. - Added ``report`` as an API method, which can be used as
  492. an errback to report and propagate an error.
  493. - Added ``report`` as a promise-chain method, so an error
  494. can be reported if it passes such a gate.
  495. ## 0.4.3
  496. - Fixed ``<script>`` support that regressed with 0.4.2
  497. because of "use strict" in the module system
  498. multi-plexer.
  499. ## 0.4.2
  500. - Added support for RequireJS (jburke)
  501. ## 0.4.1
  502. - Added an "end" method to the promise prototype,
  503. as a shorthand for waiting for the promise to
  504. be resolved gracefully, and failing to do so,
  505. to dump an error message.
  506. ## 0.4.0 - BACKWARD INCOMPATIBLE*
  507. - *Removed the utility modules. NPM and Node no longer
  508. expose any module except the main module. These have
  509. been moved and merged into the "qq" package.
  510. - *In a non-CommonJS browser, q.js can be used as a script.
  511. It now creates a Q global variable.
  512. - Fixed thenable assimilation.
  513. - Fixed some issues with asap, when it resolves to
  514. undefined, or throws an exception.
  515. ## 0.3.0 - BACKWARD-INCOMPATIBLE
  516. - The `post` method has been reverted to its original
  517. signature, as provided in Tyler Close's `ref_send` API.
  518. That is, `post` accepts two arguments, the second of
  519. which is an arbitrary object, but usually invocation
  520. arguments as an `Array`. To provide variadic arguments
  521. to `post`, there is a new `invoke` function that posts
  522. the variadic arguments to the value given in the first
  523. argument.
  524. - The `defined` method has been moved from `q` to `q/util`
  525. since it gets no use in practice but is still
  526. theoretically useful.
  527. - The `Promise` constructor has been renamed to
  528. `makePromise` to be consistent with the convention that
  529. functions that do not require the `new` keyword to be
  530. used as constructors have camelCase names.
  531. - The `isResolved` function has been renamed to
  532. `isFulfilled`. There is a new `isResolved` function that
  533. indicates whether a value is not a promise or, if it is a
  534. promise, whether it has been either fulfilled or
  535. rejected. The code has been revised to reflect this
  536. nuance in terminology.
  537. ## 0.2.10
  538. - Added `join` to `"q/util"` for variadically joining
  539. multiple promises.
  540. ## 0.2.9
  541. - The future-compatible `invoke` method has been added,
  542. to replace `post`, since `post` will become backward-
  543. incompatible in the next major release.
  544. - Exceptions thrown in the callbacks of a `when` call are
  545. now emitted to Node's `"uncaughtException"` `process`
  546. event in addition to being returned as a rejection reason.
  547. ## 0.2.8
  548. - Exceptions thrown in the callbacks of a `when` call
  549. are now consumed, warned, and transformed into
  550. rejections of the promise returned by `when`.
  551. ## 0.2.7
  552. - Fixed a minor bug in thenable assimilation, regressed
  553. because of the change in the forwarding protocol.
  554. - Fixed behavior of "q/util" `deep` method on dates and
  555. other primitives. Github issue #11.
  556. ## 0.2.6
  557. - Thenables (objects with a "then" method) are accepted
  558. and provided, bringing this implementation of Q
  559. into conformance with Promises/A, B, and D.
  560. - Added `makePromise`, to replace the `Promise` function
  561. eventually.
  562. - Rejections are now also duck-typed. A rejection is a
  563. promise with a valueOf method that returns a rejection
  564. descriptor. A rejection descriptor has a
  565. "promiseRejected" property equal to "true" and a
  566. "reason" property corresponding to the rejection reason.
  567. - Altered the `makePromise` API such that the `fallback`
  568. method no longer receives a superfluous `resolved` method
  569. after the `operator`. The fallback method is responsible
  570. only for returning a resolution. This breaks an
  571. undocumented API, so third-party API's depending on the
  572. previous undocumented behavior may break.
  573. ## 0.2.5
  574. - Changed promises into a duck-type such that multiple
  575. instances of the Q module can exchange promise objects.
  576. A promise is now defined as "an object that implements the
  577. `promiseSend(op, resolved, ...)` method and `valueOf`".
  578. - Exceptions in promises are now captured and returned
  579. as rejections.
  580. ## 0.2.4
  581. - Fixed bug in `ref` that prevented `del` messages from
  582. being received (gozala)
  583. - Fixed a conflict with FireFox 4; constructor property
  584. is now read-only.
  585. ## 0.2.3
  586. - Added `keys` message to promises and to the promise API.
  587. ## 0.2.2
  588. - Added boilerplate to `q/queue` and `q/util`.
  589. - Fixed missing dependency to `q/queue`.
  590. ## 0.2.1
  591. - The `resolve` and `reject` methods of `defer` objects now
  592. return the resolution promise for convenience.
  593. - Added `q/util`, which provides `step`, `delay`, `shallow`,
  594. `deep`, and three reduction orders.
  595. - Added `q/queue` module for a promise `Queue`.
  596. - Added `q-comm` to the list of compatible libraries.
  597. - Deprecated `defined` from `q`, with intent to move it to
  598. `q/util`.
  599. ## 0.2.0 - BACKWARD INCOMPATIBLE
  600. - Changed post(ref, name, args) to variadic
  601. post(ref, name, ...args). BACKWARD INCOMPATIBLE
  602. - Added a def(value) method to annotate an object as being
  603. necessarily a local value that cannot be serialized, such
  604. that inter-process/worker/vat promise communication
  605. libraries will send messages to it, but never send it
  606. back.
  607. - Added a send(value, op, ...args) method to the public API, for
  608. forwarding messages to a value or promise in a future turn.
  609. ## 0.1.9
  610. - Added isRejected() for testing whether a value is a rejected
  611. promise. isResolved() retains the behavior of stating
  612. that rejected promises are not resolved.
  613. ## 0.1.8
  614. - Fixed isResolved(null) and isResolved(undefined) [issue #9]
  615. - Fixed a problem with the Object.create shim
  616. ## 0.1.7
  617. - shimmed ES5 Object.create in addition to Object.freeze
  618. for compatibility on non-ES5 engines (gozala)
  619. ## 0.1.6
  620. - Q.isResolved added
  621. - promise.valueOf() now returns the value of resolved
  622. and near values
  623. - asap retried
  624. - promises are frozen when possible
  625. ## 0.1.5
  626. - fixed dependency list for Teleport (gozala)
  627. - all unit tests now pass (gozala)
  628. ## 0.1.4
  629. - added support for Teleport as an engine (gozala)
  630. - simplified and updated methods for getting internal
  631. print and enqueue functions universally (gozala)
  632. ## 0.1.3
  633. - fixed erroneous link to the q module in package.json
  634. ## 0.1.2
  635. - restructured for overlay style package compatibility
  636. ## 0.1.0
  637. - removed asap because it was broken, probably down to the
  638. philosophy.
  639. ## 0.0.3
  640. - removed q-util
  641. - fixed asap so it returns a value if completed
  642. ## 0.0.2
  643. - added q-util
  644. ## 0.0.1
  645. - initial version