@nxtedition/rocksdb 5.2.29 → 5.2.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/binding.cc CHANGED
@@ -177,9 +177,20 @@ static std::optional<std::string> RangeOption(napi_env env, napi_value opts, con
177
177
  }
178
178
 
179
179
  static napi_status CallFunction(napi_env env, napi_value callback, const int argc, napi_value* argv) {
180
+ napi_status status;
180
181
  napi_value global;
181
- napi_get_global(env, &global);
182
- return napi_call_function(env, global, callback, argc, argv, nullptr);
182
+
183
+ status = napi_get_global(env, &global);
184
+ if (status != napi_ok) {
185
+ return status;
186
+ }
187
+
188
+ status = napi_call_function(env, global, callback, argc, argv, nullptr);
189
+ if (status != napi_ok) {
190
+ return status;
191
+ }
192
+
193
+ return napi_ok;
183
194
  }
184
195
 
185
196
  static napi_value ToError(napi_env env, const rocksdb::Status& status) {
@@ -209,11 +220,11 @@ static napi_value ToError(napi_env env, const rocksdb::Status& status) {
209
220
  }
210
221
 
211
222
  template <typename T>
212
- void Convert(napi_env env, const T& s, bool asBuffer, napi_value& result) {
223
+ napi_status Convert(napi_env env, const T& s, bool asBuffer, napi_value& result) {
213
224
  if (asBuffer) {
214
- napi_create_buffer_copy(env, s.size(), s.data(), nullptr, &result);
225
+ return napi_create_buffer_copy(env, s.size(), s.data(), nullptr, &result);
215
226
  } else {
216
- napi_create_string_utf8(env, s.data(), s.size(), &result);
227
+ return napi_create_string_utf8(env, s.data(), s.size(), &result);
217
228
  }
218
229
  }
219
230
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/rocksdb",
3
- "version": "5.2.29",
3
+ "version": "5.2.34",
4
4
  "description": "A low-level Node.js RocksDB binding",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -12,17 +12,17 @@
12
12
  "test-prebuild": "cross-env PREBUILDS_ONLY=1 npm t",
13
13
  "coverage": "nyc report -r lcovonly",
14
14
  "rebuild": "npm run install --build-from-source",
15
- "prebuild": "prebuildify -t 18.0.0 --napi --strip",
15
+ "prebuild": "prebuildify -t -t 17.8.0 --napi --strip",
16
16
  "download-prebuilds": "prebuildify-ci download",
17
17
  "hallmark": "hallmark --fix",
18
18
  "dependency-check": "dependency-check --no-dev -i napi-macros . test/*.js",
19
19
  "prepublishOnly": "npm run dependency-check",
20
- "prebuild-linux-arm": "prebuildify-cross -i linux-armv6 -i linux-armv7 -i linux-arm64 -t 18.0.0 --napi --strip",
21
- "prebuild-android-arm": "prebuildify-cross -i android-armv7 -i android-arm64 -t 18.0.0 --napi --strip",
22
- "prebuild-linux-x64": "prebuildify-cross -i centos7-devtoolset7 -i alpine -t 18.0.0 --napi --strip",
23
- "prebuild-darwin-x64+arm64": "prebuildify -t 18.0.0 --napi --strip --arch x64+arm64",
24
- "prebuild-win32-x86": "prebuildify -t 18.0.0 --napi --strip",
25
- "prebuild-win32-x64": "prebuildify -t 18.0.0 --napi --strip"
20
+ "prebuild-linux-arm": "prebuildify-cross -i linux-armv6 -i linux-armv7 -i linux-arm64 -t -t 17.8.0 --napi --strip",
21
+ "prebuild-android-arm": "prebuildify-cross -i android-armv7 -i android-arm64 -t -t 17.8.0 --napi --strip",
22
+ "prebuild-linux-x64": "prebuildify-cross -i centos7-devtoolset7 -i alpine -t -t 17.8.0 --napi --strip",
23
+ "prebuild-darwin-x64+arm64": "prebuildify -t -t 17.8.0 --napi --strip --arch x64+arm64",
24
+ "prebuild-win32-x86": "prebuildify -t -t 17.8.0 --napi --strip",
25
+ "prebuild-win32-x64": "prebuildify -t -t 17.8.0 --napi --strip"
26
26
  },
27
27
  "dependencies": {
28
28
  "abstract-level": "^1.0.2",
Binary file
Binary file