Skip to content

Commit

Permalink
deps: bump multiformats from 12.1.3 to 13.0.0 (#615)
Browse files Browse the repository at this point in the history
Bumps [multiformats](https://github.com/multiformats/js-multiformats) from 12.1.3 to 13.0.0.
- [Release notes](https://github.com/multiformats/js-multiformats/releases)
- [Changelog](https://github.com/multiformats/js-multiformats/blob/master/CHANGELOG.md)
- [Commits](multiformats/js-multiformats@v12.1.3...v13.0.0)

---
updated-dependencies:
- dependency-name: multiformats
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: achingbrain <[email protected]>
  • Loading branch information
dependabot[bot] and achingbrain authored Jan 16, 2024
1 parent 9d5bc7e commit 243dc1a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 19 deletions.
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,38 +148,38 @@
"docs": "aegir docs"
},
"dependencies": {
"@libp2p/identify": "^1.0.0",
"@libp2p/interface": "^1.0.0",
"@libp2p/logger": "^4.0.0",
"@libp2p/utils": "^5.0.0",
"@multiformats/multiaddr": "^12.1.0",
"@vascosantos/moving-average": "^1.1.0",
"any-signal": "^4.1.1",
"blockstore-core": "^4.0.0",
"events": "^3.3.0",
"interface-blockstore": "^5.0.0",
"interface-store": "^5.1.0",
"it-drain": "^3.0.5",
"it-foreach": "^2.0.2",
"it-length-prefixed": "^9.0.0",
"it-map": "^3.0.2",
"it-pipe": "^3.0.1",
"it-take": "^3.0.1",
"just-debounce-it": "^3.0.1",
"multiformats": "^12.0.1",
"multiformats": "^13.0.0",
"progress-events": "^1.0.0",
"protons-runtime": "^5.0.0",
"timeout-abort-controller": "^3.0.0",
"uint8arraylist": "^2.4.3",
"uint8arrays": "^4.0.2",
"uint8arrays": "^5.0.1",
"varint": "^6.0.0",
"varint-decoder": "^1.0.0"
},
"devDependencies": {
"@chainsafe/libp2p-noise": "^14.0.0",
"@libp2p/kad-dht": "^11.0.0",
"@libp2p/mplex": "^10.0.0",
"@chainsafe/libp2p-yamux": "^6.0.1",
"@libp2p/identify": "^1.0.0",
"@libp2p/kad-dht": "^12.0.2",
"@libp2p/peer-id": "^4.0.0",
"@libp2p/peer-id-factory": "^3.0.2",
"@libp2p/peer-id-factory": "^4.0.3",
"@libp2p/tcp": "^9.0.0",
"@nodeutils/defaults-deep": "^1.1.0",
"@types/lodash.difference": "^4.5.7",
Expand All @@ -188,12 +188,12 @@
"@types/sinon": "^17.0.2",
"@types/stats-lite": "^2.2.0",
"@types/varint": "^6.0.0",
"aegir": "^41.0.0",
"aegir": "^42.0.1",
"benchmark": "^2.1.4",
"blockstore-core": "^4.0.0",
"delay": "^6.0.0",
"iso-random-stream": "^2.0.0",
"it-all": "^3.0.1",
"it-drain": "^3.0.1",
"libp2p": "^1.0.0",
"lodash.difference": "^4.5.0",
"lodash.flatten": "^4.4.0",
Expand Down
3 changes: 1 addition & 2 deletions src/stats/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { EventEmitter } from 'events'
import { trackedMap } from '@libp2p/utils/tracked-map'
import { Stat } from './stat.js'
import type { PeerId } from '@libp2p/interface'
import type { Libp2p, PeerId } from '@libp2p/interface'
import type { IMovingAverage } from '@vascosantos/moving-average'
import type { Libp2p } from 'libp2p'

export interface StatsOptions {
enabled?: boolean
Expand Down
6 changes: 3 additions & 3 deletions test/bitswap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import { createLibp2pNode } from './utils/create-libp2p-node.js'
import { orderedFinish } from './utils/helpers.js'
import { makeBlocks } from './utils/make-blocks.js'
import type { Libp2p } from '@libp2p/interface'
import type { DualKadDHT } from '@libp2p/kad-dht'
import type { KadDHT } from '@libp2p/kad-dht'

/**
* Creates a repo + libp2pNode + Bitswap with or without DHT
*/
async function createThing (dht: boolean): Promise<{ libp2pNode: Libp2p<{ dht: DualKadDHT }>, bitswap: DefaultBitswap }> {
async function createThing (dht: boolean): Promise<{ libp2pNode: Libp2p<{ dht: KadDHT }>, bitswap: DefaultBitswap }> {
const libp2pNode = await createLibp2pNode({
DHT: dht
})
Expand Down Expand Up @@ -167,7 +167,7 @@ describe('bitswap without DHT', function () {
describe('bitswap with DHT', function () {
this.timeout(60 * 1000)

let nodes: Array<{ libp2pNode: Libp2p<{ dht: DualKadDHT }>, bitswap: DefaultBitswap }>
let nodes: Array<{ libp2pNode: Libp2p<{ dht: KadDHT }>, bitswap: DefaultBitswap }>

before(async () => {
nodes = await Promise.all([
Expand Down
12 changes: 7 additions & 5 deletions test/utils/create-libp2p-node.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { noise } from '@chainsafe/libp2p-noise'
import { yamux } from '@chainsafe/libp2p-yamux'
import { identify } from '@libp2p/identify'
import { type DualKadDHT, kadDHT } from '@libp2p/kad-dht'
import { mplex } from '@libp2p/mplex'
import { type KadDHT, kadDHT, removePublicAddressesMapper } from '@libp2p/kad-dht'
import { createEd25519PeerId } from '@libp2p/peer-id-factory'
import { tcp } from '@libp2p/tcp'
// @ts-expect-error no types
Expand All @@ -13,18 +13,20 @@ export interface NodeOptions extends Libp2pOptions {
DHT?: boolean
}

export async function createLibp2pNode (options: NodeOptions = {}): Promise<Libp2p<{ dht: DualKadDHT }>> {
export async function createLibp2pNode (options: NodeOptions = {}): Promise<Libp2p<{ dht: KadDHT }>> {
const services: ServiceMap = {
identify: identify()
}

if (options.DHT === true) {
services.dht = kadDHT({
protocol: '/ipfs/lan/kad/1.0.0',
peerInfoMapper: removePublicAddressesMapper,
clientMode: false
})
}

const node = await createLibp2p<{ dht: DualKadDHT }>(defaultsDeep({
const node = await createLibp2p<{ dht: KadDHT }>(defaultsDeep({
peerId: await createEd25519PeerId(),
addresses: {
listen: ['/ip4/0.0.0.0/tcp/0']
Expand All @@ -33,7 +35,7 @@ export async function createLibp2pNode (options: NodeOptions = {}): Promise<Libp
tcp()
],
streamMuxers: [
mplex()
yamux()
],
connectionEncryption: [
noise()
Expand Down

0 comments on commit 243dc1a

Please sign in to comment.