Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
n-api: expose n-api version in process.versions
Expose n-api version in process.versions so that it is available for use in javascript by external modules like node-pre-gyp. It was previously accessible through a functon available in the N-API. PR-URL: #18067 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Tobias Nießn <tniessen@tnie.de> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
- Loading branch information
Showing
with
10 additions
and 3 deletions.
- +6 −0 src/node.cc
- +0 −2 src/node_api.cc
- +3 −0 src/node_version.h
- +1 −1 test/parallel/test-process-versions.js
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -18,8 +18,6 @@ | ||
| #include "node_api.h" | ||
| #include "node_internals.h" | ||
|
|
||
| static | ||
| napi_status napi_set_last_error(napi_env env, napi_status error_code, | ||
| uint32_t engine_error_code = 0, | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -108,4 +108,7 @@ | ||
| */ | ||
| #define NODE_MODULE_VERSION 59 | ||
|
|
||
| // the NAPI_VERSION provided by this version of the runtime | ||
| #define NAPI_VERSION 2 | ||
|
|
||
| #endif // SRC_NODE_VERSION_H_ | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters