Skip to content

Commit 83734ef

Browse files
authoredSep 24, 2021
chore: update datastore (#990)
`interface-datastore` now only contains the interface definition, `datastore-core` has the various implementations. BREAKING CHANGE: datastore implementations provided to libp2p must be compliant with interface-datastore@6.0.0
1 parent 1c2e4d8 commit 83734ef

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
lines changed
 

‎package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"es6-promisify": "^7.0.0",
9292
"events": "^3.3.0",
9393
"hashlru": "^2.3.0",
94-
"interface-datastore": "^5.1.1",
94+
"interface-datastore": "^6.0.2",
9595
"it-all": "^1.0.4",
9696
"it-buffer": "^0.1.2",
9797
"it-drain": "^1.0.3",
@@ -139,6 +139,7 @@
139139
"@types/varint": "^6.0.0",
140140
"aegir": "^33.1.1",
141141
"buffer": "^6.0.3",
142+
"datastore-core": "^6.0.7",
142143
"delay": "^5.0.0",
143144
"interop-libp2p": "^0.4.0",
144145
"into-stream": "^7.0.0",

‎src/keychain/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const log = Object.assign(debug('libp2p:keychain'), {
77
const sanitize = require('sanitize-filename')
88
const mergeOptions = require('merge-options')
99
const crypto = require('libp2p-crypto')
10-
const { Key } = require('interface-datastore')
10+
const { Key } = require('interface-datastore/key')
1111
const CMS = require('./cms')
1212
const errcode = require('err-code')
1313
const { toString: uint8ArrayToString } = require('uint8arrays/to-string')

‎src/peer-store/persistent/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const debug = require('debug')
44
const log = Object.assign(debug('libp2p:persistent-peer-store'), {
55
error: debug('libp2p:persistent-peer-store:err')
66
})
7-
const { Key } = require('interface-datastore')
7+
const { Key } = require('interface-datastore/key')
88
const { Multiaddr } = require('multiaddr')
99
const PeerId = require('peer-id')
1010
const { base32 } = require('multiformats/bases/base32')

‎test/keychain/cms-interop.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
const { expect } = require('aegir/utils/chai')
66
const { fromString: uint8ArrayFromString } = require('uint8arrays/from-string')
77
const { toString: uint8ArrayToString } = require('uint8arrays/to-string')
8-
const { MemoryDatastore } = require('interface-datastore')
8+
const { MemoryDatastore } = require('datastore-core/memory')
99
const Keychain = require('../../src/keychain')
1010

1111
describe('cms interop', () => {

‎test/keychain/keychain.spec.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ const { toString: uint8ArrayToString } = require('uint8arrays/to-string')
99

1010
const peerUtils = require('../utils/creators/peer')
1111

12-
const { MemoryDatastore, Key } = require('interface-datastore')
12+
const { Key } = require('interface-datastore/key')
13+
const { MemoryDatastore } = require('datastore-core/memory')
1314
const Keychain = require('../../src/keychain')
1415
const PeerId = require('peer-id')
1516
const crypto = require('libp2p-crypto')

‎test/peer-store/persisted-peer-store.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const PeerRecord = require('../../src/record/peer-record')
99
const PeerStore = require('../../src/peer-store/persistent')
1010

1111
const { Multiaddr } = require('multiaddr')
12-
const { MemoryDatastore } = require('interface-datastore')
12+
const { MemoryDatastore } = require('datastore-core/memory')
1313
const { fromString: uint8ArrayFromString } = require('uint8arrays/from-string')
1414

1515
const peerUtils = require('../utils/creators/peer')

0 commit comments

Comments
 (0)
Please sign in to comment.