-
Notifications
You must be signed in to change notification settings - Fork 6
chore: update dependencies and tests #19
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
Conversation
ddb7075
to
cc48cef
Compare
cc48cef
to
670daa7
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.
LGTM, thanks so much for sorting this out. I've just left some minor suggestions.
getTopics: () => pubsub.getTopics(), | ||
getSubscribers: (topic) => pubsub.getSubscribers(topic), | ||
stop: () => pubsub.stop() | ||
} |
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.
Personally I'd just return pubsub
and refactor the tests that use subscribe
and unsubscribe
to use the libp2p PubSub API not the IPFS pubsub API. 😉
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.
These changes aim to use the libp2p pubsub API: https://github.com/libp2p/js-libp2p/blob/refactor/async-await/src/pubsub.js
My initial idea was to use the pubsub API directly. But, I would need to also change the src
for doing the subscribe
and handle
in different operations. Also, for js-ipfs
, I think it makes more sense to provide libp2p.pubsub
to datastore-pubsub
, instead of libp2p.pubsub._pubsub
for having the API of the pubsub router directly.
I will go ahead and merge this, but we can discuss and make this change if you convince me that it is better 😛
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.
Ah gotcha my bad I was thinking the libp2p pubsub api WAS the pubsub api but it is different.
This reverts commit fe751f8.
This PR aims to:
pubsub.ls()
rename topubsub.getTopics()
ipfs
, but use the modules it needs onlyResolves #18