From d4a092f04faa9986596b38c443c49adf345823fe Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Fri, 21 Jun 2024 11:12:17 +0200 Subject: [PATCH] fix: update all deps (#133) Updates deps to the latest versions --- .../package.json | 10 +++++----- examples/js-libp2p-example-chat/package.json | 4 ++-- .../js-libp2p-example-circuit-relay/package.json | 4 ++-- .../package.json | 4 ++-- .../package.json | 4 ++-- .../package.json | 8 ++++---- .../src/App.js | 5 +++++ .../test/index.spec.js | 2 +- .../1-dht.js | 8 ++++++-- .../package.json | 16 ++++++++-------- .../test/test-2-mdns.spec.js | 2 +- .../test/test-3-pubsub.spec.js | 2 +- package.json | 2 +- 13 files changed, 40 insertions(+), 31 deletions(-) diff --git a/examples/js-libp2p-example-browser-pubsub/package.json b/examples/js-libp2p-example-browser-pubsub/package.json index 31898e4..c9d6451 100644 --- a/examples/js-libp2p-example-browser-pubsub/package.json +++ b/examples/js-libp2p-example-browser-pubsub/package.json @@ -21,18 +21,18 @@ "test": "npm run build && test-browser-example test" }, "dependencies": { - "@chainsafe/libp2p-gossipsub": "^11.0.0", - "@chainsafe/libp2p-noise": "^14.0.0", + "@chainsafe/libp2p-gossipsub": "^13.0.0", + "@chainsafe/libp2p-noise": "^15.0.0", "@chainsafe/libp2p-yamux": "^6.0.1", "@libp2p/circuit-relay-v2": "^1.0.4", "@libp2p/dcutr": "^1.0.3", - "@libp2p/identify": "^1.0.3", - "@libp2p/mplex": "^10.0.4", + "@libp2p/identify": "^2.1.0", + "@libp2p/mplex": "^10.1.0", "@libp2p/webrtc": "^4.0.5", "@libp2p/websockets": "^8.0.4", "@multiformats/multiaddr": "^12.1.11", "libp2p": "^1.0.8", - "vite": "^5.0.4" + "vite": "^5.3.1" }, "devDependencies": { "test-ipfs-example": "^1.0.0" diff --git a/examples/js-libp2p-example-chat/package.json b/examples/js-libp2p-example-chat/package.json index 76e5cd2..7ef5c68 100644 --- a/examples/js-libp2p-example-chat/package.json +++ b/examples/js-libp2p-example-chat/package.json @@ -16,7 +16,7 @@ "test": "test-node-example test/*" }, "dependencies": { - "@chainsafe/libp2p-noise": "^14.0.0", + "@chainsafe/libp2p-noise": "^15.0.0", "@chainsafe/libp2p-yamux": "^6.0.1", "@libp2p/peer-id-factory": "^4.0.0", "@libp2p/tcp": "^9.0.4", @@ -28,7 +28,7 @@ "it-pipe": "^3.0.1", "libp2p": "^1.0.8", "p-defer": "^4.0.0", - "uint8arrays": "^4.0.6" + "uint8arrays": "^5.1.0" }, "devDependencies": { "test-ipfs-example": "^1.1.0" diff --git a/examples/js-libp2p-example-circuit-relay/package.json b/examples/js-libp2p-example-circuit-relay/package.json index 77e6444..084181e 100644 --- a/examples/js-libp2p-example-circuit-relay/package.json +++ b/examples/js-libp2p-example-circuit-relay/package.json @@ -16,10 +16,10 @@ "test": "test-node-example test/*" }, "dependencies": { - "@chainsafe/libp2p-noise": "^14.0.0", + "@chainsafe/libp2p-noise": "^15.0.0", "@chainsafe/libp2p-yamux": "^6.0.1", "@libp2p/circuit-relay-v2": "^1.0.4", - "@libp2p/identify": "^1.0.3", + "@libp2p/identify": "^2.1.0", "@libp2p/websockets": "^8.0.4", "@multiformats/multiaddr": "^12.1.11", "libp2p": "^1.0.8 " diff --git a/examples/js-libp2p-example-connection-encryption/package.json b/examples/js-libp2p-example-connection-encryption/package.json index 1858c6f..c1ca42a 100644 --- a/examples/js-libp2p-example-connection-encryption/package.json +++ b/examples/js-libp2p-example-connection-encryption/package.json @@ -16,13 +16,13 @@ "test": "test-node-example test/*" }, "dependencies": { - "@chainsafe/libp2p-noise": "^14.0.0", + "@chainsafe/libp2p-noise": "^15.0.0", "@chainsafe/libp2p-yamux": "^6.0.1", "@libp2p/plaintext": "^1.0.4", "@libp2p/tcp": "^9.0.4", "it-pipe": "^3.0.1", "libp2p": "^1.0.8", - "uint8arrays": "^4.0.6" + "uint8arrays": "^5.1.0" }, "devDependencies": { "test-ipfs-example": "^1.0.0" diff --git a/examples/js-libp2p-example-custom-protocols/package.json b/examples/js-libp2p-example-custom-protocols/package.json index c3dfae7..2ccc459 100644 --- a/examples/js-libp2p-example-custom-protocols/package.json +++ b/examples/js-libp2p-example-custom-protocols/package.json @@ -16,7 +16,7 @@ "test": "test-node-example test/*" }, "dependencies": { - "@chainsafe/libp2p-noise": "^14.0.0", + "@chainsafe/libp2p-noise": "^15.0.0", "@chainsafe/libp2p-yamux": "^6.0.1", "@libp2p/peer-id-factory": "^4.0.0", "@libp2p/tcp": "^9.0.4", @@ -26,7 +26,7 @@ "it-length-prefixed-stream": "^1.1.4", "it-pipe": "^3.0.1", "libp2p": "^1.0.8", - "uint8arrays": "^4.0.6" + "uint8arrays": "^5.1.0" }, "devDependencies": { "test-ipfs-example": "^1.1.0" diff --git a/examples/js-libp2p-example-delegated-routing/package.json b/examples/js-libp2p-example-delegated-routing/package.json index 42e8fdc..6927dce 100644 --- a/examples/js-libp2p-example-delegated-routing/package.json +++ b/examples/js-libp2p-example-delegated-routing/package.json @@ -20,9 +20,8 @@ "test": "npm run build && test-browser-example test" }, "dependencies": { - "@helia/delegated-routing-v1-http-api-client": "^1.1.0", - "@helia/delegated-routing-v1-http-api-server": "^1.0.3", - "helia": "^2.1.0", + "@helia/delegated-routing-v1-http-api-client": "^3.0.1", + "@helia/delegated-routing-v1-http-api-server": "^3.0.3", "libp2p": "^1.0.8", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -30,7 +29,8 @@ }, "devDependencies": { "test-ipfs-example": "^1.0.0", - "eslint-config-ipfs": "^6.0.0" + "eslint-config-ipfs": "^7.0.2", + "helia": "^4.2.4" }, "browserslist": [ ">0.2%", diff --git a/examples/js-libp2p-example-delegated-routing/src/App.js b/examples/js-libp2p-example-delegated-routing/src/App.js index 255acd2..53a4bab 100644 --- a/examples/js-libp2p-example-delegated-routing/src/App.js +++ b/examples/js-libp2p-example-delegated-routing/src/App.js @@ -55,6 +55,11 @@ class App extends Component { isLoading: this.state.isLoading - 1 }) } + + this.setState({ + response: JSON.stringify(providers, null, 2), + isLoading: this.state.isLoading - 1 + }) } async handlePeerSubmit (event) { diff --git a/examples/js-libp2p-example-delegated-routing/test/index.spec.js b/examples/js-libp2p-example-delegated-routing/test/index.spec.js index 4b72f2a..942fc18 100644 --- a/examples/js-libp2p-example-delegated-routing/test/index.spec.js +++ b/examples/js-libp2p-example-delegated-routing/test/index.spec.js @@ -57,7 +57,7 @@ test.describe('delegated routing example:', () => { await page.click(findProvidersBtn) const outputLocator = page.locator(output) - await expect(outputLocator).toContainText('multiaddrs":') + await expect(outputLocator).toContainText('[') }) test('should find peer using the delegate', async ({ page, context }) => { diff --git a/examples/js-libp2p-example-discovery-mechanisms/1-dht.js b/examples/js-libp2p-example-discovery-mechanisms/1-dht.js index 6bb5972..edae5ab 100644 --- a/examples/js-libp2p-example-discovery-mechanisms/1-dht.js +++ b/examples/js-libp2p-example-discovery-mechanisms/1-dht.js @@ -4,7 +4,7 @@ import { noise } from '@chainsafe/libp2p-noise' import { yamux } from '@chainsafe/libp2p-yamux' import { bootstrap } from '@libp2p/bootstrap' import { identify } from '@libp2p/identify' -import { kadDHT } from '@libp2p/kad-dht' +import { kadDHT, removePublicAddressesMapper } from '@libp2p/kad-dht' import { mplex } from '@libp2p/mplex' import { tcp } from '@libp2p/tcp' import { createLibp2p } from 'libp2p' @@ -23,7 +23,11 @@ const node = await createLibp2p({ }) ], services: { - kadDHT: kadDHT(), + kadDHT: kadDHT({ + protocol: '/ipfs/lan/kad/1.0.0', + peerInfoMapper: removePublicAddressesMapper, + clientMode: false + }), identify: identify() } }) diff --git a/examples/js-libp2p-example-discovery-mechanisms/package.json b/examples/js-libp2p-example-discovery-mechanisms/package.json index c22b08c..5ac54ed 100644 --- a/examples/js-libp2p-example-discovery-mechanisms/package.json +++ b/examples/js-libp2p-example-discovery-mechanisms/package.json @@ -16,24 +16,24 @@ "test": "test-node-example test/*" }, "dependencies": { - "@chainsafe/libp2p-noise": "^14.0.0", + "@chainsafe/libp2p-noise": "^15.0.0", "@chainsafe/libp2p-yamux": "^6.0.1", - "@libp2p/bootstrap": "^10.0.5", + "@libp2p/bootstrap": "^10.1.0", "@libp2p/circuit-relay-v2": "^1.0.5", - "@libp2p/floodsub": "^9.0.1", - "@libp2p/identify": "^1.0.4", - "@libp2p/kad-dht": "^11.0.5", + "@libp2p/floodsub": "^9.1.0", + "@libp2p/identify": "^2.1.0", + "@libp2p/kad-dht": "^12.1.0", "@libp2p/mdns": "^10.0.5", - "@libp2p/mplex": "^10.0.5", + "@libp2p/mplex": "^10.1.0", "@libp2p/pubsub-peer-discovery": "^10.0.1", "@libp2p/tcp": "^9.0.4", "libp2p": "^1.0.8" }, "devDependencies": { - "execa": "^8.0.1", + "execa": "^9.2.0", "p-wait-for": "^5.0.2", "test-ipfs-example": "^1.1.0", - "uint8arrays": "^4.0.9" + "uint8arrays": "^5.1.0" }, "private": true } diff --git a/examples/js-libp2p-example-discovery-mechanisms/test/test-2-mdns.spec.js b/examples/js-libp2p-example-discovery-mechanisms/test/test-2-mdns.spec.js index 231c94c..c54ce22 100644 --- a/examples/js-libp2p-example-discovery-mechanisms/test/test-2-mdns.spec.js +++ b/examples/js-libp2p-example-discovery-mechanisms/test/test-2-mdns.spec.js @@ -28,4 +28,4 @@ proc.all.on('data', async (data) => { await pWaitFor(() => discoveredNodes > 1, 600000) -proc.kill() +process.exit(0) diff --git a/examples/js-libp2p-example-discovery-mechanisms/test/test-3-pubsub.spec.js b/examples/js-libp2p-example-discovery-mechanisms/test/test-3-pubsub.spec.js index 9a7838e..c4aedc7 100644 --- a/examples/js-libp2p-example-discovery-mechanisms/test/test-3-pubsub.spec.js +++ b/examples/js-libp2p-example-discovery-mechanisms/test/test-3-pubsub.spec.js @@ -33,4 +33,4 @@ proc.all.on('data', async (data) => { await pWaitFor(() => discoveredPeers.length > 2, 600000) -proc.kill() +process.exit(0) diff --git a/package.json b/package.json index 9b009f1..0e885a2 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ } }, "devDependencies": { - "aegir": "^41.0.4" + "aegir": "^43.0.1" }, "workspaces": [ "examples/*"