Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added some comments about NAPI_VERSION
  • Loading branch information
NickNaso committed Jun 10, 2019
commit cc8031b6bf2b1b3419da9a4ffb51fdd1ccca6bb3
7 changes: 6 additions & 1 deletion src/js_native_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
#ifdef NAPI_EXPERIMENTAL
#define NAPI_VERSION NAPI_VERSION_EXPERIMENTAL
#else
// The baseline version for N-API
// The baseline version for N-API.
// The NAPI_VERSION controls which version will be used by default when
// compilling a native addon. If the addon developer specifically wants to use
// functions available in a new version of N-API that is not yet ported in all
// LTS version, they can set NAPI_VERSION knowing that they have specifically
// depended on that version.
#define NAPI_VERSION 4
#endif
#endif
Expand Down
3 changes: 2 additions & 1 deletion src/node_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@
*/
#define NODE_MODULE_VERSION 72

// the NAPI_VERSION provided by this version of the runtime
// The NAPI_VERSION provided by this version of the runtime. This is the version
// which the Node binary being built supports.
#define NAPI_VERSION 4

#endif // SRC_NODE_VERSION_H_