From cfce6bb555af149295bc393b10039655ddaa945c Mon Sep 17 00:00:00 2001 From: Vincent Weevers Date: Sun, 11 Apr 2021 17:05:24 +0200 Subject: [PATCH] Breaking: remove Batch._levelup property In favor of Batch.db which matches the property on abstract-leveldown's chained batch interface. Unlikely to cause breakage because _levelup was a private and undocumented property. --- lib/batch.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/batch.js b/lib/batch.js index 59565c3e..bf931608 100644 --- a/lib/batch.js +++ b/lib/batch.js @@ -6,8 +6,7 @@ const getCallback = require('./common').getCallback const getOptions = require('./common').getOptions function Batch (levelup) { - // TODO (next major): remove this._levelup alias - this.db = this._levelup = levelup + this.db = levelup this.batch = levelup.db.batch() this.ops = [] this.length = 0 @@ -53,7 +52,7 @@ Batch.prototype.clear = function () { } Batch.prototype.write = function (options, callback) { - const levelup = this._levelup + const levelup = this.db const ops = this.ops callback = getCallback(options, callback)