Skip to content

Commit 0970392

Browse files
committed
src: allow embedders to override NODE_MODULE_VERSION
1 parent 745046d commit 0970392

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/node_version.h

Lines changed: 7 additions & 0 deletions
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 supported by the runtime. This is the inclusive range of
95102
// versions which the Node.js binary being built supports.

0 commit comments

Comments
 (0)