-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: async await #87
Conversation
5d408bf
to
97ed4ac
Compare
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.
I think its ok for the synchronous methods to be synchronous. Making them async will slow them down unnecessarily as it'll force the resolved value onto a future tick.
I understand the desire for them to all be consistent but a) right now they are not, b) it'll slow things down and c) it'll be an even bigger breaking change (and we've already got a LOT of work to do)
P.S. this is awesome - thank you ❤️
@alanshaw just made the updates 😄 I'll also take a look at |
Done @alanshaw! |
@alanshaw should we re-do this or close? |
6318f2a
to
03459fb
Compare
Rebased & merge conflicts resolved. Just need a release of libp2p/js-libp2p-crypto with libp2p/js-libp2p-crypto#131 in it and this should be good to go. |
Ready to merge \o/ |
Needs BREAKING CHANGE message in squash commit. |
BREAKING CHANGE: API refactored to use async/await fix: remove async from non-async methods fix: lint errors, use Boolean instead of !! feat: re-add some timeouts to the tests chore: rebase branch chore: update libp2p-crypto dep License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
2e6dcf7
to
24923c9
Compare
Commit message updated to have |
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.
Changes look good
@pgte @daviddias can we get a minor release of this? 🙏 Perhaps it makes sense for @vasco-santos or I to take over lead maintainer on this, peer-info and peer-book? |
@jacobheun done :)
It does! Thank you 👍🏽 |
0.13.0 is out and awaits you 😉 |
More background about this effort: ipfs/js-ipfs#1670.
Despite somecreateX
function not needingasync
, I added it to all of them to make them consistent. Otherwise we would have half returning a Promise and another half returning a PeerId