js-did-ipid
js-did-ipid copied to clipboard
fix: ipfs.name.resolve returns an async iterable instead of a promise
The signature of ipfs.name.resolve changed during the migration of js-ipfs from streams to async iterables
- https://gist.github.com/alanshaw/04b2ddc35a6fff25c040c011ac6acf26#file-migration-md.
- https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/NAME.md#ipfsnameresolvevalue-options
This PR fixes the API use. It should also fix #22
I have tried this out locally with my code as well and I was able to resolve documents successfully. I could provide a more thorough end to end test if you like.
Codecov Report
Merging #23 into master will not change coverage. The diff coverage is
100.00%.
@@ Coverage Diff @@
## master #23 +/- ##
=======================================
Coverage 99.59% 99.59%
=======================================
Files 10 10
Lines 247 247
Branches 44 44
=======================================
Hits 246 246
Misses 1 1
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/__tests__/mocks/index.js | 100.00% <100.00%> (ø) |
|
| src/index.js | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update a32bec2...7af2d7a. Read the comment docs.
Oh I just saw that this library has an old version of IPFS as a peer dependency. I have tested this patch against js-ipfs/0.46.0
Yes we need to bump the peer dependency, which translates into a breaking change as well. Can you mark the commit as a breaking change, by conventional commits standards?
You'll also have to update the peer dependency in the package.json
Sure, I will have a look this week.