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

Commit

Permalink
Add support for Node 12 (#81)
Browse files Browse the repository at this point in the history
We aren't using Node 12 from AppVeyor as it is not supported yet, appveyor/ci#2921
  • Loading branch information
kryops authored and MadLittleMods committed May 27, 2019
1 parent b6f7406 commit c537098
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
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:
- npm run lint
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 @@ -45,7 +45,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

0 comments on commit c537098

Please sign in to comment.