Socket
Socket
Sign inDemoInstall

node-gyp

Package Overview
Dependencies
Maintainers
6
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-gyp - npm Package Compare versions

Comparing version 3.5.0 to 3.6.0

lib/Find-VS2017.cs

13

lib/build.js

@@ -17,3 +17,3 @@

, processRelease = require('./process-release')
, win = process.platform == 'win32'
, win = process.platform === 'win32'

@@ -128,2 +128,9 @@ exports.usage = 'Invokes `' + (win ? 'msbuild' : 'make') + '` and builds the module'

function findMsbuild () {
if (config.variables.msbuild_path) {
command = config.variables.msbuild_path
log.verbose('using MSBuild:', command)
copyNodeLib()
return
}
log.verbose('could not find "msbuild.exe" in PATH - finding location in registry')

@@ -231,3 +238,5 @@ var notfoundErr = 'Can\'t find "msbuild.exe". Do you have Microsoft Visual Studio C++ 2008+ installed?'

if (win) {
var p = arch === 'x64' ? 'x64' : 'Win32'
var archLower = arch.toLowerCase()
var p = archLower === 'x64' ? 'x64' :
(archLower === 'arm' ? 'ARM' : 'Win32')
argv.push('/p:Configuration=' + buildType + ';Platform=' + p)

@@ -234,0 +243,0 @@ if (jobs) {

@@ -22,5 +22,7 @@ module.exports = exports = configure

, processRelease = require('./process-release')
, win = process.platform == 'win32'
, win = process.platform === 'win32'
, findNodeDirectory = require('./find-node-directory')
, msgFormat = require('util').format
if (win)
var findVS2017 = require('./find-vs2017')

@@ -90,7 +92,18 @@ exports.usage = 'Generates ' + (win ? 'MSVC project files' : 'a Makefile') + ' for the current module'

log.verbose('build dir', '"build" dir needed to be created?', isNew)
createConfigFile()
if (win && (!gyp.opts.msvs_version || gyp.opts.msvs_version === '2017')) {
findVS2017(function (err, vsSetup) {
if (err) {
log.verbose('Not using VS2017:', err.message)
createConfigFile()
} else {
createConfigFile(null, vsSetup)
}
})
} else {
createConfigFile()
}
})
}
function createConfigFile (err) {
function createConfigFile (err, vsSetup) {
if (err) return callback(err)

@@ -142,2 +155,15 @@

if (vsSetup) {
// GYP doesn't (yet) have support for VS2017, so we force it to VS2015
// to avoid pulling a floating patch that has not landed upstream.
// Ref: https://chromium-review.googlesource.com/#/c/433540/
gyp.opts.msvs_version = '2015'
process.env['GYP_MSVS_VERSION'] = 2015
process.env['GYP_MSVS_OVERRIDE_PATH'] = vsSetup.path
defaults['msbuild_toolset'] = 'v141'
defaults['msvs_windows_target_platform_version'] = vsSetup.sdk
variables['msbuild_path'] = path.join(vsSetup.path, 'MSBuild', '15.0',
'Bin', 'MSBuild.exe')
}
// loop through the rest of the opts and add the unknown ones as variables.

@@ -278,2 +304,4 @@ // this allows for module-specific configure flags like:

argv.push('-Dmodule_root_dir=' + process.cwd())
argv.push('-Dnode_engine=' +
(gyp.opts.node_engine || process.jsEngine || 'v8'))
argv.push('--depth=.')

@@ -322,5 +350,5 @@ argv.push('--no-parallel')

/**
* Returns the first file or directory from an array of candidates that is
* Returns the first file or directory from an array of candidates that is
* readable by the current user, or undefined if none of the candidates are
* readable.
* readable.
*/

@@ -327,0 +355,0 @@ function findAccessibleSync (logprefix, dir, candidates) {

4

package.json

@@ -14,3 +14,3 @@ {

],
"version": "3.5.0",
"version": "3.6.0",
"installVersion": 9,

@@ -36,3 +36,3 @@ "author": "Nathan Rajlich <nathan@tootallnate.net> (http://tootallnate.net)",

"rimraf": "2",
"semver": "2.x || 3.x || 4 || 5",
"semver": "~5.3.0",
"tar": "^2.0.0",

@@ -39,0 +39,0 @@ "which": "1"

@@ -6,3 +6,3 @@ node-gyp

`node-gyp` is a cross-platform command-line tool written in Node.js for compiling
native addon modules for Node.js. It bundles the [gyp](https://code.google.com/p/gyp/)
native addon modules for Node.js. It bundles the [gyp](https://gyp.gsrc.io)
project used by the Chromium team and takes away the pain of dealing with the

@@ -9,0 +9,0 @@ various differences in build platforms. It is the replacement to the `node-waf`

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc