@lerna/run-lifecycle
Advanced tools
Comparing version 3.7.0 to 3.7.1
@@ -6,2 +6,14 @@ # Change Log | ||
## [3.7.1](https://github.com/lerna/lerna/compare/v3.7.0...v3.7.1) (2018-12-20) | ||
### Bug Fixes | ||
* **run-lifecycle:** Accept opts.log, defaulting to libnpm/log ([dde588a](https://github.com/lerna/lerna/commit/dde588a)) | ||
* **run-lifecycle:** Do not execute on packages that lack the target script, avoiding spurious logs ([c0ad316](https://github.com/lerna/lerna/commit/c0ad316)) | ||
# [3.7.0](https://github.com/lerna/lerna/compare/v3.6.0...v3.7.0) (2018-12-19) | ||
@@ -8,0 +20,0 @@ |
{ | ||
"name": "@lerna/run-lifecycle", | ||
"version": "3.7.0", | ||
"version": "3.7.1", | ||
"description": "An internal Lerna tool", | ||
@@ -37,3 +37,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "89b53ff2b561e69fad3a3e8671d7dcd0f1c09c3e" | ||
"gitHead": "284aa4747dad26977790d6730ab2f640eb099cb4" | ||
} |
@@ -13,2 +13,3 @@ "use strict"; | ||
{ | ||
log: { default: log }, | ||
// provide aliases for some dash-cased props | ||
@@ -29,5 +30,5 @@ "ignore-prepublish": {}, | ||
{ | ||
other(key) { | ||
// allow any other keys _except_ circular objects | ||
return key !== "log" && key !== "logstream"; | ||
other() { | ||
// open up the pudding | ||
return true; | ||
}, | ||
@@ -38,4 +39,2 @@ } | ||
function runLifecycle(pkg, stage, _opts) { | ||
log.silly("run-lifecycle", stage, pkg.name); | ||
// back-compat for @lerna/npm-conf instances | ||
@@ -52,6 +51,12 @@ // https://github.com/isaacs/proto-list/blob/27764cd/proto-list.js#L14 | ||
if (!pkg.scripts || !pkg.scripts[stage]) { | ||
opts.log.silly("run-lifecycle", "No script for %j in %j, continuing", stage, pkg.name); | ||
return Promise.resolve(pkg); | ||
} | ||
// https://github.com/zkat/figgy-pudding/blob/7d68bd3/index.js#L42-L64 | ||
for (const [key, val] of opts) { | ||
// omit falsy values | ||
if (val != null) { | ||
// omit falsy values and circular objects | ||
if (val != null && key !== "log" && key !== "logstream") { | ||
config[key] = val; | ||
@@ -77,2 +82,4 @@ } | ||
opts.log.silly("run-lifecycle", stage, pkg.name); | ||
return runScript(pkg, stage, dir, { | ||
@@ -82,3 +89,3 @@ config, | ||
failOk: false, | ||
log, | ||
log: opts.log, | ||
ignorePrepublish, | ||
@@ -115,9 +122,3 @@ ignoreScripts, | ||
return (pkg, stage) => { | ||
if (pkg.scripts && pkg.scripts[stage]) { | ||
return runLifecycle(pkg, stage, cfg); | ||
} | ||
return Promise.resolve(pkg); | ||
}; | ||
return (pkg, stage) => runLifecycle(pkg, stage, cfg); | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7501