For my module I want to do conditional compilation based on node-gyp feature support.
Unfortunately there's currently no nice way to figure out at node-gyp configuration time which napi version is supported. I'm currently doing this:
'variables': {
'napi_version': '<!(node -e "console.log(process.versions.napi)")',
},
But this checks napi support in the host version of nodejs, not in the nodejs build target version.