@npmcli/run-script
Advanced tools
Comparing version 7.0.2 to 7.0.3
const runningProcs = new Set() | ||
let handlersInstalled = false | ||
// NOTE: these signals aren't actually forwarded anywhere. they're trapped and | ||
// ignored until all child processes have exited. in our next breaking change | ||
// we should rename this | ||
const forwardedSignals = [ | ||
@@ -15,4 +12,8 @@ 'SIGINT', | ||
// to ourselves. see the catch handler at the bottom of run-script-pkg.js | ||
// istanbul ignore next - this function does nothing | ||
const handleSignal = () => {} | ||
const handleSignal = signal => { | ||
for (const proc of runningProcs) { | ||
proc.kill(signal) | ||
} | ||
} | ||
const setupListeners = () => { | ||
@@ -19,0 +20,0 @@ for (const signal of forwardedSignals) { |
{ | ||
"name": "@npmcli/run-script", | ||
"version": "7.0.2", | ||
"version": "7.0.3", | ||
"description": "Run a lifecycle script for a package (descendant of npm-lifecycle)", | ||
@@ -10,3 +10,3 @@ "author": "GitHub Inc.", | ||
"eslint": "eslint", | ||
"lint": "eslint \"**/*.js\"", | ||
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"", | ||
"lintfix": "npm run lint -- --fix", | ||
@@ -20,3 +20,3 @@ "postlint": "template-oss-check", | ||
"@npmcli/eslint-config": "^4.0.0", | ||
"@npmcli/template-oss": "4.19.0", | ||
"@npmcli/template-oss": "4.21.3", | ||
"require-inject": "^1.4.4", | ||
@@ -46,3 +46,3 @@ "tap": "^16.0.1" | ||
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", | ||
"version": "4.19.0", | ||
"version": "4.21.3", | ||
"publish": "true" | ||
@@ -49,0 +49,0 @@ }, |
18338