Socket
Socket
Sign inDemoInstall

@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 3.6.0 to 3.7.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [3.7.0](https://github.com/lerna/lerna/compare/v3.6.0...v3.7.0) (2018-12-19)
### Bug Fixes
* **run-lifecycle:** Omit circular options from config ([00eb5bd](https://github.com/lerna/lerna/commit/00eb5bd))
# [3.6.0](https://github.com/lerna/lerna/compare/v3.5.1...v3.6.0) (2018-12-07)

@@ -8,0 +19,0 @@

7

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

@@ -33,6 +33,7 @@ "keywords": [

"dependencies": {
"@lerna/npm-conf": "^3.4.1",
"@lerna/npm-conf": "^3.7.0",
"figgy-pudding": "^3.5.1",
"libnpm": "^2.0.1"
},
"gitHead": "8cc3196014f6fe8c9b41477b975c527d017a3daf"
"gitHead": "89b53ff2b561e69fad3a3e8671d7dcd0f1c09c3e"
}

@@ -5,2 +5,3 @@ "use strict";

const runScript = require("libnpm/run-script");
const figgyPudding = require("figgy-pudding");
const npmConf = require("@lerna/npm-conf");

@@ -11,12 +12,43 @@

function runLifecycle(pkg, stage, opts) {
const LifecycleConfig = figgyPudding(
{
// provide aliases for some dash-cased props
"ignore-prepublish": {},
ignorePrepublish: "ignore-prepublish",
"ignore-scripts": {},
ignoreScripts: "ignore-scripts",
"node-options": {},
nodeOptions: "node-options",
"script-shell": {},
scriptShell: "script-shell",
"scripts-prepend-node-path": {},
scriptsPrependNodePath: "scripts-prepend-node-path",
"unsafe-perm": {},
unsafePerm: "unsafe-perm",
},
{
other(key) {
// allow any other keys _except_ circular objects
return key !== "log" && key !== "logstream";
},
}
);
function runLifecycle(pkg, stage, _opts) {
log.silly("run-lifecycle", stage, pkg.name);
// back-compat for @lerna/npm-conf instances
// https://github.com/isaacs/proto-list/blob/27764cd/proto-list.js#L14
if ("root" in _opts) {
// eslint-disable-next-line no-param-reassign
_opts = _opts.snapshot;
}
const opts = LifecycleConfig(_opts);
const dir = pkg.location;
const config = {};
const dir = pkg.location;
// https://github.com/isaacs/proto-list/blob/27764cd/proto-list.js#L29
for (const key of opts.keys) {
const val = opts.get(key);
// https://github.com/zkat/figgy-pudding/blob/7d68bd3/index.js#L42-L64
for (const [key, val] of opts) {
// omit falsy values
if (val != null) {

@@ -33,2 +65,12 @@ config[key] = val;

// bring along camelCased aliases
const {
ignorePrepublish,
ignoreScripts,
nodeOptions,
scriptShell,
scriptsPrependNodePath,
unsafePerm,
} = opts;
return runScript(pkg, stage, dir, {

@@ -39,3 +81,8 @@ config,

log,
unsafePerm: true,
ignorePrepublish,
ignoreScripts,
nodeOptions,
scriptShell,
scriptsPrependNodePath,
unsafePerm,
}).then(

@@ -64,3 +111,3 @@ () => pkg,

function createRunner(commandOptions) {
const cfg = npmConf(commandOptions);
const cfg = npmConf(commandOptions).snapshot;

@@ -67,0 +114,0 @@ return (pkg, stage) => {

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