Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add node_module_version to config.gypi #8171

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, I see it's autogenerated on master already.


if options.linked_module:
o['variables']['library_files'] = options.linked_module

Expand Down
1 change: 1 addition & 0 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
10 changes: 10 additions & 0 deletions test/parallel/test-module-version.js
Original file line number Diff line number Diff line change
@@ -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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably better to test for number or version >= 46 so it's not a maintenance burden.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@silverwind This is a backport to v4.x, the number should remain pretty constant there. ;)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, missed that.