Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

callbacks -> async / await #78

Merged
merged 7 commits into from
Sep 27, 2019
Merged

Conversation

dirkmc
Copy link
Contributor

@dirkmc dirkmc commented Mar 15, 2019

BREAKING CHANGE: All places in the API that used callbacks are now replaced with async/await

@jacobheun
Copy link
Contributor

There is an RFC for how peer discovery interfaces could be updated along with the change to async/await.

Ideally if we decided to go that route, getting a baseline of test suites at https://github.com/libp2p/interface-peer-discovery and including that here would be great.

package.json Outdated Show resolved Hide resolved
@daviddias daviddias added status/blocked Unable to be worked further until needs are met and removed status/blocked Unable to be worked further until needs are met labels Sep 10, 2019
dirkmc and others added 2 commits September 27, 2019 10:43
BREAKING CHANGE: All places in the API that used callbacks are now replaced with async/await

refactor(fix): clean up remaining async changes
License: MIT
Signed-off-by: Jacob Heun <[email protected]>
License: MIT
Signed-off-by: Jacob Heun <[email protected]>
License: MIT
Signed-off-by: Jacob Heun <[email protected]>
@jacobheun
Copy link
Contributor

I've rebased this off of master. I also removed libp2p-tcp as it was only being used for filtering. We can get the same effect by just using multiaddr.toOptions()

I also added node 12 to CI.

This should be good to go.

License: MIT
Signed-off-by: Jacob Heun <[email protected]>
@jacobheun
Copy link
Contributor

@vasco-santos I added the new interface-peer-discovery tests, but there is an issue there libp2p/interface-peer-discovery#11 that this depends on.

@vasco-santos
Copy link
Member

I just released the fixed for interface-peer-discovery. Will review this now

License: MIT
Signed-off-by: Jacob Heun <[email protected]>
@jacobheun
Copy link
Contributor

I updated the interface version, should be all set pending the review

Copy link
Member

@vasco-santos vasco-santos 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! Just pointed out 3 minor things

src/compat/querier.js Outdated Show resolved Hide resolved
src/query.js Outdated Show resolved Hide resolved
src/query.js Outdated Show resolved Hide resolved
License: MIT
Signed-off-by: Jacob Heun <[email protected]>
Copy link
Member

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

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

LGTM

@jacobheun jacobheun merged commit 46d78eb into libp2p:master Sep 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants