Skip to content

Commit a1c90fd

Browse files
committed
feat!: update to libp2p v3 api
Refactors code to conform to the `[email protected]` API. - Encrypted streams are now EventTargets BREAKING CHANGE: Must be used with `[email protected]`, it cannot be used with earlier versions
1 parent afc85ee commit a1c90fd

33 files changed

+12711
-9634
lines changed

package-lock.json

Lines changed: 9164 additions & 6251 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@
7373
},
7474
"homepage": "https://github.com/ChainSafe/js-libp2p-gossipsub#readme",
7575
"dependencies": {
76-
"@libp2p/crypto": "^5.0.0",
77-
"@libp2p/interface": "^2.0.0",
78-
"@libp2p/interface-internal": "^2.0.0",
79-
"@libp2p/peer-id": "^5.0.0",
76+
"@libp2p/crypto": "^5.1.9",
77+
"@libp2p/interface": "^3.0.0",
78+
"@libp2p/interface-internal": "^3.0.0",
79+
"@libp2p/peer-id": "^6.0.0",
8080
"@libp2p/pubsub": "^10.0.0",
81-
"@multiformats/multiaddr": "^12.1.14",
81+
"@multiformats/multiaddr": "^13.0.1",
8282
"denque": "^2.1.0",
83-
"it-length-prefixed": "^9.0.4",
83+
"it-length-prefixed": "^10.0.1",
8484
"it-pipe": "^3.0.1",
8585
"it-pushable": "^3.2.3",
8686
"multiformats": "^13.0.1",
@@ -89,39 +89,32 @@
8989
"uint8arrays": "^5.0.1"
9090
},
9191
"devDependencies": {
92-
"@chainsafe/as-sha256": "^0.4.1",
93-
"@dapplion/benchmark": "^0.2.4",
94-
"@libp2p/floodsub": "^10.0.0",
95-
"@libp2p/interface-compliance-tests": "^6.0.0",
96-
"@libp2p/logger": "^5.0.0",
97-
"@libp2p/peer-store": "^11.0.0",
98-
"@types/node": "^20.11.6",
92+
"@chainsafe/as-sha256": "^1.2.0",
93+
"@dapplion/benchmark": "^1.0.0",
94+
"@libp2p/floodsub": "^11.0.0",
95+
"@libp2p/interface-compliance-tests": "^7.0.0",
96+
"@libp2p/logger": "^6.0.0",
97+
"@libp2p/peer-store": "^12.0.0",
98+
"@types/node": "^22.18.1",
9999
"@types/sinon": "^17.0.3",
100100
"abortable-iterator": "^5.1.0",
101-
"aegir": "^44.1.1",
101+
"aegir": "^47.0.21",
102102
"datastore-core": "^10.0.0",
103103
"delay": "^6.0.0",
104104
"it-all": "^3.0.6",
105105
"mkdirp": "^3.0.1",
106106
"p-defer": "^4.0.0",
107107
"p-event": "^6.0.0",
108-
"p-retry": "^6.2.0",
108+
"p-retry": "^7.0.0",
109109
"p-wait-for": "^5.0.2",
110110
"protons": "^7.5.0",
111-
"sinon": "^18.0.1",
111+
"sinon": "^21.0.0",
112112
"sinon-ts": "^2.0.0",
113113
"time-cache": "^0.3.0"
114114
},
115115
"engines": {
116116
"npm": ">=8.7.0"
117117
},
118-
"eslintConfig": {
119-
"extends": "ipfs",
120-
"ignorePatterns": [
121-
"src/message/rpc*",
122-
"!.aegir.js"
123-
]
124-
},
125118
"contributors": [
126119
"Cayman <[email protected]>",
127120
"Vasco Santos <[email protected]>",

src/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ export const ERR_TOPIC_VALIDATOR_IGNORE = 'ERR_TOPIC_VALIDATOR_IGNORE'
234234
/**
235235
* If peer score is better than this, we accept messages from this peer
236236
* within ACCEPT_FROM_WHITELIST_DURATION_MS from the last time computing score.
237-
**/
237+
*/
238238
export const ACCEPT_FROM_WHITELIST_THRESHOLD_SCORE = 0
239239

240240
/**

0 commit comments

Comments
 (0)