Closed mjschutz closed 4 years ago
I will work on the macros for node version checking.
I know, node 12 dropped some codes and then the old one's will not work anymore, the macros will be need to check the node version (I will make another commit to fix that).
If this is too much work we can drop support of older versions.
It's not, I did the changes already and it's building on node +6, I replaced the val->ToObject and other conversions with Nan::To, and other Nan functions, the only problem was String::Concat, I changed it to use a macro to add Isolate::GetCurrent() if it's node +10.
Nan::MakeCallback is deprecated and I replaced it in favor of AsyncResource::runInAsyncScope and seens to be working.
also node 6 is deprecated https://nodejs.org/en/about/releases/
I update the code to build/run on node 12 (and 10), did some tests, but need more tests to do. The code can be changed to have macros to allow building for multiple versions of node (like I did for BooleanValue).
Works on NW.js too, I'm working on a system for the place I work and I will use this module (on NW.js).