diff --git a/configure b/configure index d14648cf8fc148..a54d30a161f694 100755 --- a/configure +++ b/configure @@ -769,6 +769,8 @@ def configure_node(o): if options.enable_static: o['variables']['node_target_type'] = 'static_library' + o['variables']['node_module_version'] = 46 + if options.linked_module: o['variables']['library_files'] = options.linked_module diff --git a/node.gyp b/node.gyp index e17c58b7038622..37d2400dfd2d3a 100644 --- a/node.gyp +++ b/node.gyp @@ -15,6 +15,7 @@ 'node_enable_v8_vtunejit%': 'false', 'node_target_type%': 'executable', 'node_core_target_name%': 'node', + 'node_module_version%': '', 'library_files': [ 'src/node.js', 'lib/_debug_agent.js', diff --git a/test/parallel/test-module-version.js b/test/parallel/test-module-version.js new file mode 100644 index 00000000000000..34fb3095a2339f --- /dev/null +++ b/test/parallel/test-module-version.js @@ -0,0 +1,10 @@ +'use strict'; +require('../common'); +const assert = require('assert'); + +// Check for existence +assert(process.config.variables.hasOwnProperty('node_module_version')); + +// Ensure that `node_module_version` is an Integer +assert(!Number.isNaN(parseInt(process.config.variables.node_module_version))); +assert.strictEqual(process.config.variables.node_module_version, 46);