@ocap/statedb-fs 1.18.32 → 1.18.34
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/table/base.js +3 -2
- package/package.json +5 -4
package/lib/table/base.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* eslint-disable no-underscore-dangle */
|
|
2
2
|
const path = require('path');
|
|
3
|
+
const omit = require('lodash/omit');
|
|
3
4
|
const { StateDBTable } = require('@ocap/statedb');
|
|
4
5
|
const Lokijs = require('lokijs');
|
|
5
6
|
const FsAdapter = require('lokijs/src/loki-fs-structured-adapter');
|
|
@@ -71,10 +72,10 @@ class FsTable extends StateDBTable {
|
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
if (exist) {
|
|
74
|
-
return this.update(state[this.uniqIndex], state, ctx);
|
|
75
|
+
return this.update(state[this.uniqIndex], omit(state, [this.uniqIndex]), ctx);
|
|
75
76
|
}
|
|
76
77
|
|
|
77
|
-
return this.create(state[this.uniqIndex], state, ctx);
|
|
78
|
+
return this.create(state[this.uniqIndex], omit(state, [this.uniqIndex]), ctx);
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
_reset() {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ocap/statedb-fs",
|
|
3
3
|
"description": "OCAP statedb adapter that uses fs as backend",
|
|
4
|
-
"version": "1.18.
|
|
4
|
+
"version": "1.18.34",
|
|
5
5
|
"author": "wangshijun <shijun@arcblock.io> (https://www.arcblock.io)",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/ArcBlock/asset-chain/issues",
|
|
@@ -37,10 +37,11 @@
|
|
|
37
37
|
"test": "jest --forceExit --detectOpenHandles",
|
|
38
38
|
"coverage": "npm run test -- --coverage & exit 0"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "c12d3cbf9617d861d83c08726d9e0d55fdf9a459",
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@ocap/state": "1.18.
|
|
43
|
-
"@ocap/statedb": "1.18.
|
|
42
|
+
"@ocap/state": "1.18.34",
|
|
43
|
+
"@ocap/statedb": "1.18.34",
|
|
44
|
+
"@ocap/util": "1.18.34",
|
|
44
45
|
"debug": "^4.3.4",
|
|
45
46
|
"lodash": "^4.17.21",
|
|
46
47
|
"lokijs": "^1.5.12"
|