Skip to content

Commit

Permalink
deps: @npmcli/run-script@8.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Apr 16, 2024
1 parent 79f79c7 commit b8f8b41
Show file tree
Hide file tree
Showing 31 changed files with 38 additions and 484 deletions.
2 changes: 2 additions & 0 deletions DEPENDENCIES.md
Expand Up @@ -228,6 +228,7 @@ graph LR;
npmcli-run-script-->npmcli-node-gyp["@npmcli/node-gyp"];
npmcli-run-script-->npmcli-package-json["@npmcli/package-json"];
npmcli-run-script-->npmcli-promise-spawn["@npmcli/promise-spawn"];
npmcli-run-script-->proc-log;
npmcli-smoke-tests-->npmcli-eslint-config["@npmcli/eslint-config"];
npmcli-smoke-tests-->npmcli-mock-registry["@npmcli/mock-registry"];
npmcli-smoke-tests-->npmcli-promise-spawn["@npmcli/promise-spawn"];
Expand Down Expand Up @@ -700,6 +701,7 @@ graph LR;
npmcli-run-script-->npmcli-node-gyp["@npmcli/node-gyp"];
npmcli-run-script-->npmcli-package-json["@npmcli/package-json"];
npmcli-run-script-->npmcli-promise-spawn["@npmcli/promise-spawn"];
npmcli-run-script-->proc-log;
npmcli-run-script-->which;
npmcli-smoke-tests-->npmcli-eslint-config["@npmcli/eslint-config"];
npmcli-smoke-tests-->npmcli-mock-registry["@npmcli/mock-registry"];
Expand Down
1 change: 0 additions & 1 deletion lib/commands/ci.js
Expand Up @@ -109,7 +109,6 @@ class CI extends ArboristWorkspaceCmd {
args: [],
scriptShell,
stdio: 'inherit',
banner: !this.npm.silent,
event,
})
}
Expand Down
1 change: 0 additions & 1 deletion lib/commands/explore.js
Expand Up @@ -56,7 +56,6 @@ class Explore extends BaseCommand {
return runScript({
...this.npm.flatOptions,
pkg,
banner: false,
path,
event: '_explore',
stdio: 'inherit',
Expand Down
1 change: 0 additions & 1 deletion lib/commands/install.js
Expand Up @@ -168,7 +168,6 @@ class Install extends ArboristWorkspaceCmd {
args: [],
scriptShell,
stdio: 'inherit',
banner: !this.npm.silent,
event,
})
}
Expand Down
3 changes: 0 additions & 3 deletions lib/commands/publish.js
Expand Up @@ -72,7 +72,6 @@ class Publish extends BaseCommand {
path: spec.fetchSpec,
stdio: 'inherit',
pkg: manifest,
banner: !silent,
})
}

Expand Down Expand Up @@ -131,15 +130,13 @@ class Publish extends BaseCommand {
path: spec.fetchSpec,
stdio: 'inherit',
pkg: manifest,
banner: !silent,
})

await runScript({
event: 'postpublish',
path: spec.fetchSpec,
stdio: 'inherit',
pkg: manifest,
banner: !silent,
})
}

Expand Down
1 change: 0 additions & 1 deletion lib/commands/run-script.js
Expand Up @@ -114,7 +114,6 @@ class RunScript extends BaseCommand {
scriptShell,
stdio: 'inherit',
pkg,
banner: !this.npm.silent,
event: ev,
args: evArgs,
})
Expand Down
5 changes: 0 additions & 5 deletions node_modules/.gitignore
Expand Up @@ -181,11 +181,6 @@
!/npm-user-validate
!/p-map
!/pacote
!/pacote/node_modules/
/pacote/node_modules/*
!/pacote/node_modules/@npmcli/
/pacote/node_modules/@npmcli/*
!/pacote/node_modules/@npmcli/run-script
!/parse-conflict-json
!/path-key
!/path-scurry
Expand Down
32 changes: 14 additions & 18 deletions node_modules/@npmcli/run-script/lib/run-script-pkg.js
Expand Up @@ -5,19 +5,6 @@ const { isNodeGypPackage, defaultGypInstallScript } = require('@npmcli/node-gyp'
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, 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 {
event,
Expand All @@ -29,8 +16,6 @@ const runScriptPkg = async options => {
pkg,
args = [],
stdioString,
// note: only used when stdio:inherit
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,
Expand Down Expand Up @@ -59,9 +44,20 @@ const runScriptPkg = async options => {
return { code: 0, signal: null }
}

if (stdio === 'inherit' && banner !== false) {
// we're dumping to the parent's stdout, so print the banner
console.log(bruce(pkg._id, event, cmd, args))
if (stdio === 'inherit') {
let banner
if (pkg._id) {
banner = `\n> ${pkg._id} ${event}\n`
} else {
banner = `\n> ${event}\n`
}
banner += `> ${cmd.trim().replace(/\n/g, '\n> ')}`
if (args.length) {
banner += ` ${args.join(' ')}`
}
banner += '\n'
const { output } = require('proc-log')
output.standard(banner)
}

const [spawnShell, spawnArgs, spawnOpts] = makeSpawnArgs({
Expand Down
3 changes: 2 additions & 1 deletion node_modules/@npmcli/run-script/package.json
@@ -1,6 +1,6 @@
{
"name": "@npmcli/run-script",
"version": "7.0.4",
"version": "8.0.0",
"description": "Run a lifecycle script for a package (descendant of npm-lifecycle)",
"author": "GitHub Inc.",
"license": "ISC",
Expand All @@ -25,6 +25,7 @@
"@npmcli/package-json": "^5.0.0",
"@npmcli/promise-spawn": "^7.0.0",
"node-gyp": "^10.0.0",
"proc-log": "^4.0.0",
"which": "^4.0.0"
},
"files": [
Expand Down
15 changes: 0 additions & 15 deletions node_modules/pacote/node_modules/@npmcli/run-script/LICENSE

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit b8f8b41

Please sign in to comment.