Upgrades Native Abstractions for Node.js (NAN) from v1 to v2#6
Upgrades Native Abstractions for Node.js (NAN) from v1 to v2#6ngoyal merged 5 commits intogetdnsapi:masterfrom
Conversation
- The upgrade steps are almost undocumented, but simplified by running a series of `sed` commands on the source files. - The script was [originally suggested](nodejs/nan#376) in a github issue for NAN. - One version has been [released as a gist](https://gist.github.com/thlorenz/7e9d8ad15566c99fd116). - [A modified version](https://gist.github.com/joelpurra/a1129ca1336c14bfd51b1a7ad0f79171) which works better with `getdns-node` was used. - This commit contains only automated fixes; the next commit contains manual fixes to some regexp misses.
- Cleans up two lines which confused the automated upgrade script.
- These are the manual fixes necessary to pass the test run `npm test`. - The `FunctionTemplate` no longer needs `->GetFunction()` - `GNContext::Callback` needs a `HandleScope`.
- [`NAN_METHOD` already has a `HandleScope`](https://github.com/nodejs/nan/blob/master/doc/scopes.md), so removed them. - Removed every other `HandleScope` and `EscapableHandleScope` which didn't make a difference in the tests. - The only place which needs, or at least crashes without, `HandleScope` is `GNContext::Callback`.
|
Did the last commit break the tests? I haven't looked at these for a while since I've moved on to different projects :-/ |
|
@ngoyal: Travis only builds once per push (not commit), unless instructed to do otherwise. Either way, all Travis builds have been failing since June 2015, so wouldn't rely too much on them as an indicator.
|
|
I merged this and also think you should be a designated collaborator so you have an invite. Thanks! |
|
Quickly looked at travis - seems like the scripts are pulling in getdns 0.1.6.tgz when it probably should have been grabbing 0.3.x (at the time). |
|
@ngoyal: thanks! Edit: saw that |
A stab at upgrading the troublesome
getdns-nodebindings to newer versions of node. Here's a quote from NAN on why it was created:Luckily it wasn't all too bad, and things seem to compile (with warnings) and (most) tests pass.
getdnsversions.nodeversions.ls -l getdns-v*.loggrep ' passing (' *.npm-test.log