Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lerna/run-lifecycle

Package Overview
Dependencies
Maintainers
2
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lerna/run-lifecycle - npm Package Compare versions

Comparing version 5.2.0 to 5.3.0

11

package.json
{
"name": "@lerna/run-lifecycle",
"version": "5.2.0",
"version": "5.3.0",
"description": "An internal Lerna tool",

@@ -34,7 +34,8 @@ "keywords": [

"dependencies": {
"@lerna/npm-conf": "5.2.0",
"@npmcli/run-script": "^3.0.2",
"npmlog": "^6.0.2"
"@lerna/npm-conf": "5.3.0",
"@npmcli/run-script": "^4.1.7",
"npmlog": "^6.0.2",
"p-queue": "^6.6.2"
},
"gitHead": "4f43ba15b0024f87ec04c68522c78bcd1edbc185"
"gitHead": "535afac9b27892e8e5354aae950338a7187356f2"
}

@@ -8,3 +8,6 @@ // @ts-check

const npmConf = require("@lerna/npm-conf");
const PQueue = require("p-queue").default;
const queue = new PQueue({ concurrency: 1 });
module.exports.runLifecycle = runLifecycle;

@@ -22,2 +25,3 @@ module.exports.createRunner = createRunner;

* @property {boolean} [unsafePerm=true]
* @property {string} [stdio]
*/

@@ -120,5 +124,5 @@

* In order to match the previous behavior of "npm-lifecycle", we have to disable the writing
* to the parent process and print the command banner ourself.
* to the parent process and print the command banner ourselves, unless overridden by the options.
*/
const stdio = "pipe";
const stdio = opts.stdio || "pipe";
if (log.level !== "silent") {

@@ -128,38 +132,42 @@ printCommandBanner(id, stage, pkg.scripts[stage], dir);

return runScript({
event: stage,
path: dir,
pkg,
args: [],
stdio,
banner: false,
scriptShell: config.scriptShell,
}).then(
({ stdout }) => {
/**
* This adjustment is based on trying to match the existing integration test outputs when migrating
* from "npm-lifecycle" to "@npmcli/run-script".
*/
// eslint-disable-next-line no-console
console.log(stdout.toString().trimEnd());
return queue.add(async () =>
runScript({
event: stage,
path: dir,
pkg,
args: [],
stdio,
banner: false,
scriptShell: config.scriptShell,
}).then(
({ stdout }) => {
if (stdout) {
/**
* This adjustment is based on trying to match the existing integration test outputs when migrating
* from "npm-lifecycle" to "@npmcli/run-script".
*/
// eslint-disable-next-line no-console
console.log(stdout.toString().trimEnd());
}
opts.log.silly("lifecycle", "%j finished in %j", stage, pkg.name);
},
(err) => {
// propagate the exit code
const exitCode = err.code || 1;
opts.log.silly("lifecycle", "%j finished in %j", stage, pkg.name);
},
(err) => {
// propagate the exit code
const exitCode = err.code || 1;
// error logging has already occurred on stderr, but we need to stop the chain
log.error("lifecycle", "%j errored in %j, exiting %d", stage, pkg.name, exitCode);
// error logging has already occurred on stderr, but we need to stop the chain
log.error("lifecycle", "%j errored in %j, exiting %d", stage, pkg.name, exitCode);
// ensure clean logging, avoiding spurious log dump
err.name = "ValidationError";
// ensure clean logging, avoiding spurious log dump
err.name = "ValidationError";
// our yargs.fail() handler expects a numeric .exitCode, not .errno
err.exitCode = exitCode;
process.exitCode = exitCode;
// our yargs.fail() handler expects a numeric .exitCode, not .errno
err.exitCode = exitCode;
process.exitCode = exitCode;
// stop the chain
throw err;
}
// stop the chain
throw err;
}
)
);

@@ -166,0 +174,0 @@ }

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