Skip to content

Commit 65b68f0

Browse files
authored
deps!: update libp2p to 0.46.x (#215)
Updates all deps to the latest version including libp2p@0.46.x to gracefully close streams. See the libp2p [release notes](https://github.com/libp2p/js-libp2p/releases/tag/libp2p-v0.46.0) and [migration guide](https://github.com/libp2p/js-libp2p/blob/master/doc/migrations/v0.45-v0.46.md). BREAKING CHANGE: libp2p has been updated to 0.46.x
1 parent 5b1f195 commit 65b68f0

13 files changed

+39
-43
lines changed

packages/helia/package.json

+17-19
Original file line numberDiff line numberDiff line change
@@ -49,39 +49,37 @@
4949
"prepublishOnly": "node scripts/update-version.js && npm run build"
5050
},
5151
"dependencies": {
52-
"@chainsafe/libp2p-gossipsub": "^8.0.0",
53-
"@chainsafe/libp2p-noise": "^12.0.0",
54-
"@chainsafe/libp2p-yamux": "^4.0.2",
52+
"@chainsafe/libp2p-gossipsub": "^10.0.0",
53+
"@chainsafe/libp2p-noise": "^13.0.0",
54+
"@chainsafe/libp2p-yamux": "^5.0.0",
5555
"@helia/interface": "^1.0.0",
5656
"@ipld/dag-pb": "^4.0.3",
57-
"@libp2p/bootstrap": "^8.0.0",
58-
"@libp2p/interface-libp2p": "^3.2.0",
59-
"@libp2p/interface-pubsub": "^4.0.1",
60-
"@libp2p/interfaces": "^3.3.2",
57+
"@libp2p/bootstrap": "^9.0.2",
58+
"@libp2p/interface": "^0.1.1",
6159
"@libp2p/ipni-content-routing": "^1.0.0",
62-
"@libp2p/kad-dht": "^9.3.3",
63-
"@libp2p/logger": "^2.0.7",
64-
"@libp2p/mdns": "^8.0.0",
65-
"@libp2p/mplex": "^8.0.3",
66-
"@libp2p/tcp": "^7.0.1",
67-
"@libp2p/webrtc": "^2.0.4",
68-
"@libp2p/websockets": "^6.0.1",
69-
"@libp2p/webtransport": "^2.0.1",
60+
"@libp2p/kad-dht": "^10.0.2",
61+
"@libp2p/logger": "^3.0.1",
62+
"@libp2p/mdns": "^9.0.2",
63+
"@libp2p/mplex": "^9.0.2",
64+
"@libp2p/tcp": "^8.0.2",
65+
"@libp2p/webrtc": "^3.1.3",
66+
"@libp2p/websockets": "^7.0.2",
67+
"@libp2p/webtransport": "^3.0.3",
7068
"blockstore-core": "^4.0.0",
71-
"cborg": "^1.10.0",
69+
"cborg": "^2.0.3",
7270
"datastore-core": "^9.0.0",
7371
"interface-blockstore": "^5.0.0",
7472
"interface-datastore": "^8.0.0",
7573
"interface-store": "^5.0.1",
76-
"ipfs-bitswap": "^18.0.0",
74+
"ipfs-bitswap": "^19.0.0",
7775
"ipns": "^6.0.0",
7876
"it-all": "^3.0.2",
7977
"it-drain": "^3.0.1",
8078
"it-filter": "^3.0.1",
8179
"it-foreach": "^2.0.2",
82-
"libp2p": "^0.45.2",
80+
"libp2p": "^0.46.3",
8381
"mortice": "^3.0.1",
84-
"multiformats": "^11.0.1",
82+
"multiformats": "^12.0.1",
8583
"p-defer": "^4.0.0",
8684
"p-queue": "^7.3.4",
8785
"progress-events": "^1.0.0",

packages/helia/src/helia.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { NetworkedStorage } from './utils/networked-storage.js'
1111
import type { HeliaInit } from '.'
1212
import type { GCOptions, Helia } from '@helia/interface'
1313
import type { Pins } from '@helia/interface/pins'
14-
import type { Libp2p } from '@libp2p/interface-libp2p'
14+
import type { Libp2p } from '@libp2p/interface'
1515
import type { Blockstore } from 'interface-blockstore'
1616
import type { Datastore } from 'interface-datastore'
1717
import type { CID } from 'multiformats/cid'

packages/helia/src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ import { HeliaImpl } from './helia.js'
2828
import { createLibp2p } from './utils/libp2p.js'
2929
import { name, version } from './version.js'
3030
import type { Helia } from '@helia/interface'
31-
import type { Libp2p } from '@libp2p/interface-libp2p'
32-
import type { PubSub } from '@libp2p/interface-pubsub'
31+
import type { Libp2p } from '@libp2p/interface'
32+
import type { PubSub } from '@libp2p/interface/pubsub'
3333
import type { DualKadDHT } from '@libp2p/kad-dht'
3434
import type { Blockstore } from 'interface-blockstore'
3535
import type { Datastore } from 'interface-datastore'

packages/helia/src/pins.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { cborWalker, dagPbWalker, jsonWalker, rawWalker } from './utils/dag-walk
1010
import type { DAGWalker } from './index.js'
1111
import type { AddOptions, AddPinEvents, IsPinnedOptions, LsOptions, Pin, Pins, RmOptions } from '@helia/interface/pins'
1212
import type { GetBlockProgressEvents } from '@helia/interface/src/blocks.js'
13-
import type { AbortOptions } from '@libp2p/interfaces'
13+
import type { AbortOptions } from '@libp2p/interface'
1414
import type { Blockstore } from 'interface-blockstore'
1515

1616
const DEFAULT_DAG_WALKERS = [

packages/helia/src/storage.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import createMortice from 'mortice'
22
import type { Blocks, Pair, DeleteManyBlocksProgressEvents, DeleteBlockProgressEvents, GetBlockProgressEvents, GetManyBlocksProgressEvents, PutManyBlocksProgressEvents, PutBlockProgressEvents, GetAllBlocksProgressEvents, GetOfflineOptions } from '@helia/interface/blocks'
33
import type { Pins } from '@helia/interface/pins'
4-
import type { AbortOptions } from '@libp2p/interfaces'
4+
import type { AbortOptions } from '@libp2p/interface'
55
import type { Blockstore } from 'interface-blockstore'
66
import type { AwaitIterable } from 'interface-store'
77
import type { Mortice } from 'mortice'

packages/helia/src/utils/libp2p-defaults.browser.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { autoNATService } from 'libp2p/autonat'
1414
import { circuitRelayTransport } from 'libp2p/circuit-relay'
1515
import { identifyService } from 'libp2p/identify'
1616
import { bootstrapConfig } from './bootstrappers.js'
17-
import type { PubSub } from '@libp2p/interface-pubsub'
17+
import type { PubSub } from '@libp2p/interface/pubsub'
1818
import type { Libp2pOptions } from 'libp2p'
1919

2020
export function libp2pDefaults (): Libp2pOptions<{ dht: DualKadDHT, pubsub: PubSub, identify: unknown, autoNAT: unknown }> {

packages/helia/src/utils/libp2p-defaults.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { circuitRelayTransport, circuitRelayServer, type CircuitRelayService } f
1515
import { identifyService } from 'libp2p/identify'
1616
import { uPnPNATService } from 'libp2p/upnp-nat'
1717
import { bootstrapConfig } from './bootstrappers.js'
18-
import type { PubSub } from '@libp2p/interface-pubsub'
18+
import type { PubSub } from '@libp2p/interface/pubsub'
1919
import type { Libp2pOptions } from 'libp2p'
2020

2121
export function libp2pDefaults (): Libp2pOptions<{ dht: DualKadDHT, pubsub: PubSub, relay: CircuitRelayService, identify: unknown, autoNAT: unknown, upnp: unknown }> {

packages/helia/src/utils/libp2p.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createLibp2p as create, type Libp2pOptions } from 'libp2p'
22
import { libp2pDefaults } from './libp2p-defaults.js'
3-
import type { Libp2p } from '@libp2p/interface-libp2p'
4-
import type { PubSub } from '@libp2p/interface-pubsub'
3+
import type { Libp2p } from '@libp2p/interface'
4+
import type { PubSub } from '@libp2p/interface/pubsub'
55
import type { DualKadDHT } from '@libp2p/kad-dht'
66
import type { Datastore } from 'interface-datastore'
77
import type { CircuitRelayService } from 'libp2p/circuit-relay'

packages/helia/src/utils/networked-storage.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import filter from 'it-filter'
22
import forEach from 'it-foreach'
33
import { CustomProgressEvent, type ProgressOptions } from 'progress-events'
44
import type { Blocks, Pair, DeleteManyBlocksProgressEvents, DeleteBlockProgressEvents, GetBlockProgressEvents, GetManyBlocksProgressEvents, PutManyBlocksProgressEvents, PutBlockProgressEvents, GetAllBlocksProgressEvents, GetOfflineOptions } from '@helia/interface/blocks'
5-
import type { AbortOptions } from '@libp2p/interfaces'
5+
import type { AbortOptions } from '@libp2p/interface'
66
import type { Blockstore } from 'interface-blockstore'
77
import type { AwaitIterable } from 'interface-store'
88
import type { Bitswap } from 'ipfs-bitswap'

packages/interface/package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,12 @@
6565
"build": "aegir build"
6666
},
6767
"dependencies": {
68-
"@libp2p/interface-libp2p": "^3.2.0",
69-
"@libp2p/interfaces": "^3.3.2",
68+
"@libp2p/interface": "^0.1.1",
7069
"interface-blockstore": "^5.0.0",
7170
"interface-datastore": "^8.0.0",
7271
"interface-store": "^5.0.1",
73-
"ipfs-bitswap": "^18.0.0",
74-
"multiformats": "^11.0.1",
72+
"ipfs-bitswap": "^19.0.0",
73+
"multiformats": "^12.0.1",
7574
"progress-events": "^1.0.0"
7675
},
7776
"devDependencies": {

packages/interface/src/index.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616

1717
import type { Blocks } from './blocks.js'
1818
import type { Pins } from './pins.js'
19-
import type { Libp2p } from '@libp2p/interface-libp2p'
20-
import type { AbortOptions } from '@libp2p/interfaces'
19+
import type { Libp2p, AbortOptions } from '@libp2p/interface'
2120
import type { Datastore } from 'interface-datastore'
2221
import type { CID } from 'multiformats/cid'
2322
import type { ProgressEvent, ProgressOptions } from 'progress-events'

packages/interface/src/pins.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { GetBlockProgressEvents } from './blocks'
2-
import type { AbortOptions } from '@libp2p/interfaces'
2+
import type { AbortOptions } from '@libp2p/interface'
33
import type { CID } from 'multiformats/cid'
44
import type { ProgressEvent, ProgressOptions } from 'progress-events'
55

packages/interop/package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,23 @@
4848
"test:electron-main": "aegir test -t electron-main"
4949
},
5050
"devDependencies": {
51-
"@chainsafe/libp2p-noise": "^12.0.0",
52-
"@chainsafe/libp2p-yamux": "^4.0.2",
51+
"@chainsafe/libp2p-noise": "^13.0.0",
52+
"@chainsafe/libp2p-yamux": "^5.0.0",
5353
"@helia/interface": "^1.0.0",
54-
"@libp2p/tcp": "^7.0.1",
55-
"@libp2p/websockets": "^6.0.1",
54+
"@libp2p/tcp": "^8.0.2",
55+
"@libp2p/websockets": "^7.0.2",
5656
"@multiformats/sha3": "^2.0.15",
5757
"aegir": "^40.0.8",
5858
"blockstore-core": "^4.0.0",
5959
"datastore-core": "^9.0.0",
60-
"go-ipfs": "^0.20.0",
60+
"go-ipfs": "^0.21.0",
6161
"helia": "^1.0.0",
6262
"ipfsd-ctl": "^13.0.0",
6363
"it-all": "^3.0.2",
6464
"it-to-buffer": "^4.0.1",
6565
"kubo-rpc-client": "^3.0.1",
66-
"libp2p": "^0.45.2",
67-
"multiformats": "^11.0.1"
66+
"libp2p": "^0.46.3",
67+
"multiformats": "^12.0.1"
6868
},
6969
"browser": {
7070
"./dist/test/fixtures/create-helia.js": "./dist/test/fixtures/create-helia.browser.js",

0 commit comments

Comments
 (0)