Socket
Socket
Sign inDemoInstall

@npmcli/run-script

Package Overview
Dependencies
Maintainers
6
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@npmcli/run-script - npm Package Compare versions

Comparing version 1.3.1 to 1.4.0

9

lib/run-script-pkg.js
const makeSpawnArgs = require('./make-spawn-args.js')
const promiseSpawn = require('@npmcli/promise-spawn')
const banner = (id, event, cmd) =>`> ${id ? id + ' ' : ''}${event}\n> ${cmd}`
// you wouldn't like me when I'm angry...
const bruce = (id, event, cmd) =>`\n> ${id ? id + ' ' : ''}${event}\n> ${cmd}\n`

@@ -16,2 +17,4 @@ const runScriptPkg = options => {

stdioString = false,
// note: only used when stdio:inherit
banner = true,
} = options

@@ -28,5 +31,5 @@

if (stdio === 'inherit') {
if (stdio === 'inherit' && banner !== false) {
// we're dumping to the parent's stdout, so print the banner
console.log(banner(pkg._id, event, cmd))
console.log(bruce(pkg._id, event, cmd))
}

@@ -33,0 +36,0 @@

{
"name": "@npmcli/run-script",
"version": "1.3.1",
"version": "1.4.0",
"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)",

@@ -45,2 +45,8 @@ # @npmcli/run-script

stdio: 'inherit',
// print the package id and script, and the command to be run, like:
// > somepackage@1.2.3 postinstall
// > make all-the-things
// Defaults true when stdio:'inherit', otherwise suppressed
banner: true,
})

@@ -108,2 +114,6 @@ .then(({ code, signal, stdout, stderr, pkgid, path, event, script }) => {

`stderr` and `stdout` rather than Buffers.
- `banner` Optional, defaults to `true`. If the `stdio` option is set to
`'inherit'`, then print a banner with the package name and version, event
name, and script command to be run. Set explicitly to `false` to disable
for inherited stdio.

@@ -110,0 +120,0 @@ Note that this does _not_ run pre-event and post-event scripts. The

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc