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

Commit 3e794ac

Browse files
author
Alan Shaw
authored
fix: add docs for breaking change (#898)
Didn't make it into the autogenerated changelog as the commit message wasn't quite in the correct format (6e6d7a2) License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
1 parent 12725fe commit 3e794ac

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

CHANGELOG.md

+13-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Note that in the browser build the object attached to `window` is now `window.Ip
2828

2929
License: MIT
3030
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
31+
3132
* Object API refactor.
3233

3334
Object API methods that write DAG nodes now return a CID instead of a DAG node. Affected methods:
@@ -65,6 +66,7 @@ See https://github.com/ipld/js-ipld-dag-pb/pull/99 for more information.
6566

6667
License: MIT
6768
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
69+
6870
* Files API methods `add*`, `cat*`, `get*` have moved from `files` to the root namespace.
6971

7072
Specifically, the following changes have been made:
@@ -88,6 +90,17 @@ Additionally, `addFromFs`, `addFromUrl`, `addFromStream` have moved from `util`
8890
License: MIT
8991
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
9092

93+
* Previously `swarm.peers` would throw an uncaught error if any peer in the response could not have its peerId or multiaddr validated.
94+
95+
This change catches errors that occur while validating the peer info. The returned array will contain an entry for every peer in the ipfs response. peer-info objects that couldn't be validated, now have an `error` property and a `rawPeerInfo` property. This at least means the count of peers in the response will be accurate, and there the info is available to the caller.
96+
97+
This means that callers now have to deal with peer-info objects that may
98+
not have a `peer` or `addr` property.
99+
100+
Adds `nock` tests to exercice the code under different error conditions. Doing so uncovered a bug in our legacy go-ipfs <= 0.4.4 peer info parsing, which is also fixed. The code was trying to decapusalate the peerId from the multiaddr, but doing so trims the peerId rather than returning it.
101+
102+
License: MIT
103+
Signed-off-by: Oli Evans <oli@tableflip.io>
91104

92105

93106
<a name="26.1.2"></a>
@@ -875,6 +888,3 @@ Signed-off-by: Alan Shaw <alan@tableflip.io>
875888
### Bug Fixes
876889

877890
* new fixed aegir ([93ac472](https://github.com/ipfs/js-ipfs-http-client/commit/93ac472))
878-
879-
880-

0 commit comments

Comments
 (0)