mirror of
https://github.com/nodejs/node.git
synced 2025-08-19 17:05:43 +02:00
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:
parent
4c9ad2bd4c
commit
ccfd90007c
81 changed files with 1666 additions and 711 deletions
19
deps/npm/node_modules/@npmcli/run-script/lib/run-script-pkg.js
generated
vendored
19
deps/npm/node_modules/@npmcli/run-script/lib/run-script-pkg.js
generated
vendored
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue