Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Upgrade napi-macros #132

Merged
merged 2 commits into from
Aug 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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