@live-change/db 0.5.4 → 0.5.5

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.
package/lib/Index.js CHANGED
@@ -38,7 +38,7 @@ class RangeReader extends ChangeStream {
38
38
  this.tableReader.rangeTree.insert(...this.rangeDescr, this )
39
39
  this.callbacks = []
40
40
  }
41
- onChange(cb) {
41
+ async onChange(cb) {
42
42
  this.callbacks.push(cb)
43
43
  }
44
44
  async change(obj, oldObj, id, timestamp) {
package/lib/queryGet.js CHANGED
@@ -37,7 +37,7 @@ class RangeReader extends ChangeStream {
37
37
  }
38
38
  async onChange(cb) {
39
39
  const now = this.#time()
40
- let objects = await (await this.#table).rangeGet(this.#range)
40
+ const objects = await (await this.#table).rangeGet(this.#range)
41
41
  await Promise.all(objects.map(object => cb(object, null, object.id, now)))
42
42
  }
43
43
  unobserve(obs) {}
@@ -232,7 +232,6 @@ class QueryReader {
232
232
  } else {
233
233
  reader.dispose()
234
234
  }
235
-
236
235
  }
237
236
  }
238
237
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/db",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "Database with observable data for live queries",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,18 +21,18 @@
21
21
  },
22
22
  "homepage": "https://github.com/live-change/live-change-db",
23
23
  "devDependencies": {
24
- "@live-change/db-store-level": "^0.5.4",
25
- "@live-change/db-store-lmdb": "^0.5.4",
24
+ "@live-change/db-store-level": "^0.5.5",
25
+ "@live-change/db-store-lmdb": "^0.5.5",
26
26
  "minimist": ">=1.2.3",
27
27
  "rimraf": "^3.0.2",
28
- "sockjs": "^0.3.21",
29
- "tape": "^4.13.3",
28
+ "sockjs": "^0.3.24",
29
+ "tape": "^5.3.2",
30
30
  "websocket-extensions": ">=0.1.4"
31
31
  },
32
32
  "dependencies": {
33
- "@live-change/dao": "^0.3.3",
33
+ "@live-change/dao": "0.4.6",
34
34
  "get-random-values": "^1.2.2",
35
35
  "node-interval-tree": "^1.3.3"
36
36
  },
37
- "gitHead": "0dfd0cb953fad982630808934326d00abea2c2b4"
37
+ "gitHead": "bffe88c30f0f0ad2ddbf10308ab8e70b93e4581e"
38
38
  }