js-did-ipid icon indicating copy to clipboard operation
js-did-ipid copied to clipboard

fix: ipfs.name.resolve returns an async iterable instead of a promise

Open patrickdet opened this issue 5 years ago • 5 comments

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.

patrickdet avatar Jun 19 '20 12:06 patrickdet

Codecov Report

Merging #23 into master will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           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 data Powered by Codecov. Last update a32bec2...7af2d7a. Read the comment docs.

codecov-commenter avatar Jun 19 '20 12:06 codecov-commenter

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

patrickdet avatar Jun 19 '20 12:06 patrickdet

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?

satazor avatar Jun 24 '20 04:06 satazor

You'll also have to update the peer dependency in the package.json

HLK65 avatar Jun 24 '20 10:06 HLK65

Sure, I will have a look this week.

patrickdet avatar Jul 01 '20 07:07 patrickdet