Skip to content

Commit

Permalink
deps!: update libp2p deps to v1 (#299)
Browse files Browse the repository at this point in the history
Updates all libp2p deps

BREAKING CHANGE: requires libp2p v1 or later
  • Loading branch information
achingbrain authored Dec 30, 2023
1 parent 4f520b1 commit 5ae5b93
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 18 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,22 +166,22 @@
"docs:no-publish": "NODE_OPTIONS=--max_old_space_size=8192 aegir docs --publish false"
},
"dependencies": {
"@libp2p/crypto": "^2.0.3",
"@libp2p/interface": "^0.1.2",
"@libp2p/logger": "^3.0.2",
"@libp2p/peer-id": "^3.0.2",
"@libp2p/crypto": "^3.0.3",
"@libp2p/interface": "^1.1.0",
"@libp2p/logger": "^4.0.3",
"@libp2p/peer-id": "^4.0.3",
"cborg": "^4.0.1",
"err-code": "^3.0.1",
"interface-datastore": "^8.1.0",
"multiformats": "^12.0.1",
"protons-runtime": "^5.0.0",
"multiformats": "^13.0.0",
"protons-runtime": "^5.2.1",
"timestamp-nano": "^1.0.0",
"uint8arraylist": "^2.4.3",
"uint8arraylist": "^2.4.8",
"uint8arrays": "^5.0.1"
},
"devDependencies": {
"@libp2p/peer-id-factory": "^3.0.3",
"aegir": "^40.0.11",
"protons": "^7.0.2"
"@libp2p/peer-id-factory": "^4.0.2",
"aegir": "^41.3.5",
"protons": "^7.3.3"
}
}
3 changes: 1 addition & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
import * as ERRORS from './errors.js'
import { IpnsEntry } from './pb/ipns.js'
import { createCborData, ipnsRecordDataForV1Sig, ipnsRecordDataForV2Sig, normalizeValue } from './utils.js'
import type { PrivateKey } from '@libp2p/interface/keys'
import type { PeerId } from '@libp2p/interface/peer-id'
import type { PrivateKey, PeerId } from '@libp2p/interface'
import type { CID } from 'multiformats/cid'

const log = logger('ipns')
Expand Down
4 changes: 2 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { unmarshalPublicKey } from '@libp2p/crypto/keys'
import { isPeerId, type PeerId } from '@libp2p/interface/peer-id'
import { isPeerId } from '@libp2p/interface'
import { logger } from '@libp2p/logger'
import { peerIdFromBytes, peerIdFromKeys } from '@libp2p/peer-id'
import * as cborg from 'cborg'
Expand All @@ -14,7 +14,7 @@ import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
import * as ERRORS from './errors.js'
import { IpnsEntry } from './pb/ipns.js'
import type { IPNSRecord, IPNSRecordV2, IPNSRecordData } from './index.js'
import type { PublicKey } from '@libp2p/interface/keys'
import type { PublicKey, PeerId } from '@libp2p/interface'

const log = logger('ipns:utils')
const IPNS_PREFIX = uint8ArrayFromString('/ipns/')
Expand Down
2 changes: 1 addition & 1 deletion src/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import errCode from 'err-code'
import * as ERRORS from './errors.js'
import { IpnsEntry } from './pb/ipns.js'
import { extractPublicKey, ipnsRecordDataForV2Sig, unmarshal, peerIdFromRoutingKey } from './utils.js'
import type { PublicKey } from '@libp2p/interface/keys'
import type { PublicKey } from '@libp2p/interface'

const log = logger('ipns:validator')

Expand Down
2 changes: 1 addition & 1 deletion test/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import * as ipns from '../src/index.js'
import { IpnsEntry } from '../src/pb/ipns.js'
import { extractPublicKey, peerIdToRoutingKey, parseCborData, createCborData, ipnsRecordDataForV2Sig } from '../src/utils.js'
import { ipnsValidator } from '../src/validator.js'
import type { PeerId } from '@libp2p/interface/peer-id'
import type { PeerId } from '@libp2p/interface'

describe('ipns', function () {
this.timeout(20 * 1000)
Expand Down
2 changes: 1 addition & 1 deletion test/selector.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { expect } from 'aegir/chai'
import * as ipns from '../src/index.js'
import { ipnsSelector } from '../src/selector.js'
import { marshal, peerIdToRoutingKey } from '../src/utils.js'
import type { PeerId } from '@libp2p/interface/peer-id'
import type { PeerId } from '@libp2p/interface'

describe('selector', function () {
this.timeout(20 * 1000)
Expand Down
2 changes: 1 addition & 1 deletion test/validator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import * as ERRORS from '../src/errors.js'
import * as ipns from '../src/index.js'
import { marshal, peerIdToRoutingKey } from '../src/utils.js'
import { ipnsValidator } from '../src/validator.js'
import type { PeerId } from '@libp2p/interface/peer-id'
import type { PeerId } from '@libp2p/interface'

describe('validator', function () {
this.timeout(20 * 1000)
Expand Down

0 comments on commit 5ae5b93

Please sign in to comment.