updates for node 12

This commit is contained in:
ptaylor 2019-08-05 13:22:05 -07:00
parent 1fb87351a5
commit 91732dd208
6 changed files with 6 additions and 6 deletions

View File

@ -4,6 +4,6 @@
"private": true, "private": true,
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"addon-tools-raub": "https://github.com/node-3d/addon-tools-raub.git" "addon-tools-raub": "1.0.0"
} }
} }

View File

@ -4,6 +4,6 @@
"private": true, "private": true,
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"addon-tools-raub": "https://github.com/node-3d/addon-tools-raub.git" "addon-tools-raub": "1.0.0"
} }
} }

View File

@ -276,7 +276,7 @@ inline void *getData(V8_VAR_OBJ obj) {
if (obj->IsArrayBufferView()) { if (obj->IsArrayBufferView()) {
pixels = getArrayData<unsigned char>(obj); pixels = getArrayData<unsigned char>(obj);
} else if (obj->Has(JS_STR("data"))) { } else if (obj->Has(Nan::GetCurrentContext(), JS_STR("data")).ToChecked()) {
V8_VAR_VAL data = Nan::Get(obj, JS_STR("data")).ToLocalChecked(); V8_VAR_VAL data = Nan::Get(obj, JS_STR("data")).ToLocalChecked();
if ( ! data->IsNullOrUndefined() ) { if ( ! data->IsNullOrUndefined() ) {
pixels = node::Buffer::Data(data); pixels = node::Buffer::Data(data);

View File

@ -212,7 +212,7 @@ private:
REQ_OBJ_ARG(0, event); REQ_OBJ_ARG(0, event);
if ( ! event->Has(JS_STR("type")) ) { if ( ! event->Has(Nan::GetCurrentContext(), JS_STR("type")).ToChecked() ) {
return Nan::ThrowError("Event must have the `type` property."); return Nan::ThrowError("Event must have the `type` property.");
} }

View File

@ -34,6 +34,6 @@
"url": "https://github.com/node-3d/addon-tools-raub.git" "url": "https://github.com/node-3d/addon-tools-raub.git"
}, },
"dependencies": { "dependencies": {
"nan": "2.12.1" "nan": "2.14.0"
} }
} }

View File

@ -8,7 +8,7 @@
"start": "mocha" "start": "mocha"
}, },
"dependencies": { "dependencies": {
"addon-tools-raub": "https://github.com/node-3d/addon-tools-raub.git", "addon-tools-raub": "1.0.0",
"chai": "^4.2.0", "chai": "^4.2.0",
"mocha": "^5.2.0", "mocha": "^5.2.0",
"sinon": "^7.1.1" "sinon": "^7.1.1"