From 14ece0aa76e44c0391c1bc11f7de8616f4c9efd6 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 11 Sep 2023 17:51:36 +0900 Subject: [PATCH] src: allow embedders to override NODE_MODULE_VERSION PR-URL: https://github.com/nodejs/node/pull/49279 Reviewed-By: Joyee Cheung Reviewed-By: Chengzhong Wu Reviewed-By: Stephen Belanger --- src/node_version.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/node_version.h b/src/node_version.h index 4164eef7cc0241..9e3093f27c7a47 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -83,13 +83,20 @@ * We will, at times update the version of V8 shipped in the release line * if it can be made ABI compatible with the previous version. * + * Embedders building Node.js can define NODE_EMBEDDER_MODULE_VERSION to + * override the default value of NODE_MODULE_VERSION. + * * The registry of used NODE_MODULE_VERSION numbers is located at * https://github.com/nodejs/node/blob/HEAD/doc/abi_version_registry.json * Extenders, embedders and other consumers of Node.js that require ABI * version matching should open a pull request to reserve a number in this * registry. */ +#if defined(NODE_EMBEDDER_MODULE_VERSION) +#define NODE_MODULE_VERSION NODE_EMBEDDER_MODULE_VERSION +#else #define NODE_MODULE_VERSION 115 +#endif // The NAPI_VERSION provided by this version of the runtime. This is the version // which the Node binary being built supports.