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

fix: restore default level-js options #3779

Merged
merged 2 commits into from
Jul 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/ipfs-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"blockstore-datastore-adapter": "1.0.0",
"datastore-core": "^5.0.1",
"datastore-fs": "^5.0.2",
"datastore-level": "^6.0.1",
"datastore-level": "^6.0.2",
"datastore-pubsub": "^0.7.0",
"debug": "^4.1.1",
"dlv": "^1.1.3",
Expand Down
25 changes: 20 additions & 5 deletions packages/ipfs-core/src/runtime/repo-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,28 @@ module.exports = (print, codecs, options) => {
const repoPath = options.path || 'ipfs'

return createRepo(repoPath, (codeOrName) => codecs.getCodec(codeOrName), {
root: new DatastoreLevel(repoPath),
root: new DatastoreLevel(repoPath, {
prefix: '',
version: 2
}),
blocks: new BlockstoreDatastoreAdapter(
new DatastoreLevel(`${repoPath}/blocks`)
new DatastoreLevel(`${repoPath}/blocks`, {
prefix: '',
version: 2
})
),
datastore: new DatastoreLevel(`${repoPath}/datastore`),
keys: new DatastoreLevel(`${repoPath}/keys`),
pins: new DatastoreLevel(`${repoPath}/pins`)
datastore: new DatastoreLevel(`${repoPath}/datastore`, {
prefix: '',
version: 2
}),
keys: new DatastoreLevel(`${repoPath}/keys`, {
prefix: '',
version: 2
}),
pins: new DatastoreLevel(`${repoPath}/pins`, {
prefix: '',
version: 2
})
}, {
autoMigrate: options.autoMigrate,
onMigrationProgress: options.onMigrationProgress || print
Expand Down