@npmcli/run-script
Advanced tools
Comparing version 1.7.4 to 1.7.5
@@ -23,2 +23,5 @@ const makeSpawnArgs = require('./make-spawn-args.js') | ||
banner = true, | ||
// how long to wait for a process.kill signal | ||
// only exposed here so that we can make the test go a bit faster. | ||
signalTimeout = 500, | ||
} = options | ||
@@ -72,5 +75,15 @@ | ||
return p | ||
return p.catch(er => { | ||
const { signal } = er | ||
if (stdio === 'inherit' && signal) { | ||
process.kill(process.pid, signal) | ||
// just in case we don't die, reject after 500ms | ||
// this also keeps the node process open long enough to actually | ||
// get the signal, rather than terminating gracefully. | ||
return new Promise((res, rej) => setTimeout(() => rej(er), signalTimeout)) | ||
} else | ||
throw er | ||
}) | ||
} | ||
module.exports = runScriptPkg |
const rpj = require('read-package-json-fast') | ||
const runScriptPkg = require('./run-script-pkg.js') | ||
const validateOptions = require('./validate-options.js') | ||
const isServerPackage = require('./is-server-package.js') | ||
@@ -12,2 +13,2 @@ const runScript = options => { | ||
module.exports = runScript | ||
module.exports = Object.assign(runScript, { isServerPackage }) |
{ | ||
"name": "@npmcli/run-script", | ||
"version": "1.7.4", | ||
"version": "1.7.5", | ||
"description": "Run a lifecycle script for a package (descendant of npm-lifecycle)", | ||
@@ -5,0 +5,0 @@ "author": "Isaac Z. Schlueter <i@izs.me> (https://izs.me)", |
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
16320
260