-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Conversation
CI failing only on commitlint |
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.
LGTM
Also; hooray!
I second @achingbrain's hooray 🎉 Using an await is so much nicer than events. Would it make sense for users to
If IPFS has already started, |
For anyone watching this - I think @dirkmc's idea is good, but I just haven't got round to amending this PR yet. |
I've had a chance to look into I found that to support I'd rather not expand the scope of this PR to include those works, since it has already hung around for way too long and I feel that... a) most people will now use and... b) achieving the flow for So, I'm going to get this merged and released! |
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
7a98755
to
0dbf133
Compare
License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io>
License: MIT Signed-off-by: Alan Shaw <alan@tableflip.io>
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.
Ok it sounds like this is the best path forward at the moment 👍
This PR is rebased and extended from #1878. I've added tests for
node.ready
andIPFS.create
, and updated the documentation.REVIEWERS: Please be sure to review the README.md changes (github is not rendering the diff by default).
resolves #1762
closes #1878
This change is completely backwards compatible with existing methods of creating a ready IPFS node. It does two things:
Now is the right time to add this functionality. This will get existing users thinking about switching to promise based APIs and will onboard new users to using the Promise based APIs.
The idea is that this will lessen the impact of the async await/iterators refactor to users when it bubbles up to this level - users will have to change their applications to resolve API breakages but not also have to deal with a switch from callbacks to promises.
TODO (not necessarily as dependencies of this PR):
interface-ipfs-core
to use promise APIs in examplesipfs-http-client
to addIPFS.create
andnode.ready
so they can be used interchangably (?? do you think we really need this?)