Skip to content

Commit 693bbaf

Browse files
committed
chore: fix build
1 parent b9c05d0 commit 693bbaf

File tree

7 files changed

+12
-85
lines changed

7 files changed

+12
-85
lines changed

.release-please.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"packages/peer-store": {},
2323
"packages/protocol-autonat": {},
2424
"packages/protocol-perf": {},
25+
"packages/protocol-ping": {},
2526
"packages/pubsub": {},
2627
"packages/pubsub-floodsub": {},
2728
"packages/stream-multiplexer-mplex": {},

doc/CONFIGURATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,7 @@ const node = await createLibp2p({
10031003
protocols: [
10041004
"/ipfs/id/1.0.0", // identify service protocol (if we have multiplexers)
10051005
"/ipfs/id/push/1.0.0", // identify service push protocol (if we have multiplexers)
1006-
"/ipfs/ping/1.0.0", // built-in ping protocol
1006+
"/ipfs/ping/1.0.0", // ping protocol
10071007
]
10081008
*/
10091009
```

interop/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"@chainsafe/libp2p-noise": "^13.0.0",
5555
"@chainsafe/libp2p-yamux": "^5.0.0",
5656
"@libp2p/mplex": "^9.0.12",
57+
"@libp2p/ping": "^0.0.0",
5758
"@libp2p/tcp": "^8.0.13",
5859
"@libp2p/webrtc": "^3.2.10",
5960
"@libp2p/websockets": "^7.0.13",

interop/test/ping.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { } from 'aegir/chai'
55
import { noise } from '@chainsafe/libp2p-noise'
66
import { yamux } from '@chainsafe/libp2p-yamux'
77
import { mplex } from '@libp2p/mplex'
8+
import { ping, type PingService } from '@libp2p/ping'
89
import { tcp } from '@libp2p/tcp'
910
import { webRTC, webRTCDirect } from '@libp2p/webrtc'
1011
import { webSockets } from '@libp2p/websockets'
@@ -14,7 +15,6 @@ import { type Multiaddr, multiaddr } from '@multiformats/multiaddr'
1415
import { createLibp2p, type Libp2p, type Libp2pOptions } from 'libp2p'
1516
import { circuitRelayTransport } from 'libp2p/circuit-relay'
1617
import { type IdentifyService, identifyService } from 'libp2p/identify'
17-
import { pingService, type PingService } from 'libp2p/ping'
1818

1919
async function redisProxy (commands: any[]): Promise<any> {
2020
const res = await fetch(`http://localhost:${process.env.proxyPort ?? ''}/`, { body: JSON.stringify(commands), method: 'POST' })
@@ -49,7 +49,7 @@ describe('ping test', function () {
4949
denyDialMultiaddr: async () => false
5050
},
5151
services: {
52-
ping: pingService(),
52+
ping: ping(),
5353
identify: identifyService()
5454
}
5555
}

packages/libp2p/test/configuration/protocol-prefix.node.ts

Lines changed: 0 additions & 73 deletions
This file was deleted.

packages/protocol-ping/package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,20 @@
4545
"dep-check": "aegir dep-check"
4646
},
4747
"dependencies": {
48+
"@libp2p/crypto": "^2.0.8",
4849
"@libp2p/interface": "^0.1.2",
4950
"@libp2p/interface-internal": "^0.1.5",
5051
"@libp2p/logger": "^3.1.0",
5152
"@libp2p/peer-id-factory": "^3.0.8",
5253
"@multiformats/multiaddr": "^12.1.5",
53-
"it-pair": "^2.0.6",
54-
"p-defer": "^4.0.0"
54+
"it-first": "^3.0.3",
55+
"it-pipe": "^3.0.1",
56+
"uint8arrays": "^4.0.6"
5557
},
5658
"devDependencies": {
5759
"aegir": "^41.0.2",
58-
"it-all": "^3.0.1",
59-
"it-pushable": "^3.2.0",
60-
"sinon": "^17.0.0",
61-
"sinon-ts": "^1.0.0"
60+
"it-pair": "^2.0.6",
61+
"p-defer": "^4.0.0",
62+
"sinon-ts": "^2.0.0"
6263
}
6364
}

packages/protocol-ping/src/ping.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ export class PingService implements Startable, PingServiceInterface {
7373

7474
/**
7575
* Ping a given peer and wait for its response, getting the operation latency.
76-
*
77-
* @param {PeerId|Multiaddr} peer
78-
* @returns {Promise<number>}
7976
*/
8077
async ping (peer: PeerId | Multiaddr | Multiaddr[], options: AbortOptions = {}): Promise<number> {
8178
this.#log('pinging %p', peer)

0 commit comments

Comments
 (0)