hypercore-storage 3.1.0 → 3.1.1

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 +8 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1006,9 +1006,15 @@ class CorestoreStorage {
1006
1006
  return Promise.all(resultPromises)
1007
1007
  }
1008
1008
 
1009
- async suspend() {
1009
+ async suspend({ log = noop } = {}) {
1010
+ await log('Suspending hypercore storage...')
1010
1011
  await this.db.suspend()
1011
- if (this.deviceFile) await this.deviceFile.suspend()
1012
+ await log('db suspended')
1013
+ if (this.deviceFile) {
1014
+ await log('suspend deviceFile')
1015
+ await this.deviceFile.suspend()
1016
+ await log('deviceFile suspended')
1017
+ }
1012
1018
  }
1013
1019
 
1014
1020
  async resume() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore-storage",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "main": "index.js",
5
5
  "files": [
6
6
  "index.js",