UNPKG

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