Comparing version 8.2.0 to 8.3.0
# Changelog | ||
## [0.10.0](https://www.github.com/nodejs/gyp-next/compare/v0.9.6...v0.10.0) (2021-08-26) | ||
### Features | ||
* **msvs:** add support for Visual Studio 2022 ([#124](https://www.github.com/nodejs/gyp-next/issues/124)) ([4bd9215](https://www.github.com/nodejs/gyp-next/commit/4bd9215c44d300f06e916aec1d6327c22b78272d)) | ||
### [0.9.6](https://www.github.com/nodejs/gyp-next/compare/v0.9.5...v0.9.6) (2021-08-23) | ||
@@ -4,0 +11,0 @@ |
@@ -10,2 +10,3 @@ 'use strict' | ||
const findNodeDirectory = require('./find-node-directory') | ||
const createConfigGypi = require('./create-config-gypi') | ||
const msgFormat = require('util').format | ||
@@ -96,103 +97,10 @@ var findPython = require('./find-python') | ||
} | ||
var configFilename = 'config.gypi' | ||
var configPath = path.resolve(buildDir, configFilename) | ||
log.verbose('build/' + configFilename, 'creating config file') | ||
var config = process.config ? JSON.parse(JSON.stringify(process.config)) : {} | ||
var defaults = config.target_defaults | ||
var variables = config.variables | ||
// default "config.variables" | ||
if (!variables) { | ||
variables = config.variables = {} | ||
} | ||
// default "config.defaults" | ||
if (!defaults) { | ||
defaults = config.target_defaults = {} | ||
} | ||
// don't inherit the "defaults" from node's `process.config` object. | ||
// doing so could cause problems in cases where the `node` executable was | ||
// compiled on a different machine (with different lib/include paths) than | ||
// the machine where the addon is being built to | ||
defaults.cflags = [] | ||
defaults.defines = [] | ||
defaults.include_dirs = [] | ||
defaults.libraries = [] | ||
// set the default_configuration prop | ||
if ('debug' in gyp.opts) { | ||
defaults.default_configuration = gyp.opts.debug ? 'Debug' : 'Release' | ||
} | ||
if (!defaults.default_configuration) { | ||
defaults.default_configuration = 'Release' | ||
} | ||
// set the target_arch variable | ||
variables.target_arch = gyp.opts.arch || process.arch || 'ia32' | ||
if (variables.target_arch === 'arm64') { | ||
defaults.msvs_configuration_platform = 'ARM64' | ||
defaults.xcode_configuration_platform = 'arm64' | ||
} | ||
// set the node development directory | ||
variables.nodedir = nodeDir | ||
// disable -T "thin" static archives by default | ||
variables.standalone_static_library = gyp.opts.thin ? 0 : 1 | ||
if (win) { | ||
if (process.platform === 'win32') { | ||
process.env.GYP_MSVS_VERSION = Math.min(vsInfo.versionYear, 2015) | ||
process.env.GYP_MSVS_OVERRIDE_PATH = vsInfo.path | ||
defaults.msbuild_toolset = vsInfo.toolset | ||
if (vsInfo.sdk) { | ||
defaults.msvs_windows_target_platform_version = vsInfo.sdk | ||
} | ||
if (variables.target_arch === 'arm64') { | ||
if (vsInfo.versionMajor > 15 || | ||
(vsInfo.versionMajor === 15 && vsInfo.versionMajor >= 9)) { | ||
defaults.msvs_enable_marmasm = 1 | ||
} else { | ||
log.warn('Compiling ARM64 assembly is only available in\n' + | ||
'Visual Studio 2017 version 15.9 and above') | ||
} | ||
} | ||
variables.msbuild_path = vsInfo.msBuild | ||
} | ||
// loop through the rest of the opts and add the unknown ones as variables. | ||
// this allows for module-specific configure flags like: | ||
// | ||
// $ node-gyp configure --shared-libxml2 | ||
Object.keys(gyp.opts).forEach(function (opt) { | ||
if (opt === 'argv') { | ||
return | ||
} | ||
if (opt in gyp.configDefs) { | ||
return | ||
} | ||
variables[opt.replace(/-/g, '_')] = gyp.opts[opt] | ||
createConfigGypi({ gyp, buildDir, nodeDir, vsInfo }, (err, configPath) => { | ||
configs.push(configPath) | ||
findConfigs(err) | ||
}) | ||
// ensures that any boolean values from `process.config` get stringified | ||
function boolsToString (k, v) { | ||
if (typeof v === 'boolean') { | ||
return String(v) | ||
} | ||
return v | ||
} | ||
log.silly('build/' + configFilename, config) | ||
// now write out the config.gypi file to the build/ dir | ||
var prefix = '# Do not edit. File was generated by node-gyp\'s "configure" step' | ||
var json = JSON.stringify(config, boolsToString, 2) | ||
log.verbose('build/' + configFilename, 'writing out config file: %s', configPath) | ||
configs.push(configPath) | ||
fs.writeFile(configPath, [prefix, json, ''].join('\n'), findConfigs) | ||
} | ||
@@ -199,0 +107,0 @@ |
@@ -14,3 +14,3 @@ { | ||
], | ||
"version": "8.2.0", | ||
"version": "8.3.0", | ||
"installVersion": 9, | ||
@@ -29,3 +29,3 @@ "author": "Nathan Rajlich <nathan@tootallnate.net> (http://tootallnate.net)", | ||
"graceful-fs": "^4.2.6", | ||
"make-fetch-happen": "^8.0.14", | ||
"make-fetch-happen": "^9.1.0", | ||
"nopt": "^5.0.0", | ||
@@ -32,0 +32,0 @@ "npmlog": "^4.1.2", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1972741
135
4087
+ Addedmake-fetch-happen@9.1.0(transitive)
+ Addednegotiator@0.6.3(transitive)
+ Addedsocks-proxy-agent@6.2.1(transitive)
- Removedmake-fetch-happen@8.0.14(transitive)
- Removedsocks-proxy-agent@5.0.1(transitive)
Updatedmake-fetch-happen@^9.1.0