Conversation
package.json
Outdated
| }, | ||
| "devDependencies": { | ||
| "aegir": "^8.1.0", | ||
| "aegir": "dignifiedquire/aegir#debug", |
| nodeify( | ||
| res.then((raw) => new Buffer(new Uint8Array(raw))), | ||
| callback | ||
| ) |
There was a problem hiding this comment.
that's how nodeify works: https://www.npmjs.com/package/nodeify It will call callback with err if it catches one, or with the result if no err is caught
There was a problem hiding this comment.
It is different though, examples in the npm package show a complete wrap of the Promise, here we are waiting the promise to resolve to convert it to a buffer and then calling the callback through nodeify.
It is missing the res.catch(err)
There was a problem hiding this comment.
no, we create a new promise using the then which is passed as the first arg to nodeify and the callback is passed as the second argument, as described in the nodeify docs
There was a problem hiding this comment.
right, the return values are promises
|
CR;ed |
.travis.yml
Outdated
| - CXX=g++-4.8 | ||
| global: | ||
| - SAUCE_USERNAME=js-mh-async | ||
| - secure: gkYffdzshG1A8Se3ifm2QNyhxWRRAvEIjKpjFFPwMzGtErjX57tH1ce8D3v7ImI6LdhCr19+DhjXZysqNrEBhUILwCxLR/48wuxZo/pmbs0s6o9Zh2fpxlISeCaFdH95e3uQq+oi/hkDou+TLwatirHd2tg1+xcsQo+D9h0I3Yx8VJmdv6ch252toWljvp8dTY6aojoX7MSqCggcukr3uzr3dZtuDugPTB2VCDj680HalLu5Hto00iVBIEqOvhwrOufNdTriT1hM4qjVGlfroV3+76KMncZvGA0nA3K1NqklxSL+RCE+8lWH7HcwViNUngETk6r9jm33K33DtY+P3XWKyokLGALKxXF9xm+J+o+1A14Ab+p9h4e84GFbWXzslg+szgQPY0OX67Ahb+SBU4JlMSO+eHaym6r6uMNJ6AIdO8ugFnVuXgtjQstq2h7aaCoZ5j0w7WtS4j96KkrmL82HWWDSeymgkYrPTMsM/ZsylKDTnWOMiSp+uoEEUf+aJvraDGvlpC62lklrz0z/1bm4ZgelseUUSxfAF2ibKgfXxJw6FHjo+V6xu7KY7yPyOZUSCHh+KuhByS/tvdo0GbN5zKOhUEJTx6Fc6Aj+ArlkW9C+fEreKIY0KkLRIeLc8/VL69YDDnSNRUJj3ubKNstQNeHoMqlk+75xfyVvVk4= |
There was a problem hiding this comment.
@dignifiedquire I'm setting up credentials on travis
.travis.yml
Outdated
| env: CXX=g++-4.8 | ||
| - node_js: stable | ||
| env: | ||
| - SAUCE=true |
package.json
Outdated
| "devDependencies": { | ||
| "aegir": "^8.1.0", | ||
| "benchmark": "^2.1.1", | ||
| "aegir": "dignifiedquire/aegir#debug", |
There was a problem hiding this comment.
ups forgot to change
Ref ipfs/js-ipfs#485