node-gyp-build
Advanced tools
Comparing version 3.6.0 to 3.7.0
24
bin.js
@@ -7,9 +7,23 @@ #!/usr/bin/env node | ||
proc.exec('node-gyp-build-test', function (err) { | ||
if (err) preinstall() | ||
}) | ||
if (!buildFromSource()) { | ||
proc.exec('node-gyp-build-test', function (err) { | ||
if (err) preinstall() | ||
}) | ||
} else { | ||
preinstall() | ||
} | ||
function buildFromSource () { | ||
if (!process.env.npm_config_argv) return false | ||
try { | ||
return JSON.parse(process.env.npm_config_argv).cooked.indexOf('--build-from-source') !== -1 | ||
} catch (_) { | ||
return false | ||
} | ||
} | ||
function build () { | ||
var args = [ os.platform() === 'win32' ? 'node-gyp.cmd' : 'node-gyp', 'rebuild' ] | ||
try { | ||
@@ -22,3 +36,3 @@ args = [ | ||
} catch (_) {} | ||
proc.spawn(args[0], args.slice(1), {stdio: 'inherit'}).on('exit', function (code) { | ||
@@ -25,0 +39,0 @@ if (code || !process.argv[3]) process.exit(code) |
@@ -6,3 +6,3 @@ var fs = require('fs') | ||
// Workaround to fix webpack's build warnings: 'the request of a dependency is an expression' | ||
var runtimeRequire = typeof __webpack_require__ === 'function' ? __non_webpack_require__ : require | ||
var runtimeRequire = typeof __webpack_require__ === 'function' ? __non_webpack_require__ : require // eslint-disable-line | ||
@@ -9,0 +9,0 @@ var abi = process.versions.modules // TODO: support old node where this is undef |
{ | ||
"name": "node-gyp-build", | ||
"version": "3.6.0", | ||
"version": "3.7.0", | ||
"description": "Build tool and bindings loader for node-gyp that supports prebuilds", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -37,4 +37,6 @@ # node-gyp-build | ||
Users can override `node-gyp-build` and force compiling by doing `npm install --build-from-source`. | ||
## License | ||
MIT |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
7483
131
42
20