@live-change/db 0.8.30 → 0.8.32

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/lib/Table.js +4 -2
  2. package/package.json +5 -5
package/lib/Table.js CHANGED
@@ -7,7 +7,7 @@ function opLogWritter(store) {
7
7
  let lastId = 0
8
8
  return function(operation) {
9
9
  const now = Date.now()
10
- if(now == lastTime) {
10
+ if(now === lastTime) {
11
11
  lastId ++
12
12
  } else {
13
13
  lastId = 0
@@ -77,7 +77,9 @@ class Table {
77
77
  }
78
78
 
79
79
  update(id, operations, options) {
80
- if(typeof id != 'string') throw new Error(`ID is not string: ${JSON.stringify(id)}`)
80
+ if(typeof id != 'string')
81
+ throw new Error(`ID is not string: ${JSON.stringify(id)} while updating table ` + this.name
82
+ + ' with ops' + JSON.stringify(operations))
81
83
  return this.atomicWriter.update(id, operations, options)
82
84
  }
83
85
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/db",
3
- "version": "0.8.30",
3
+ "version": "0.8.32",
4
4
  "description": "Database with observable data for live queries",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -22,8 +22,8 @@
22
22
  "type": "module",
23
23
  "homepage": "https://github.com/live-change/live-change-stack",
24
24
  "devDependencies": {
25
- "@live-change/db-store-level": "^0.8.30",
26
- "@live-change/db-store-lmdb": "^0.8.30",
25
+ "@live-change/db-store-level": "^0.8.32",
26
+ "@live-change/db-store-lmdb": "^0.8.32",
27
27
  "minimist": ">=1.2.3",
28
28
  "next-tick": "^1.1.0",
29
29
  "rimraf": "^5.0.5",
@@ -32,9 +32,9 @@
32
32
  "websocket-extensions": ">=0.1.4"
33
33
  },
34
34
  "dependencies": {
35
- "@live-change/dao": "^0.8.30",
35
+ "@live-change/dao": "^0.8.32",
36
36
  "get-random-values": "^1.2.2",
37
37
  "node-interval-tree": "^1.3.3"
38
38
  },
39
- "gitHead": "aec2a3ede7fe490dcb7db40ee6c2963cd0c62af1"
39
+ "gitHead": "9ea7767670a99404794087726223064c45d798d3"
40
40
  }