Socket
Socket
Sign inDemoInstall

@lerna/run

Package Overview
Dependencies
Maintainers
2
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lerna/run - npm Package Compare versions

Comparing version 5.6.1 to 6.0.0-alpha.0

2

command.js

@@ -78,3 +78,3 @@ "use strict";

group: "Command Options:",
describe: "When useNx is true, show verbose output from dependent tasks.",
describe: "When useNx is not false, show verbose output from dependent tasks.",
type: "boolean",

@@ -81,0 +81,0 @@ },

@@ -11,3 +11,3 @@ /* eslint-disable */

const { output } = require("@lerna/output");
const { Profiler } = require("@lerna/profiler");
const { Profiler, generateProfileOutputPath } = require("@lerna/profiler");
const { timer } = require("@lerna/timer");

@@ -41,2 +41,10 @@ const { runTopologically } = require("@lerna/run-topologically");

// Check this.argv (not this.options) so that we only error in this case when --npm-client is set via the CLI (not via lerna.json which is a legitimate use case for other things)
if (this.argv.npmClient && this.options.useNx !== false) {
throw new ValidationError(
"run",
"The legacy task runner option `--npm-client` is not currently supported. Please open an issue on https://github.com/lerna/lerna if you require this feature."
);
}
// inverted boolean options

@@ -71,3 +79,3 @@ this.bail = this.options.bail !== false;

execute() {
if (!this.options.useNx) {
if (this.options.useNx === false) {
this.logger.info(

@@ -85,3 +93,3 @@ "",

if (this.options.useNx) {
if (this.options.useNx !== false) {
chain = chain.then(() => this.runScriptsUsingNx());

@@ -191,2 +199,7 @@ } else if (this.options.parallel) {

}
if (this.options.profile) {
const absolutePath = generateProfileOutputPath(this.options.profileLocation);
// Nx requires a workspace relative path for this
process.env.NX_PROFILE = path.relative(this.project.rootPath, absolutePath);
}
performance.mark("init-local");

@@ -247,2 +260,6 @@ this.configureNxOutput();

if (this.options.prefix === false && !this.options.stream) {
this.logger.warn(this.name, `"no-prefix" is ignored when not using streaming output.`);
}
const outputStyle = this.options.stream

@@ -342,10 +359,9 @@ ? this.prefix

return nxOutput;
} catch (e) {
} catch (err) {
// This should be unreachable and we would want to know if it somehow occurred in a user's setup.
this.logger.error(
"\n",
"You have set 'useNx: true' in lerna.json, but you haven't installed Nx as a dependency.\n" +
"To do it run 'npm install -D nx@latest' or 'yarn add -D -W nx@latest'.\n" +
"Optional: To configure the caching and distribution run 'npx nx init' after installing it."
"There was a critical error when configuring the task runner, please report this on https://github.com/lerna/lerna"
);
process.exit(1);
throw err;
}

@@ -352,0 +368,0 @@ }

{
"name": "@lerna/run",
"version": "5.6.1",
"version": "6.0.0-alpha.0",
"description": "Run an npm script in each package that contains that script",

@@ -36,14 +36,14 @@ "keywords": [

"dependencies": {
"@lerna/command": "5.6.1",
"@lerna/filter-options": "5.6.1",
"@lerna/npm-run-script": "5.6.1",
"@lerna/output": "5.6.1",
"@lerna/profiler": "5.6.1",
"@lerna/run-topologically": "5.6.1",
"@lerna/timer": "5.6.1",
"@lerna/validation-error": "5.6.1",
"@lerna/command": "6.0.0-alpha.0",
"@lerna/filter-options": "6.0.0-alpha.0",
"@lerna/npm-run-script": "6.0.0-alpha.0",
"@lerna/output": "6.0.0-alpha.0",
"@lerna/profiler": "6.0.0-alpha.0",
"@lerna/run-topologically": "6.0.0-alpha.0",
"@lerna/timer": "6.0.0-alpha.0",
"@lerna/validation-error": "6.0.0-alpha.0",
"fs-extra": "^9.1.0",
"p-map": "^4.0.0"
},
"gitHead": "c455b1ce9c6de70bd876c1304cc93124b6a1bbaa"
"gitHead": "84597c511c4503562c641b481a2854137465ba5c"
}

@@ -114,21 +114,4 @@ # `@lerna/run`

### `useNx` (experimental)
### `useNx=false`
Enables integration with [Nx](https://nx.dev). Setting `"useNx": true` in `lerna.json` will tell Lerna to delegate
running tasks to Nx instead of using `p-map` and `p-queue`. This only works if Nx is installed and `nx.json` is present.
Example of `nx.json`:
```json
{
"extends": "nx/presets/npm.json",
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": ["build"]
}
}
}
}
```
By setting `useNx` to `false` you can use the legacy task running implementations in `lerna` (`p-map` and `p-queue`) instead of using the default modern task runner implementation powered by [Nx](https://nx.dev).
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