Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Aug 24, 2023
1 parent a7ab180 commit 6ed7289
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 41 deletions.
28 changes: 13 additions & 15 deletions packages/interop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,22 @@
"test:electron-main": "aegir test -t electron-main"
},
"devDependencies": {
"@chainsafe/libp2p-gossipsub": "^8.0.0",
"@chainsafe/libp2p-noise": "^12.0.1",
"@chainsafe/libp2p-yamux": "^4.0.2",
"@helia/interface": "^1.0.0",
"@chainsafe/libp2p-gossipsub": "^10.1.0",
"@chainsafe/libp2p-noise": "^13.0.0",
"@chainsafe/libp2p-yamux": "^5.0.0",
"@helia/interface": "^2.0.0",
"@helia/ipns": "^1.0.0",
"@libp2p/interface-libp2p": "^3.2.0",
"@libp2p/interface-peer-id": "^2.0.1",
"@libp2p/interface-pubsub": "^4.0.1",
"@libp2p/kad-dht": "^9.3.4",
"@libp2p/peer-id": "^2.0.1",
"@libp2p/peer-id-factory": "^2.0.1",
"@libp2p/tcp": "^7.0.1",
"@libp2p/websockets": "^6.0.1",
"@libp2p/interface": "^0.1.2",
"@libp2p/kad-dht": "^10.0.4",
"@libp2p/peer-id": "^3.0.2",
"@libp2p/peer-id-factory": "^3.0.3",
"@libp2p/tcp": "^8.0.4",
"@libp2p/websockets": "^7.0.4",
"aegir": "^40.0.8",
"blockstore-core": "^4.0.1",
"datastore-core": "^9.0.3",
"go-ipfs": "^0.20.0",
"helia": "^1.0.0",
"go-ipfs": "^0.22.0",
"helia": "^2.0.1",
"ipfsd-ctl": "^13.0.0",
"ipns": "^6.0.0",
"it-all": "^3.0.2",
Expand All @@ -74,7 +72,7 @@
"kubo-rpc-client": "^3.0.0",
"libp2p": "^0.46.6",
"merge-options": "^3.0.4",
"multiformats": "^11.0.1",
"multiformats": "^12.0.1",
"uint8arrays": "^4.0.3",
"wherearewe": "^2.0.1"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/interop/test/dht.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { ipns } from '@helia/ipns'
import { dht } from '@helia/ipns/routing'
import { type KadDHT, kadDHT } from '@libp2p/kad-dht'
import { kadDHT, type DualKadDHT } from '@libp2p/kad-dht'
import { createEd25519PeerId, createRSAPeerId, createSecp256k1PeerId } from '@libp2p/peer-id-factory'
import { expect } from 'aegir/chai'
import { ipnsSelector } from 'ipns/selector'
Expand All @@ -23,13 +23,13 @@ import { keyTypes } from './fixtures/key-types.js'
import { waitFor } from './fixtures/wait-for.js'
import type { Helia } from '@helia/interface'
import type { IPNS } from '@helia/ipns'
import type { Libp2p } from '@libp2p/interface-libp2p'
import type { Libp2p } from '@libp2p/interface'
import type { Controller } from 'ipfsd-ctl'
import type { PeerId } from 'kubo-rpc-client/dist/src/types.js'

keyTypes.forEach(type => {
describe(`dht routing with ${type} keys`, () => {
let helia: Helia<Libp2p<{ dht: KadDHT }>>
let helia: Helia<Libp2p<{ dht: DualKadDHT }>>
let kubo: Controller
let name: IPNS

Expand Down
2 changes: 1 addition & 1 deletion packages/interop/test/fixtures/create-helia.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { MemoryDatastore } from 'datastore-core'
import { createHelia } from 'helia'
import { createLibp2p, type Libp2pOptions } from 'libp2p'
import type { Helia } from '@helia/interface'
import type { Libp2p } from '@libp2p/interface-libp2p'
import type { Libp2p } from '@libp2p/interface'

export async function createHeliaNode <T extends { identify: any }> (config: Libp2pOptions<T> = {}): Promise<Helia<Libp2p<T>>> {
const blockstore = new MemoryBlockstore()
Expand Down
2 changes: 1 addition & 1 deletion packages/interop/test/fixtures/create-peer-ids.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import map from 'it-map'
import { sha256 } from 'multiformats/hashes/sha2'
import { compare as uint8ArrayCompare } from 'uint8arrays/compare'
import { xor as uint8ArrayXor } from 'uint8arrays/xor'
import type { PeerId } from '@libp2p/interface-peer-id'
import type { PeerId } from '@libp2p/interface/peer-id'

/**
* Sort peers by distance to the KadID of the passed buffer
Expand Down
2 changes: 1 addition & 1 deletion packages/interop/test/fixtures/key-types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { PeerIdType } from '@libp2p/interface-peer-id'
import type { PeerIdType } from '@libp2p/interface/peer-id'

export const keyTypes: PeerIdType[] = [
'Ed25519',
Expand Down
2 changes: 1 addition & 1 deletion packages/interop/test/pubsub.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { keyTypes } from './fixtures/key-types.js'
import { waitFor } from './fixtures/wait-for.js'
import type { Helia } from '@helia/interface'
import type { IPNS } from '@helia/ipns'
import type { PubSub } from '@libp2p/interface-pubsub'
import type { PubSub } from '@libp2p/interface/pubsub'
import type { Controller } from 'ipfsd-ctl'
import type { Libp2p } from 'libp2p'

Expand Down
13 changes: 5 additions & 8 deletions packages/ipns/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,24 +155,21 @@
"release": "aegir release"
},
"dependencies": {
"@libp2p/interface-content-routing": "^2.1.0",
"@libp2p/interface-peer-id": "^2.0.1",
"@libp2p/interface-pubsub": "^4.0.1",
"@libp2p/interfaces": "^3.3.1",
"@libp2p/logger": "^2.0.6",
"@libp2p/peer-id": "^2.0.1",
"@libp2p/interface": "^0.1.2",
"@libp2p/logger": "^3.0.2",
"@libp2p/peer-id": "^3.0.2",
"@libp2p/record": "^3.0.0",
"hashlru": "^2.3.0",
"interface-datastore": "^8.0.0",
"ipns": "^6.0.0",
"is-ipfs": "^8.0.1",
"multiformats": "^11.0.1",
"multiformats": "^12.0.1",
"p-queue": "^7.3.0",
"progress-events": "^1.0.0",
"uint8arrays": "^4.0.3"
},
"devDependencies": {
"@libp2p/peer-id-factory": "^2.0.1",
"@libp2p/peer-id-factory": "^3.0.3",
"aegir": "^40.0.8",
"datastore-core": "^9.0.3",
"sinon": "^15.0.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/ipns/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
* ```
*/

import { isPeerId, type PeerId } from '@libp2p/interface-peer-id'
import { CodeError } from '@libp2p/interfaces/errors'
import { isPeerId, type PeerId } from '@libp2p/interface/peer-id'
import { CodeError } from '@libp2p/interface/errors'
import { logger } from '@libp2p/logger'
import { peerIdFromString } from '@libp2p/peer-id'
import { create, marshal, peerIdToRoutingKey, unmarshal } from 'ipns'
Expand All @@ -76,7 +76,7 @@ import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
import { localStore, type LocalStore } from './routing/local-store.js'
import { resolveDnslink } from './utils/resolve-dns-link.js'
import type { IPNSRouting, IPNSRoutingEvents } from './routing/index.js'
import type { AbortOptions } from '@libp2p/interfaces'
import type { AbortOptions } from '@libp2p/interface'
import type { Datastore } from 'interface-datastore'
import type { IPNSEntry } from 'ipns'
import type { ProgressEvent, ProgressOptions } from 'progress-events'
Expand Down
2 changes: 1 addition & 1 deletion packages/ipns/src/routing/dht.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CustomProgressEvent, type ProgressEvent } from 'progress-events'
import type { GetOptions, PutOptions } from './index.js'
import type { IPNSRouting } from '../index.js'
import type { ContentRouting } from '@libp2p/interface-content-routing'
import type { ContentRouting } from '@libp2p/interface/content-routing'

export interface DHTRoutingComponents {
libp2p: {
Expand Down
2 changes: 1 addition & 1 deletion packages/ipns/src/routing/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { DHTProgressEvents } from './dht.js'
import type { DatastoreProgressEvents } from './local-store.js'
import type { PubSubProgressEvents } from './pubsub.js'
import type { AbortOptions } from '@libp2p/interfaces'
import type { AbortOptions } from '@libp2p/interface'
import type { ProgressOptions } from 'progress-events'

export interface PutOptions extends AbortOptions, ProgressOptions {
Expand Down
2 changes: 1 addition & 1 deletion packages/ipns/src/routing/local-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { type Datastore, Key } from 'interface-datastore'
import { CustomProgressEvent, type ProgressEvent } from 'progress-events'
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
import type { GetOptions, IPNSRouting, PutOptions } from '../routing'
import type { AbortOptions } from '@libp2p/interfaces'
import type { AbortOptions } from '@libp2p/interface'

function dhtRoutingKey (key: Uint8Array): Key {
return new Key('/dht/record/' + uint8ArrayToString(key, 'base32'), false)
Expand Down
6 changes: 3 additions & 3 deletions packages/ipns/src/routing/pubsub.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CodeError } from '@libp2p/interfaces/errors'
import { CodeError } from '@libp2p/interface/errors'
import { logger } from '@libp2p/logger'
import { peerIdToRoutingKey } from 'ipns'
import { ipnsSelector } from 'ipns/selector'
Expand All @@ -9,8 +9,8 @@ import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
import { localStore, type LocalStore } from './local-store.js'
import type { GetOptions, IPNSRouting, PutOptions } from './index.js'
import type { PeerId } from '@libp2p/interface-peer-id'
import type { Message, PublishResult, PubSub } from '@libp2p/interface-pubsub'
import type { PeerId } from '@libp2p/interface/peer-id'
import type { Message, PublishResult, PubSub } from '@libp2p/interface/pubsub'
import type { Datastore } from 'interface-datastore'

const log = logger('helia:ipns:routing:pubsub')
Expand Down
2 changes: 1 addition & 1 deletion packages/ipns/src/utils/resolve-dns-link.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import PQueue from 'p-queue'
import { TLRU } from './tlru.js'
import type { AbortOptions } from '@libp2p/interfaces'
import type { AbortOptions } from '@libp2p/interface'

// Avoid sending multiple queries for the same hostname by caching results
const cache = new TLRU<{ Path: string, Message: string }>(1000)
Expand Down
2 changes: 1 addition & 1 deletion packages/ipns/src/utils/resolve-dns-link.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import dns from 'dns'
import { promisify } from 'util'
import * as isIPFS from 'is-ipfs'
import type { AbortOptions } from '@libp2p/interfaces'
import type { AbortOptions } from '@libp2p/interface'

const MAX_RECURSIVE_DEPTH = 32

Expand Down

0 comments on commit 6ed7289

Please sign in to comment.