xdenser / node-firebird-libfbclient

Firebird SQL binding
MIT License
82 stars 34 forks source link

Update code to node 10 ~ 12 #92

Closed mjschutz closed 4 years ago

mjschutz commented 4 years ago

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).

mjschutz commented 4 years ago

I will work on the macros for node version checking.

xdenser commented 4 years ago

Build failing https://travis-ci.org/xdenser/node-firebird-libfbclient/jobs/602102371

mjschutz commented 4 years ago

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).

xdenser commented 4 years ago

If this is too much work we can drop support of older versions.

mjschutz commented 4 years ago

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.

mariuz commented 4 years ago

also node 6 is deprecated https://nodejs.org/en/about/releases/