Description
I am writing an N-API integration that uses an node::AtExit
callback hook, and I intend to use N-API for that.
The documentation of napi_add_env_cleanup_hook
https://nodejs.org/api/n-api.html#n_api_napi_add_env_cleanup_hook states this was added in N-API version 3.
However, Node.js 8.11 is missing this function even though it advertises support for N-API version 3.
I do not understand why Node 8 should have N-API version 3, but most of all I'm incredibly surprised by the mismatch between N-API versions and actually exported N-API functions.
I know versions 1-2 were sort of messy, but I definitely expected all N-API version 3 functions to be present if NAPI_VERSION
is set to 3.
What is the purpose of NAPI_VERSION
if it cannot be used to detect new additions?
Can someone please advise what the best way forward is for module authors like me.