Skip to content
Browse files

Scale back and upgrade Node.js bridge

  • Loading branch information
kriskowal committed Feb 23, 2014
1 parent 856ef93 commit d5bea58bfb0fc091beb52dd91fe78506851bc7c5
Showing with 234 additions and 207 deletions.
  1. +29 −0
  2. +0 −135 node.js
  3. +186 −42 q.js
  4. +19 −30 test/node.js
@@ -58,6 +58,12 @@ deprecation warnings. Deprecated features will be removed outright in version 3.
Q-Connection `v0.5`.
- :warning: The old progress notification system has been removed.
Try the new estimated time to completion feature.
- :warning: `denodeify` now only takes the function to decorate and does not
partially apply arguments. It now also takes a second argument
that determines whether the decorated function needs a variadic or named
argument nodeback.
- :warning: `makeNodeResolver` has been deprecated and no longer
implicitly captures variadic arguments in an array.
- Promises now support vicious cycle detection. If a deferred promise
ultimately depends upon its own resolution, it will be rejected with
the singleton vicious cycle error.
@@ -124,6 +130,29 @@ progress) will not cause any errors but wont’t send any notifications either.
The feature may be partially restored as a status notification system, but the
behavior will probably change.
### Node.js Bridge
Q 1 supported a wide variety of `n*` methods for bridging to Node.js. In
practice, few of these were used. This release scales back support for the
Node.js bridge to the essential `promise.nodeify`, `Q.denodeify`, and
The beahvior of `denodeify` has been altered to match the behavior of
[RSVP.js][]’s `denodeify`. The version of this method in Q v1 would infer that
the method provided a variable number of arguments (variadic arguments) if the
nodeback was called with more than one non-error argument. This leaves a glaring
ambiguity. With the new interface, whether to collect variadic arguments into an
array, capture arguments by name into an object, or just pass the sole value
argument is decided by a second parameter to `denodeify`. Omitted, you get the
usual Node.js style callback. With `true`, you get variadic arguments. With an
array of names, the arguments will be captured on an object literal with their
respective name.
The `makeNodeResolver` function has been deprecated and no longer supports the
implicit variadic behavior.
### Deprecations
These have migration shims that simply throw errors.
135 node.js

This file was deleted.

0 comments on commit d5bea58

Please sign in to comment.
You can’t perform that action at this time.