Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support Node 12.x.x. Updated deprecated functions for v8. #489

Closed
wants to merge 11 commits into from

Conversation

malhotra-sidharth
Copy link
Contributor

@issacgerges
Copy link

It looks like node v12 support for nan landed in v2.14.0 nodejs/nan@e512f92

I believe you'll need to update minimum version for nan in the package.json get the builds passing.

Aside from that that @octalmage anything additional that needs to get this change landed?

@malhotra-sidharth
Copy link
Contributor Author

malhotra-sidharth commented Jun 18, 2019

Thanks @issacgerges. I have updated the nodejs/nan package version and builds have been successful. Not sure why Github still has Travis-CI's old results whereas the new build is successful. Should be updated once merged with the master branch.

@foxt
Copy link

foxt commented Aug 7, 2019

+1 building on macOS Mojave is working fine where master did not.


> robotjs@0.5.1 install /Users/thelmgn/Documents/remoteMacro-client/node_modules/robotjs
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=12.7.0 runtime=node arch=x64 platform=darwin)
  CXX(target) Release/obj.target/robotjs/src/robotjs.o
../src/robotjs.cc:159:22: warning: 'BooleanValue' is deprecated: BooleanValue can never throw. Use Isolate version. [-Wdeprecated-declarations]
                doubleC = info[1]->BooleanValue(Nan::GetCurrentContext()).FromJust();
                                   ^
/Users/thelmgn/.node-gyp/12.7.0/include/node/v8.h:2568:3: note: 'BooleanValue' has been explicitly marked deprecated here
  V8_DEPRECATED("BooleanValue can never throw. Use Isolate version.",
  ^
/Users/thelmgn/.node-gyp/12.7.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
../src/robotjs.cc:434:30: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
                        v8::Local<v8::Value> v(a->Get(i));
                                                  ^
/Users/thelmgn/.node-gyp/12.7.0/include/node/v8.h:3423:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(uint32_t index));
  ^
/Users/thelmgn/.node-gyp/12.7.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/robotjs.cc:768:19: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
        img.width = obj->Get(Nan::New("width").ToLocalChecked())->Uint32Value(Nan::GetCurrentContext()).FromJust();
                         ^
/Users/thelmgn/.node-gyp/12.7.0/include/node/v8.h:3419:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/thelmgn/.node-gyp/12.7.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/robotjs.cc:769:20: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
        img.height = obj->Get(Nan::New("height").ToLocalChecked())->Uint32Value(Nan::GetCurrentContext()).FromJust();
                          ^
/Users/thelmgn/.node-gyp/12.7.0/include/node/v8.h:3419:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/thelmgn/.node-gyp/12.7.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/robotjs.cc:770:23: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
        img.byteWidth = obj->Get(Nan::New("byteWidth").ToLocalChecked())->Uint32Value(Nan::GetCurrentContext()).FromJust();
                             ^
/Users/thelmgn/.node-gyp/12.7.0/include/node/v8.h:3419:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/thelmgn/.node-gyp/12.7.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/robotjs.cc:771:26: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
        img.bitsPerPixel = obj->Get(Nan::New("bitsPerPixel").ToLocalChecked())->Uint32Value(Nan::GetCurrentContext()).FromJust();
                                ^
/Users/thelmgn/.node-gyp/12.7.0/include/node/v8.h:3419:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/thelmgn/.node-gyp/12.7.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/robotjs.cc:772:27: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
        img.bytesPerPixel = obj->Get(Nan::New("bytesPerPixel").ToLocalChecked())->Uint32Value(Nan::GetCurrentContext()).FromJust();
                                 ^
/Users/thelmgn/.node-gyp/12.7.0/include/node/v8.h:3419:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/thelmgn/.node-gyp/12.7.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/robotjs.cc:774:38: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
        char* buf = node::Buffer::Data(obj->Get(Nan::New("image").ToLocalChecked()));
                                            ^
/Users/thelmgn/.node-gyp/12.7.0/include/node/v8.h:3419:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/thelmgn/.node-gyp/12.7.0/include/node/v8config.h:326:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
8 warnings generated.
  CC(target) Release/obj.target/robotjs/src/deadbeef_rand.o
  CC(target) Release/obj.target/robotjs/src/mouse.o
  CC(target) Release/obj.target/robotjs/src/keypress.o
  CC(target) Release/obj.target/robotjs/src/keycode.o
  CC(target) Release/obj.target/robotjs/src/screen.o
  CC(target) Release/obj.target/robotjs/src/screengrab.o
  CC(target) Release/obj.target/robotjs/src/snprintf.o
  CC(target) Release/obj.target/robotjs/src/MMBitmap.o
  SOLINK_MODULE(target) Release/robotjs.node
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN remotemacro-client@1.0.0 No description

+ robotjs@0.5.1
added 63 packages from 43 contributors and audited 108 packages in 15.371s
found 0 vulnerabilities

Vulpes:remoteMacro-client thelmgn$ node -v
v12.7.0
Vulpes:remoteMacro-client thelmgn$ uname -a
Darwin Vulpes.local 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64```

@muscat1
Copy link

muscat1 commented Sep 18, 2019

Hi, are there any news with regards to node 12 support? We would like to upgrade to node 12 in our application and we were interested if there has been any development in this respect. Thanks!

src/robotjs.cc Outdated Show resolved Hide resolved
@dtinth dtinth mentioned this pull request Sep 28, 2019
@oktapodia
Copy link
Collaborator

@octalmage @malhotra-sidharth any update?

@dsteinman
Copy link

Bump, this should probably get merged in (if it's working). Node v13 is out now too.

@fttx
Copy link

fttx commented Nov 1, 2019

@octalmage any update on this?

@brandonros
Copy link

who is down to fork + publish?

@quinton-ashley
Copy link

please publish this update for node v12

@RobbieTheWagner
Copy link

@octalmage do you intend to merge this? If not, we probably need to fork and publish, as @brandonros suggests.

@oktapodia
Copy link
Collaborator

Hello @brandonros @rwwagner90, I will take care of this PR in the repository, a new version of robotjs will be published in few days

@oktapodia
Copy link
Collaborator

@malhotra-sidharth Thank you for your PR, it looks like the test are not passing on NodeJS v13.2.0, any chance to support it?

@oktapodia
Copy link
Collaborator

Closing that one as #523 is also including the support of Node 13.x.x and is based on your one (indeed, including your commits) Thank you!

@oktapodia oktapodia closed this Nov 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet