hypercore-storage 2.0.2 → 2.0.3

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 +3 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -430,8 +430,6 @@ class CorestoreStorage {
430
430
  this.deviceFile = null
431
431
  this.wait = !!opts.wait
432
432
 
433
- const preopen = this._openDeviceFile()
434
-
435
433
  // tmp sync fix for simplicty since not super deployed yet
436
434
  if (this.bootstrap && !this.readOnly) tmpFixStorage(this.path)
437
435
 
@@ -442,11 +440,12 @@ class CorestoreStorage {
442
440
  this.flushing = null
443
441
  this.version = 0
444
442
  this.migrating = null
445
- this.preopen = preopen
446
443
 
444
+ const preopen = this._openDeviceFile()
445
+
446
+ this.preopen = preopen
447
447
  this.rocks =
448
448
  storage === null ? db : new RocksDB(path.join(this.path, 'db'), { ...opts, preopen })
449
-
450
449
  this.db = createColumnFamily(this.rocks, opts)
451
450
 
452
451
  preopen.catch(noop) // awaited in rocks
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore-storage",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "main": "index.js",
5
5
  "files": [
6
6
  "index.js",