You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix!: release majors of modules that had patches during v1.0 (#2286)
Pre-v1.0 versions of libp2p are still depending on post-1.0 modules
which means they have a mixed set of versions.
The change here is to cause those modules to have major releases.
BREAKING CHANGE: requires libp2p v1
Copy file name to clipboardExpand all lines: packages/peer-collections/src/index.ts
+27Lines changed: 27 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,33 @@
4
4
* We can't use PeerIds as collection keys because collection keys are compared using same-value-zero equality, so this is just a group of collections that stringifies PeerIds before storing them.
5
5
*
6
6
* PeerIds cache stringified versions of themselves so this should be a cheap operation.
7
+
*
8
+
* @example Peer lists
9
+
*
10
+
* ```JavaScript
11
+
* import { peerList } from '@libp2p/peer-collections'
12
+
*
13
+
* const list = peerList()
14
+
* list.push(peerId)
15
+
* ```
16
+
*
17
+
* @example Peer maps
18
+
*
19
+
* ```JavaScript
20
+
* import { peerMap } from '@libp2p/peer-collections'
21
+
*
22
+
* const map = peerMap<string>()
23
+
* map.set(peerId, 'value')
24
+
* ```
25
+
*
26
+
* @example Peer sets
27
+
*
28
+
* ```JavaScript
29
+
* import { peerSet } from '@libp2p/peer-collections'
Copy file name to clipboardExpand all lines: packages/peer-record/src/index.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@
11
11
*
12
12
* You can read further about the envelope in [libp2p/specs#217](https://github.com/libp2p/specs/pull/217).
13
13
*
14
-
* @example
14
+
* @example Creating a peer record
15
15
*
16
16
* Create an envelope with an instance of an [interface-record](https://github.com/libp2p/js-libp2p/blob/main/packages/interface/src/record/index.ts) implementation and prepare it for being exchanged:
17
17
*
@@ -42,7 +42,7 @@
42
42
* const wireData = e.marshal()
43
43
* ```
44
44
*
45
-
* @example
45
+
* @example Consuming a peer record
46
46
*
47
47
* Consume a received envelope (`wireData`) and transform it back to a record:
Copy file name to clipboardExpand all lines: packages/pubsub-floodsub/src/index.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@
9
9
*
10
10
* Instead please use [gossipsub](https://www.npmjs.com/package/@chainsafe/libp2p-gossipsub) - a more complete implementation which is also compatible with floodsub.
0 commit comments