Skip to content

Commit

Permalink
Bump levelup to fix API parity with abstract-leveldown
Browse files Browse the repository at this point in the history
  • Loading branch information
vweevers committed Oct 2, 2021
1 parent 4ed83e6 commit bd73ace
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
10 changes: 1 addition & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,5 @@ module.exports = function (db, prefix, opts) {
if (typeof prefix === 'object' && !opts) return module.exports(db, null, prefix)
if (!opts) opts = {}

const wrapped = levelup(encoding(subdown(db, prefix, opts), opts), opts)

// Workaround for abstract-leveldown tests that expect db._nextTick
// TODO: fix tests or add _nextTick to levelup for API parity
if (!wrapped._nextTick) {
wrapped._nextTick = subdown.prototype._nextTick
}

return wrapped
return levelup(encoding(subdown(db, prefix, opts), opts), opts)
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"encoding-down": "^7.1.0",
"inherits": "^2.0.3",
"level-option-wrap": "^1.1.0",
"levelup": "^5.1.0",
"levelup": "^5.1.1",
"reachdown": "^1.1.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ suite({
// Adapt for levelup
deferredOpen: true,
promises: true,
status: false,
status: true,
serialize: false,
encodings: true
})
Expand Down

0 comments on commit bd73ace

Please sign in to comment.