Closed
Description
I'm a bit confused about the NAPI versioning, like NAPI_VERSION
, NAPI_EXPERIMENTAL
macros.
1. deprecation of NAPI_EXPERIMENTAL
NAPI_EXPERIMENTAL
With 73fed84 impl has been changed to only use NAPI_VERSION
to determine whether features can be used.
- What not has been adapted are the
#endif
comments like 73fed84#diff-f546e4cc35b454813e5264fe9c9e6fc8R307. Tests are still definingNAPI_EXPERIMENTAL
: this can be removed I think, as well as any other occurrence ofNAPI_EXPERIMENTAL
in the projectnpm test --NAPI_VERSION=...
should be documented or defined as npm scripts, likenpm run test:v2
,npm run test:v3
, etc.
2. experimental versions
For features which will land with any future napi version currently not defined, we have those #if (NAPI_VERSION > 2147483646)
statements. I think it would be easier to read:
#define NAPI_VERSION_EXPERIMENTAL 2147483647
// [...]
#if (NAPI_VERSION == NAPI_VERSION_EXPERIMENTAL)
// ...
#endif
As well as documentation or defining scripts npm run test:experimental
What do you think?