diff --git a/configure b/configure index 525503054797fb..1b2cc56bda01aa 100755 --- a/configure +++ b/configure @@ -546,6 +546,8 @@ def configure_node(o): else: o['variables']['node_tag'] = '' + o['variables']['node_module_version'] = 11 + def configure_libz(o): o['variables']['node_shared_zlib'] = b(options.shared_zlib) diff --git a/node.gyp b/node.gyp index 42051756074eba..3047b909ef70ea 100644 --- a/node.gyp +++ b/node.gyp @@ -13,6 +13,7 @@ 'node_use_openssl%': 'true', 'node_use_systemtap%': 'false', 'node_shared_openssl%': 'false', + 'node_module_version%': '', 'library_files': [ 'src/node.js', 'lib/_debugger.js', diff --git a/test/simple/test-module-version.js b/test/simple/test-module-version.js new file mode 100644 index 00000000000000..d8e4bf461ecd8b --- /dev/null +++ b/test/simple/test-module-version.js @@ -0,0 +1,10 @@ +'use strict'; +require('../common'); +var 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, 11);