Skip to content

Commit a351bc1

Browse files
authored
Update UPGRADE.md
1 parent 9f8a7b1 commit a351bc1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

UPGRADE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
If you're migrating from `corestore-swarm-networking` v5 to `@corestore/networker` v1, there have been a few breaking changes to be aware of:
2+
3+
### `join`/`leave` -> `configure`
4+
`join` and `leave` have been replaced by a single method, `configure`, which takes the options `announce`, `lookup`, and `flushed`.
5+
6+
Using `configure`, a `join` is `configure(discoveryKey, { announce: true, lookup: true }` and a `leave` is `configure(discoveryKey, { announce: false, lookup: false })`
7+
8+
### The `status` method
9+
The `status` method previously just fowarded Hyperswarm's `status`. It now returns the current network configuration for a given discovery key. To get the Hyperswarm status directly, you can do `networker.swarm.status`.
10+
11+
### Other Assorted Changes
12+
* The public `streams` and `peers` properties are now `Set`s instead of Arrays.

0 commit comments

Comments
 (0)