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

Commit

Permalink
fix: restore default level-js options (#3779)
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Jul 30, 2021
1 parent bf23e48 commit 8380d71
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/ipfs-core/package.json
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
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

0 comments on commit 8380d71

Please sign in to comment.