Skip to content

Commit 14ece0a

Browse files
zcbenzruyadorno
authored andcommittedSep 28, 2023
src: allow embedders to override NODE_MODULE_VERSION
PR-URL: #49279 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

Diff for: ‎src/node_version.h

+7
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,20 @@
8383
* We will, at times update the version of V8 shipped in the release line
8484
* if it can be made ABI compatible with the previous version.
8585
*
86+
* Embedders building Node.js can define NODE_EMBEDDER_MODULE_VERSION to
87+
* override the default value of NODE_MODULE_VERSION.
88+
*
8689
* The registry of used NODE_MODULE_VERSION numbers is located at
8790
* https://github.com/nodejs/node/blob/HEAD/doc/abi_version_registry.json
8891
* Extenders, embedders and other consumers of Node.js that require ABI
8992
* version matching should open a pull request to reserve a number in this
9093
* registry.
9194
*/
95+
#if defined(NODE_EMBEDDER_MODULE_VERSION)
96+
#define NODE_MODULE_VERSION NODE_EMBEDDER_MODULE_VERSION
97+
#else
9298
#define NODE_MODULE_VERSION 115
99+
#endif
93100

94101
// The NAPI_VERSION provided by this version of the runtime. This is the version
95102
// which the Node binary being built supports.

0 commit comments

Comments
 (0)
Please sign in to comment.