Skip to content
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

refactor: async migration #49

Merged
merged 6 commits into from
Nov 19, 2019
Merged

refactor: async migration #49

merged 6 commits into from
Nov 19, 2019

Conversation

vasco-santos
Copy link
Collaborator

@vasco-santos vasco-santos commented Oct 18, 2019

BREAKING CHANGE: Switch to using async/await and async iterators for all the API. Moreover, gossipsub does not need the libp2p instance anymore, receiving a registerar that enables it to receive the necessary events from libp2p

Needs

With this migration, I also enabled all browser tests except for the gossip ones 🎉

Copy link
Member

@wemeetagain wemeetagain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇 thanks for this PR

src/pubsub.js Show resolved Hide resolved
src/pubsub.js Outdated Show resolved Hide resolved
BREAKING CHANGE: Switch to using async/await and async iterators for all the API. Moreover, gossipsub does not need the libp2p instance anymore, receiving a registerar that enables it to receive the necessary events from libp2p
@codecov-io
Copy link

codecov-io commented Oct 21, 2019

Codecov Report

Merging #49 into master will decrease coverage by 0.43%.
The diff coverage is 86.3%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #49      +/-   ##
==========================================
- Coverage   84.07%   83.64%   -0.44%     
==========================================
  Files           8        8              
  Lines         515      483      -32     
==========================================
- Hits          433      404      -29     
+ Misses         82       79       -3
Impacted Files Coverage Δ
src/index.js 81.3% <100%> (-0.47%) ⬇️
src/heartbeat.js 70.42% <50%> (+0.15%) ⬆️
src/pubsub.js 88.15% <84%> (-0.24%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1852ec8...3de6f46. Read the comment docs.

wemeetagain
wemeetagain previously approved these changes Nov 4, 2019
Copy link
Member

@wemeetagain wemeetagain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

src/index.js Outdated Show resolved Hide resolved
src/pubsub.js Outdated Show resolved Hide resolved
src/pubsub.js Show resolved Hide resolved
@vasco-santos vasco-santos force-pushed the refactor/async branch 2 times, most recently from b61a29a to 5680050 Compare November 14, 2019 14:14
Copy link
Member

@wemeetagain wemeetagain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than one tiny thing, LGTM! Very excited to see all of the async work land 🎉

src/pubsub.js Outdated Show resolved Hide resolved
wemeetagain
wemeetagain previously approved these changes Nov 14, 2019
jacobheun
jacobheun previously approved these changes Nov 15, 2019
Copy link
Collaborator

@jacobheun jacobheun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good from my end 👍

@wemeetagain for the async refactor modules we have been doing npm releases with the beta dist-tag instead of latest to avoid people accidentally trying to use it with the current version of libp2p, which will also let us just change the dist-tags when everything is ready to go live. If you have a different approach you would prefer, we can work around that while we do integration and interop testing.

@wemeetagain
Copy link
Member

@jacobheun thanks for the heads up.

Sounds like a good plan. 💪

@vasco-santos
Copy link
Collaborator Author

@wemeetagain @GregTheGreek will you be able to get a release as jacob suggested during the begining of this week?

@GregTheGreek
Copy link
Member

Yep, I'll get a release under beta Tomorrow

@wemeetagain wemeetagain merged commit ec8db51 into master Nov 19, 2019
@wemeetagain wemeetagain deleted the refactor/async branch November 19, 2019 21:51
@wemeetagain wemeetagain restored the refactor/async branch November 19, 2019 21:51
@wemeetagain wemeetagain deleted the refactor/async branch July 24, 2020 05:12
fryorcraken pushed a commit to fryorcraken/js-libp2p-gossipsub that referenced this pull request Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants