Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

refactor: convert utils to use async/await #390

Merged
merged 1 commit into from Dec 5, 2018

Conversation

alanshaw
Copy link
Contributor

NOTE: the PRs for ipfs/js-ipfs#1670 are being merged into the feat/async-iterators branch. Once they're all in we can merge them into master.

I plan to submit a PR for each subsystem to keep them quick and easy to review.


This PR simply converts the modules in js/src/utils to use async/await.

Also:

  • Removes async - we're not going to need this anymore!
  • Adds chai-as-promised for easier assertions with promises

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
@ghost ghost assigned alanshaw Nov 10, 2018
@ghost ghost added the in progress label Nov 10, 2018
alanshaw added a commit that referenced this pull request Nov 10, 2018
NOTE: the PRs for ipfs/js-ipfs#1670 are being merged into the `feat/async-iterators` branch. Once they're all in we can merge them into master.

---

This simply refactors the bitswap tests to use async/await and updates the documentation to remove callback support and propose a better method for documenting the parameters and return values.

depends on #390

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
Copy link
Contributor

@hugomrdias hugomrdias left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@achingbrain achingbrain left a comment

Choose a reason for hiding this comment

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

Yes!

@alanshaw alanshaw merged commit 66da2b0 into feat/async-iterators Dec 5, 2018
@alanshaw alanshaw deleted the feat/async-iterators-utils branch December 5, 2018 21:16
@ghost ghost removed the in progress label Dec 5, 2018
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.

None yet

3 participants