jue89 / node-systemd-journald

Native bindings to journald
MIT License
28 stars 10 forks source link

Move to N-API to support future node versions #19

Closed GaikwadPratik closed 3 years ago

jue89 commented 3 years ago

Aside from the fact that NAPI is the way to go nowadays - have you faced any problems with the NAN abstraction? Node 16.4.2 seems to work fine.

Switching to NAPI v4 deprecates compatibility from (TBH very antique) Node 0.10 to < v10.16.0.

GaikwadPratik commented 3 years ago

I recently moved my projects from node v10 to node v16. Initially it didn't work couple of times, hence I did the migration. But when I tested after creating PR, just to give it one last shot and it worked.

I also got motivation from two facts:

  1. All the versions of below v12 have reached EOL meaning even though they can be used, they will not be supported. Anything below node v12 will not even receive security updates, so it would be dangerous to keep using and supporting those.
  2. NAPI is integrated in node source code rather than a 3rd party tool like NAN so there should be some improvements.
jue89 commented 3 years ago

I fully agree. Increasing the major version should enable people to do the migration.

All the versions of below v12 have reached EOL meaning even though they can be used, they will not be supported. Anything below node v12 will not even receive security updates, so it would be dangerous to keep using and supporting those.

I've been involved into projects that are still running on Node 4. But that's okay in that case - it's not connected to the Internet.

jue89 commented 3 years ago

Addressed by merging #20.