Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a2914a0

Browse files
authoredJan 6, 2023
fix!: update multiformats and related dependencies (#257)
`multiformats@11.x.x` shipped with a [breaking change](multiformats/js-multiformats#230) so update all deps using multiformats to the latest version. The code changed is not used by this module so there's not a lot of changes here, but this should still go out as a major because the interface versions have changed.
1 parent 2d89edc commit a2914a0

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed
 

‎package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@
7171
"@libp2p/interface-connection-encrypter": "^3.0.0",
7272
"@libp2p/interface-keys": "^1.0.2",
7373
"@libp2p/interface-metrics": "^4.0.2",
74-
"@libp2p/interface-peer-id": "^1.0.2",
74+
"@libp2p/interface-peer-id": "^2.0.0",
7575
"@libp2p/logger": "^2.0.0",
76-
"@libp2p/peer-id": "^1.1.8",
76+
"@libp2p/peer-id": "^2.0.0",
7777
"@stablelib/chacha20poly1305": "^1.0.1",
7878
"@stablelib/hkdf": "^1.0.1",
7979
"@stablelib/sha256": "^1.0.1",
@@ -90,10 +90,10 @@
9090
"devDependencies": {
9191
"@libp2p/daemon-client": "^3.0.1",
9292
"@libp2p/daemon-server": "^3.0.1",
93-
"@libp2p/interface-connection-encrypter-compliance-tests": "^3.0.0",
93+
"@libp2p/interface-connection-encrypter-compliance-tests": "^4.0.0",
9494
"@libp2p/interop": "^3.0.1",
9595
"@libp2p/mplex": "^7.0.0",
96-
"@libp2p/peer-id-factory": "^1.0.8",
96+
"@libp2p/peer-id-factory": "^2.0.0",
9797
"@libp2p/tcp": "^6.0.2",
9898
"@multiformats/multiaddr": "^11.0.3",
9999
"aegir": "^37.3.0",

‎test/index.spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import sinon from 'sinon'
66
import { noise } from '../src/index.js'
77
import { Noise } from '../src/noise.js'
88
import { createPeerIdsFromFixtures } from './fixtures/peer.js'
9+
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
910

1011
function createCounterSpy () {
1112
return sinon.spy({
@@ -43,7 +44,7 @@ describe('Index', () => {
4344
const wrappedInbound = pbStream(inbound.conn)
4445
const wrappedOutbound = pbStream(outbound.conn)
4546

46-
wrappedOutbound.writeLP(Buffer.from('test'))
47+
wrappedOutbound.writeLP(uint8ArrayFromString('test'))
4748
await wrappedInbound.readLP()
4849
expect(metricsRegistry.get('libp2p_noise_xxhandshake_successes_total')?.increment.callCount).to.equal(1)
4950
expect(metricsRegistry.get('libp2p_noise_xxhandshake_error_total')?.increment.callCount).to.equal(0)

‎test/interop.ts

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ async function createJsPeer (options: SpawnOptions): Promise<Daemon> {
7272
}
7373

7474
const opts: Libp2pOptions = {
75+
// @ts-expect-error @libp2p/interface-peer-id types are not aligned
7576
peerId,
7677
addresses: {
7778
listen: ['/ip4/0.0.0.0/tcp/0']

0 commit comments

Comments
 (0)