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