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

Update code to node 10 ~ 12 #92

Merged
merged 2 commits into from Oct 24, 2019
Merged

Update code to node 10 ~ 12 #92

merged 2 commits into from Oct 24, 2019

Conversation

@mjschutz
Copy link
Contributor

mjschutz commented Oct 24, 2019

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

This comment has been minimized.

Copy link
Contributor Author

mjschutz commented Oct 24, 2019

I will work on the macros for node version checking.

@xdenser

This comment has been minimized.

@mjschutz

This comment has been minimized.

Copy link
Contributor Author

mjschutz commented Oct 24, 2019

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

This comment has been minimized.

Copy link
Owner

xdenser commented Oct 24, 2019

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

@mjschutz

This comment has been minimized.

Copy link
Contributor Author

mjschutz commented Oct 24, 2019

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.

@xdenser xdenser merged commit b32aed3 into xdenser:master Oct 24, 2019
1 check passed
1 check passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@mariuz

This comment has been minimized.

Copy link
Contributor

mariuz commented Oct 24, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.