changelogs.md


cscott/prfun

Repository  -  API  -  Source

2.1.5

January 6, 2018
  • Allow functions created by Promise.async to accept legacy node-style callback arguments.
  • Switch to eslint, update mocha, and ensure we test up to node 9.

2.1.4

May 5, 2016
  • Add a cache to ensure that only a single prfun Promise class is constructed even when using the wrapper interface.
  • Update npm dev dependencies.

2.1.3

December 11, 2015
  • Optimize the Promise subclass constructor to avoid costly overhead in ES5 environments. The slow ES6 path is only used if necessary for correctness (or if the native Promise implementation uses ES6 class syntax).
  • Added Promise#then0 to the API, which is a shim when a native Promise#then0 is not available. Some Promise implementations provide this method, which is much more efficient than calling Promise#then and discarding the result.
  • Used Promise#then0 in internal implementations where appropriate, including Promise.async (where the use of generators can now yield better performance than chaining promises in the usual way).

2.1.2

November 20, 2015
  • Ensure that Promise.async always returns a Promise. (Previously if the function returned immediately without yielding the result would not be wrapped in a promise.)

2.1.1

April 28, 2014
  • Improve compatibilty with environments missing a definition of Object.setPrototypeOf.

2.1.0

April 27, 2015
  • Switch from es6-shim to core-js by default.
  • Fix our subclass code to follow the latest ES6 specification.
  • Work around some bugs in native Promise implementations to allow prfun to use native promises.

2.0.0

April 23, 2015
  • Breaking change: prfun now creates a subclass of Promise by default, instead of smashing the global Promise. This only works if your Promise implementation properly supports the ES6 subclass semantics -- es6-shim is known to implement the ES6 spec properly. To smash the global Promise like in the bad old days, use require('prfun/smash').

1.0.2

November 6, 2014
  • Fix potential resource leak in Promise#timeout.

1.0.1

September 25, 2014
  • Added Promise#tap, Promise#filter.
  • Bug fix to promisify with named arguments (an array of names as second parameter).

1.0.0

July 15, 2014
  • Breaking change to promisify API: following the lead of denodeify in rsvp and q version 2, the promisify function has been changed to eliminate the magic variadic argument inference. The promisify function now takes an explicit second parameter, names. If the names parameter is missing or falsy, then a single argument is used to resolve the promise. If the names parameter is true, then the promise is resolved with an array of the variadic arguments to the callback. If the names parameter is an array, the array names the variadic arguments, and the promise is resolved with an object containing fields with those names.

See comments on bower's issue #1403 and this commit on q's v2 branch for more details.

0.1.0

March 30, 2014
  • Initial release.