@lerna/run
Advanced tools
Comparing version 3.3.2 to 3.5.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [3.5.0](https://github.com/lerna/lerna/compare/v3.4.3...v3.5.0) (2018-11-27) | ||
### Features | ||
* **run:** Log package name and timing in runScriptInPackageCapturing ([#1781](https://github.com/lerna/lerna/issues/1781)) ([b69a728](https://github.com/lerna/lerna/commit/b69a728)) | ||
<a name="3.3.2"></a> | ||
@@ -8,0 +19,0 @@ ## [3.3.2](https://github.com/lerna/lerna/compare/v3.3.1...v3.3.2) (2018-09-12) |
15
index.js
@@ -10,2 +10,3 @@ "use strict"; | ||
const output = require("@lerna/output"); | ||
const timer = require("@lerna/timer"); | ||
const ValidationError = require("@lerna/validation-error"); | ||
@@ -78,2 +79,3 @@ const { getFilteredPackages } = require("@lerna/filter-options"); | ||
let chain = Promise.resolve(); | ||
const getElapsed = timer(); | ||
@@ -112,6 +114,7 @@ if (this.options.parallel) { | ||
"run", | ||
"Ran npm script '%s' in %d %s:", | ||
"Ran npm script '%s' in %d %s in %ss:", | ||
this.script, | ||
this.count, | ||
this.packagePlural | ||
this.packagePlural, | ||
(getElapsed() / 1000).toFixed(1) | ||
); | ||
@@ -152,3 +155,11 @@ this.logger.success("", this.packagesWithScript.map(pkg => `- ${pkg.name}`).join("\n")); | ||
runScriptInPackageCapturing(pkg) { | ||
const getElapsed = timer(); | ||
return npmRunScript(this.script, this.getOpts(pkg)).then(result => { | ||
this.logger.info( | ||
"run", | ||
"Ran npm script '%s' in '%s' in %ss:", | ||
this.script, | ||
pkg.name, | ||
(getElapsed() / 1000).toFixed(1) | ||
); | ||
output(result.stdout); | ||
@@ -155,0 +166,0 @@ |
{ | ||
"name": "@lerna/run", | ||
"version": "3.3.2", | ||
"version": "3.5.0", | ||
"description": "Run an npm script in each package that contains that script", | ||
@@ -38,11 +38,12 @@ "keywords": [ | ||
"@lerna/batch-packages": "^3.1.2", | ||
"@lerna/command": "^3.3.0", | ||
"@lerna/filter-options": "^3.3.2", | ||
"@lerna/command": "^3.5.0", | ||
"@lerna/filter-options": "^3.5.0", | ||
"@lerna/npm-run-script": "^3.3.0", | ||
"@lerna/output": "^3.0.0", | ||
"@lerna/run-parallel-batches": "^3.0.0", | ||
"@lerna/timer": "^3.5.0", | ||
"@lerna/validation-error": "^3.0.0", | ||
"p-map": "^1.2.0" | ||
}, | ||
"gitHead": "96e1c0086244da05af5602e56cbd790662b0b40a" | ||
"gitHead": "1c142db1ecb50120f0ddce8ff8a7d9cde1bee278" | ||
} |
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
18157
190
9
+ Added@lerna/timer@^3.5.0
+ Added@lerna/timer@3.13.0(transitive)
Updated@lerna/command@^3.5.0
Updated@lerna/filter-options@^3.5.0