rocksdb-native 3.6.2 → 3.6.4

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/CMakeLists.txt CHANGED
@@ -38,6 +38,12 @@ target_sources(
38
38
  binding.c
39
39
  )
40
40
 
41
+ target_compile_definitions(
42
+ ${rocksdb_native_napi}
43
+ PRIVATE
44
+ NAPI_VERSION=9
45
+ )
46
+
41
47
  target_link_libraries(
42
48
  ${rocksdb_native_napi}
43
49
  PRIVATE
package/lib/batch.js CHANGED
@@ -43,12 +43,13 @@ class RocksDBBatch {
43
43
  const resolve = this._resolve
44
44
  const reject = this._reject
45
45
 
46
+ if (this._request) this._db._state.io.dec()
47
+
46
48
  this._operations = []
47
49
  this._promises = []
48
50
  this._request = null
49
51
  this._resolve = null
50
52
  this._reject = null
51
- this._db._state.io.dec()
52
53
 
53
54
  if (this._autoDestroy === true) this.destroy()
54
55
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rocksdb-native",
3
- "version": "3.6.2",
3
+ "version": "3.6.4",
4
4
  "description": "librocksdb bindings for JavaScript",
5
5
  "exports": {
6
6
  ".": "./index.js",