Skip to content

Commit

Permalink
Upgrade napi-macros from ~1.8.1 to ~2.0.0 (facebook#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
vweevers authored Aug 11, 2019
1 parent 02076e3 commit 2815ef3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,12 @@ struct BaseWorker {
napi_value callback,
const char* resourceName)
: env_(env), database_(database), errMsg_(NULL) {
NAPI_STATUS_THROWS(napi_create_reference(env_, callback, 1, &callbackRef_));
NAPI_STATUS_THROWS_VOID(napi_create_reference(env_, callback, 1, &callbackRef_));
napi_value asyncResourceName;
NAPI_STATUS_THROWS(napi_create_string_utf8(env_, resourceName,
NAPI_STATUS_THROWS_VOID(napi_create_string_utf8(env_, resourceName,
NAPI_AUTO_LENGTH,
&asyncResourceName));
NAPI_STATUS_THROWS(napi_create_async_work(env_, callback,
NAPI_STATUS_THROWS_VOID(napi_create_async_work(env_, callback,
asyncResourceName,
BaseWorker::Execute,
BaseWorker::Complete,
Expand Down Expand Up @@ -1846,7 +1846,7 @@ struct BatchWriteWorker final : public PriorityWorker {
batch_(batch),
sync_(sync) {
// Prevent GC of batch object before we execute
NAPI_STATUS_THROWS(napi_create_reference(env_, context, 1, &contextRef_));
NAPI_STATUS_THROWS_VOID(napi_create_reference(env_, context, 1, &contextRef_));
}

~BatchWriteWorker () {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"test-electron": "electron test/electron.js",
"test-prebuild": "cross-env PREBUILDS_ONLY=1 npm t",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"rebuild": "node-gyp rebuild",
"rebuild": "npm run install --build-from-source",
"prebuild": "prebuildify -t 8.14.0 --napi --strip",
"download-prebuilds": "prebuildify-ci download",
"hallmark": "hallmark --fix",
Expand All @@ -21,7 +21,7 @@
"dependencies": {
"abstract-leveldown": "~6.0.3",
"fast-future": "~1.0.2",
"napi-macros": "~1.8.2",
"napi-macros": "~2.0.0",
"node-gyp-build": "~4.1.0"
},
"devDependencies": {
Expand Down

0 comments on commit 2815ef3

Please sign in to comment.