someone-noone / libnfc-js

A simple libnfc API to interact with NFC tags.
Apache License 2.0
6 stars 9 forks source link

Upgrade to >= Node 18 #8

Open MxAshUp opened 7 months ago

MxAshUp commented 7 months ago

I'd love to help get libnfc-js updated. The state of this PR is building and working great for me on Node 18. I am no expert on c++ stuff though, I referred to this fork: https://github.com/jimmythesaint82/libnfc-js/commit/4a820a786ae5102db4f65c7e720adf70ccb8fc81, and I tried to touch only the c++ things that were broken when trying to build on node 18.

This PR could still use some other tidying and testing, so I'm marking this as a draft.

I am also proposing some changes to error handling and the polling loop. I think just providing poll() as-is would give users more flexibility to implement their own poll loop logic.

(Thanks for creating this package!)