Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Add support for Node 12 #81

Merged
merged 8 commits into from
May 27, 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: 3 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ env:
- TRAVIS_NODE_VERSION="6" ARCH="x86"
- BINARY_BUILDER="true" TRAVIS_NODE_VERSION="8"
- BINARY_BUILDER="true" TRAVIS_NODE_VERSION="8" ARCH="x86"
- BINARY_BUILDER="true" TRAVIS_NODE_VERSION="10"
- BINARY_BUILDER="true" TRAVIS_NODE_VERSION="12"
matrix:
exclude:
- os: osx
Expand Down Expand Up @@ -54,10 +56,6 @@ before_install:
fi;
- $CXX --version

# Cleanup the output of npm
- npm config set progress false
- npm config set spin false

# print versions
- uname -a
- which node; file `which node`
Expand All @@ -74,7 +72,7 @@ before_install:

install:
# ensure source install works
- npm install --build-from-source
- npm install --build-from-source --no-progress

script:
# Tests are disabled until we have tests which are suitable for CI and don't require manual interaction.
Expand Down
2 changes: 2 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ environment:
- nodejs_version: "6"
- binary_builder: "true"
nodejs_version: "8"
- binary_builder: "true"
nodejs_version: "10"

platform:
- x86
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"dependencies": {
"bindings": "^1.3.0",
"eventemitter2": "^5.0.1",
"nan": "^2.10.0",
"nan": "^2.13.2",
"prebuild-install": "^5.1.0"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions src/detection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ void Find(const Nan::FunctionCallbackInfo<v8::Value>& args) {

if (args.Length() == 3) {
if (args[0]->IsNumber() && args[1]->IsNumber()) {
vid = (int) args[0]->NumberValue();
pid = (int) args[1]->NumberValue();
vid = (int) Nan::To<int>(args[0]).FromJust();
pid = (int) Nan::To<int>(args[1]).FromJust();
}

// callback
Expand All @@ -133,7 +133,7 @@ void Find(const Nan::FunctionCallbackInfo<v8::Value>& args) {

if (args.Length() == 2) {
if (args[0]->IsNumber()) {
vid = (int) args[0]->NumberValue();
vid = (int) Nan::To<int>(args[0]).FromJust();
}

// callback
Expand Down Expand Up @@ -210,7 +210,7 @@ void StopMonitoring(const Nan::FunctionCallbackInfo<v8::Value>& args) {
}

extern "C" {
void init (v8::Handle<v8::Object> target) {
void init (v8::Local<v8::Object> target) {
Nan::SetMethod(target, "find", Find);
Nan::SetMethod(target, "registerAdded", RegisterAdded);
Nan::SetMethod(target, "registerRemoved", RegisterRemoved);
Expand Down