node-api: introduce experimental feature flags · nodejs/node@3d0b233 · GitHub
Skip to content

Commit 3d0b233

Browse files
gabrielschulhofrichardlau
authored andcommitted
node-api: introduce experimental feature flags
Add a flag for each experimental feature to indicate its presence. That way, if we compile with `NAPI_EXPERIMENTAL` turned on, we'll be able to distinguish between what `NAPI_EXPERIMENTAL` used to mean on an old version of the headers when compiling against such an old version, and what it means on a new version of Node.js. PR-URL: #50991 Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Backport-PR-URL: #51804 (cherry picked from commit 727dd28)
1 parent 931d02f commit 3d0b233

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

doc/contributing/adding-new-napi-api.md

Lines changed: 4 additions & 0 deletions

doc/contributing/releases-node-api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ and update the define version guards with the release version:
100100
+ #endif // NAPI_VERSION >= 10
101101
```
102102
103+
Remove any feature flags of the form `NODE_API_EXPERIMENTAL_HAS_<FEATURE>`.
104+
103105
Also, update the Node-API version value of the `napi_get_version` test in
104106
`test/js-native-api/test_general/test.js` with the release version `x`:
105107

src/js_native_api.h

Lines changed: 2 additions & 0 deletions

0 commit comments

Comments
 (0)