-
Notifications
You must be signed in to change notification settings - Fork 21
Async Crypto Endeavour #1
Conversation
package.json
Outdated
| }, | ||
| "devDependencies": { | ||
| "aegir": "^8.1.0", | ||
| "aegir": "dignifiedquire/aegir#debug", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update to aegir 9
| nodeify( | ||
| res.then((raw) => new Buffer(new Uint8Array(raw))), | ||
| callback | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about the err?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dignifiedquire I'm setting up credentials on travis
.travis.yml
Outdated
| env: CXX=g++-4.8 | ||
| - node_js: stable | ||
| env: | ||
| - SAUCE=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please do sauce on LTS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
package.json
Outdated
| "devDependencies": { | ||
| "aegir": "^8.1.0", | ||
| "benchmark": "^2.1.1", | ||
| "aegir": "dignifiedquire/aegir#debug", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not 9.0.1? @dignifiedquire
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ups forgot to change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Ref ipfs/js-ipfs#485