deps: upgrade npm to 8.17.0

PR-URL: https://github.com/nodejs/node/pull/44205
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Ruy Adorno <ruyadorno@google.com>
This commit is contained in:
npm CLI robot 2022-08-11 07:35:43 -07:00 committed by GitHub
parent 4c9ad2bd4c
commit ccfd90007c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
81 changed files with 1666 additions and 711 deletions

View file

@ -6,8 +6,17 @@ const signalManager = require('./signal-manager.js')
const isServerPackage = require('./is-server-package.js')
// you wouldn't like me when I'm angry...
const bruce = (id, event, cmd) =>
`\n> ${id ? id + ' ' : ''}${event}\n> ${cmd.trim().replace(/\n/g, '\n> ')}\n`
const bruce = (id, event, cmd, args) => {
let banner = id
? `\n> ${id} ${event}\n`
: `\n> ${event}\n`
banner += `> ${cmd.trim().replace(/\n/g, '\n> ')}`
if (args.length) {
banner += ` ${args.join(' ')}`
}
banner += '\n'
return banner
}
const runScriptPkg = async options => {
const {
@ -52,10 +61,10 @@ const runScriptPkg = async options => {
if (stdio === 'inherit' && banner !== false) {
// we're dumping to the parent's stdout, so print the banner
console.log(bruce(pkg._id, event, cmd))
console.log(bruce(pkg._id, event, cmd, args))
}
const [spawnShell, spawnArgs, spawnOpts, cleanup] = makeSpawnArgs({
const [spawnShell, spawnArgs, spawnOpts] = makeSpawnArgs({
event,
path,
scriptShell,
@ -93,7 +102,7 @@ const runScriptPkg = async options => {
} else {
throw er
}
}).finally(cleanup)
})
}
module.exports = runScriptPkg