@nxtedition/rocksdb 7.1.32 → 7.1.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +9 -11
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -208,11 +208,7 @@ class RocksLevel extends AbstractLevel {
208
208
  this[kUnref]()
209
209
 
210
210
  if (!err) {
211
- this.emit('update', {
212
- rows: batch.toArray(),
213
- count: batch.length,
214
- sequence: sequence
215
- })
211
+ this.emit('update', { batch, sequence })
216
212
  }
217
213
 
218
214
  callback(err)
@@ -233,11 +229,7 @@ class RocksLevel extends AbstractLevel {
233
229
 
234
230
  // TODO (fix)
235
231
  // if (!err) {
236
- // this.emit('update', {
237
- // rows: batch.toArray(),
238
- // count: batch.length,
239
- // sequence: sequence
240
- // })
232
+ // this.emit('update', { batch, sequence })
241
233
  // }
242
234
 
243
235
  callback(err)
@@ -366,7 +358,13 @@ class RocksLevel extends AbstractLevel {
366
358
  objectMode: true,
367
359
  readableHighWaterMark: 8192,
368
360
  construct (callback) {
369
- this._next = (update) => {
361
+ this._next = ({ batch, sequence }) => {
362
+ const update = {
363
+ rows: batch.toArray(options),
364
+ count: batch.length,
365
+ sequence: sequence
366
+ }
367
+
370
368
  if (!this.push(update)) {
371
369
  this.push(null)
372
370
  db.off('update', this._next)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/rocksdb",
3
- "version": "7.1.32",
3
+ "version": "7.1.33",
4
4
  "description": "A low-level Node.js RocksDB binding",
5
5
  "license": "MIT",
6
6
  "main": "index.js",