diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ed2ef3d78c..fb5a4cc789 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1 +1 @@ -{"packages/connection-encrypter-plaintext":"1.1.6","packages/connection-encrypter-tls":"1.1.5","packages/crypto":"4.1.9","packages/interface":"1.7.0","packages/interface-compliance-tests":"5.4.12","packages/interface-internal":"1.3.4","packages/kad-dht":"12.1.5","packages/keychain":"4.1.6","packages/libp2p":"1.9.4","packages/logger":"4.0.20","packages/metrics-devtools":"0.2.5","packages/metrics-prometheus":"3.1.5","packages/metrics-simple":"1.1.5","packages/multistream-select":"5.1.17","packages/peer-collections":"5.2.9","packages/peer-discovery-bootstrap":"10.1.5","packages/peer-discovery-mdns":"10.1.5","packages/peer-id":"4.2.4","packages/peer-record":"7.0.25","packages/peer-store":"10.1.5","packages/protocol-autonat":"1.1.5","packages/protocol-dcutr":"1.1.5","packages/protocol-echo":"1.1.5","packages/protocol-fetch":"1.1.5","packages/protocol-identify":"2.1.5","packages/protocol-perf":"3.1.5","packages/protocol-ping":"1.1.6","packages/pubsub":"9.0.26","packages/pubsub-floodsub":"9.1.5","packages/record":"4.0.4","packages/stream-multiplexer-mplex":"10.1.5","packages/transport-circuit-relay-v2":"1.1.5","packages/transport-tcp":"9.1.6","packages/transport-webrtc":"4.1.10","packages/transport-websockets":"8.2.0","packages/transport-webtransport":"4.1.9","packages/upnp-nat":"1.2.5","packages/utils":"5.4.9"} +{"packages/connection-encrypter-plaintext":"2.0.0","packages/connection-encrypter-tls":"2.0.0","packages/crypto":"5.0.0","packages/interface":"2.0.0","packages/interface-compliance-tests":"6.0.0","packages/interface-internal":"2.0.0","packages/kad-dht":"13.0.0","packages/keychain":"5.0.0","packages/libp2p":"2.0.0","packages/logger":"5.0.0","packages/metrics-devtools":"1.0.0","packages/metrics-prometheus":"4.0.0","packages/metrics-simple":"1.1.6","packages/multistream-select":"6.0.0","packages/peer-collections":"6.0.0","packages/peer-discovery-bootstrap":"11.0.0","packages/peer-discovery-mdns":"11.0.0","packages/peer-id":"5.0.0","packages/peer-record":"8.0.0","packages/peer-store":"11.0.0","packages/pnet":"2.0.0","packages/protocol-autonat":"2.0.0","packages/protocol-dcutr":"2.0.0","packages/protocol-echo":"2.0.0","packages/protocol-fetch":"2.0.0","packages/protocol-identify":"3.0.0","packages/protocol-perf":"4.0.0","packages/protocol-ping":"2.0.0","packages/pubsub":"10.0.0","packages/pubsub-floodsub":"10.0.0","packages/record":"4.0.4","packages/stream-multiplexer-mplex":"11.0.0","packages/transport-circuit-relay-v2":"2.0.0","packages/transport-tcp":"10.0.0","packages/transport-webrtc":"5.0.0","packages/transport-websockets":"9.0.0","packages/transport-webtransport":"5.0.0","packages/upnp-nat":"2.0.0","packages/utils":"6.0.0"} diff --git a/.release-please.json b/.release-please.json index 5f427cd535..07baf97322 100644 --- a/.release-please.json +++ b/.release-please.json @@ -29,6 +29,7 @@ "packages/peer-id": {}, "packages/peer-record": {}, "packages/peer-store": {}, + "packages/pnet": {}, "packages/protocol-autonat": {}, "packages/protocol-dcutr": {}, "packages/protocol-echo": {}, diff --git a/package.json b/package.json index 6c546c3279..cc35e3dca2 100644 --- a/package.json +++ b/package.json @@ -34,12 +34,13 @@ "release:rc": "aegir release-rc", "docs": "aegir docs", "docs:no-publish": "aegir docs --publish false -- --exclude interop --exclude doc", - "postinstall": "patch-package" + "postinstall": "patch-package && rm -rf node_modules/@chainsafe/libp2p-yamux/node_modules node_modules/@chainsafe/libp2p-noise/node_modules node_modules/@chainsafe/libp2p-gossipsub/node_modules node_modules/@libp2p/daemon-client/node_modules node_modules/@libp2p/daemon-server/node_modules node_modules/@libp2p/daemon-protocol/node_modules node_modules/@libp2p/interop/node_modules" }, "devDependencies": { "aegir": "^44.0.1", "npm-run-all": "^4.1.5", - "patch-package": "^8.0.0" + "patch-package": "^8.0.0", + "rimraf": "^6.0.1" }, "eslintConfig": { "extends": "ipfs", diff --git a/packages/kad-dht/test/query.spec.ts b/packages/kad-dht/test/query.spec.ts index 44617e3f86..33fb5d6277 100644 --- a/packages/kad-dht/test/query.spec.ts +++ b/packages/kad-dht/test/query.spec.ts @@ -312,6 +312,7 @@ describe('QueryManager', () => { }) await manager.start() + const deferred = pDefer() const controller = new AbortController() let aborted @@ -331,16 +332,24 @@ describe('QueryManager', () => { aborted = true }) + deferred.resolve() + await delay(1000) yield topology[peer.toString()].event } - setTimeout(() => { - controller.abort() - }, 10) + // start the query + const queryPromise = all(manager.run(key, queryFunc, { signal: controller.signal })) + + // wait for the query function to be invoked + await deferred.promise + + // abort the query + controller.abort() - await expect(all(manager.run(key, queryFunc, { signal: controller.signal }))).to.eventually.be.rejected() + // the should have been aborted + await expect(queryPromise).to.eventually.be.rejected() .with.property('name', 'QueryAbortedError') expect(aborted).to.be.true() diff --git a/packages/transport-webrtc/src/private-to-private/initiate-connection.ts b/packages/transport-webrtc/src/private-to-private/initiate-connection.ts index a4494c4a7e..f4299ace9e 100644 --- a/packages/transport-webrtc/src/private-to-private/initiate-connection.ts +++ b/packages/transport-webrtc/src/private-to-private/initiate-connection.ts @@ -138,6 +138,8 @@ export async function initiateConnection ({ rtcConfiguration, dataChannel, signa onProgress?.(new CustomProgressEvent('webrtc:read-sdp-answer')) + log.trace('initiator read SDP answer') + // read answer const answerMessage = await messageStream.read({ signal @@ -147,7 +149,7 @@ export async function initiateConnection ({ rtcConfiguration, dataChannel, signa throw new SDPHandshakeFailedError('Remote should send an SDP answer') } - log.trace('initiator receive SDP answer %s', answerMessage.data) + log.trace('initiator received SDP answer %s', answerMessage.data) const answerSdp = new RTCSessionDescription({ type: 'answer', sdp: answerMessage.data }) await peerConnection.setRemoteDescription(answerSdp).catch(err => { diff --git a/packages/transport-webrtc/src/private-to-private/signaling-stream-handler.ts b/packages/transport-webrtc/src/private-to-private/signaling-stream-handler.ts index 067693dc5f..161d1af300 100644 --- a/packages/transport-webrtc/src/private-to-private/signaling-stream-handler.ts +++ b/packages/transport-webrtc/src/private-to-private/signaling-stream-handler.ts @@ -40,6 +40,8 @@ export async function handleIncomingStream ({ peerConnection, stream, signal, co }) } + log.trace('recipient read SDP offer') + // read an SDP offer const pbOffer = await messageStream.read({ signal @@ -49,7 +51,7 @@ export async function handleIncomingStream ({ peerConnection, stream, signal, co throw new SDPHandshakeFailedError(`expected message type SDP_OFFER, received: ${pbOffer.type ?? 'undefined'} `) } - log.trace('recipient receive SDP offer %s', pbOffer.data) + log.trace('recipient received SDP offer %s', pbOffer.data) const offer = new RTCSessionDescription({ type: 'offer',