From 1bb36dca5a55b331e10d079f1b41ec53978aade8 Mon Sep 17 00:00:00 2001 From: Victor Savkin Date: Tue, 11 Oct 2022 17:04:00 -0400 Subject: [PATCH] cleanup(docs): misc updates --- commands/run/index.js | 6 +- core/global-options/README.md | 2 +- core/lerna/commands/add-caching/index.js | 2 +- e2e/tests/lerna-create/lerna-create.spec.ts | 13 +- .../lerna-run-legacy-task-runner.spec.ts | 44 +- .../lerna-run-nx-include-dependencies.spec.ts | 134 +---- .../lerna-run-nx-incompatible-options.spec.ts | 356 +++--------- e2e/tests/lerna-run/lerna-run.spec.ts | 524 +++++------------- .../concepts/task-pipeline-configuration.md | 2 +- website/docs/lerna-and-nx.md | 2 +- website/docs/lerna6-obsolete-options.md | 50 ++ .../using-lerna-powered-by-nx-to-run-tasks.md | 40 -- website/sidebars.js | 3 +- 13 files changed, 353 insertions(+), 825 deletions(-) create mode 100644 website/docs/lerna6-obsolete-options.md delete mode 100644 website/docs/recipes/using-lerna-powered-by-nx-to-run-tasks.md diff --git a/commands/run/index.js b/commands/run/index.js index 021c20c2d6..412c2257bf 100644 --- a/commands/run/index.js +++ b/commands/run/index.js @@ -285,21 +285,21 @@ class RunCommand extends Command { if (this.options.parallel || this.options.sort !== undefined) { this.logger.warn( this.name, - `"parallel", "sort", and "no-sort" are ignored when nx.json has targetDefaults defined. See https://lerna.js.org/docs/recipes/using-lerna-powered-by-nx-to-run-tasks for details.` + `"parallel", "sort", and "no-sort" are ignored when nx.json has targetDefaults defined. See https://lerna.js.org/docs/lerna6-obsolete-options for details.` ); } if (this.options.includeDependencies) { this.logger.info( this.name, - `Using the "include-dependencies" option when nx.json has targetDefaults defined will include both task dependencies detected by Nx and project dependencies detected by Lerna. See https://lerna.js.org/docs/recipes/using-lerna-powered-by-nx-to-run-tasks#--include-dependencies for details.` + `Using the "include-dependencies" option when nx.json has targetDefaults defined will include both task dependencies detected by Nx and project dependencies detected by Lerna. See https://lerna.js.org/docs/lerna6-obsolete-options#--include-dependencies for details.` ); } if (this.options.ignore) { this.logger.info( this.name, - `Using the "ignore" option when nx.json has targetDefaults defined will exclude only tasks that are not determined to be required by Nx. See https://lerna.js.org/docs/recipes/using-lerna-powered-by-nx-to-run-tasks#--ignore for details.` + `Using the "ignore" option when nx.json has targetDefaults defined will exclude only tasks that are not determined to be required by Nx. See https://lerna.js.org/docs/lerna6-obsolete-options#--ignore for details.` ); } } else { diff --git a/core/global-options/README.md b/core/global-options/README.md index 49fcbb2d88..0d0e374790 100644 --- a/core/global-options/README.md +++ b/core/global-options/README.md @@ -31,7 +31,7 @@ Disable progress bars. This is always the case in a CI environment. ### `--no-sort` -Note: As of Lerna 6 this property is ignored and should be configured in the `nx.json` file instead. Use `lerna add-caching` to set up the `nx.json` file. +Note: As of Lerna 6 this property is ignored when `nx.json` is present. By default, all tasks execute on packages in topologically sorted order as to respect the dependency relationships of the packages in question. Cycles are broken on a best-effort basis in a way not guaranteed to be consistent across Lerna invocations. diff --git a/core/lerna/commands/add-caching/index.js b/core/lerna/commands/add-caching/index.js index 7879da7d44..bd4c180052 100644 --- a/core/lerna/commands/add-caching/index.js +++ b/core/lerna/commands/add-caching/index.js @@ -93,7 +93,7 @@ class AddCachingCommand extends Command { ); this.logger.info( "add-caching", - "Note that the legacy task runner options of --sort, --no-sort and --parallel no longer apply. Learn more here: https://lerna.js.org/docs/recipes/using-lerna-powered-by-nx-to-run-tasks" + "Note that the legacy task runner options of --sort, --no-sort and --parallel no longer apply. Learn more here: https://lerna.js.org/docs/lerna6-obsolete-options" ); } diff --git a/e2e/tests/lerna-create/lerna-create.spec.ts b/e2e/tests/lerna-create/lerna-create.spec.ts index af53be9427..5df4e54796 100644 --- a/e2e/tests/lerna-create/lerna-create.spec.ts +++ b/e2e/tests/lerna-create/lerna-create.spec.ts @@ -1186,18 +1186,15 @@ describe("lerna-create", () => { lerna notice cli v999.9.9-e2e.0 lerna notice filter including "test-script" lerna info filter [ 'test-script' ] - - > test-script:test + lerna info Executing command in 1 package: "npm run test" + lerna info run Ran npm script 'test' in 'test-script' in X.Xs: > test-script@0.0.0 test > node ./__tests__/test-script.test.js - testScript tests passed - - - - > Lerna (powered by Nx) Successfully ran target test for project test-script - + testScript tests passed + lerna success run Ran npm script 'test' in 1 package in X.Xs: + lerna success - test-script `); }); diff --git a/e2e/tests/lerna-run/lerna-run-legacy-task-runner.spec.ts b/e2e/tests/lerna-run/lerna-run-legacy-task-runner.spec.ts index 25a09f2f07..a8547ed868 100644 --- a/e2e/tests/lerna-run/lerna-run-legacy-task-runner.spec.ts +++ b/e2e/tests/lerna-run/lerna-run-legacy-task-runner.spec.ts @@ -223,15 +223,15 @@ describe("lerna-run-legacy-task-runner", () => { const output = await fixture.lerna(`run print-name --npm-client=yarn`); expect(output.combinedOutput).toMatchInlineSnapshot(` - yarn run v1.22.18 + yarn run v1.22.10 $ echo test-package-X test-package-X Done in X.Xs. - yarn run v1.22.18 + yarn run v1.22.10 $ echo test-package-X test-package-X Done in X.Xs. - yarn run v1.22.18 + yarn run v1.22.10 $ echo test-package-X test-package-X Done in X.Xs. @@ -253,31 +253,31 @@ describe("lerna-run-legacy-task-runner", () => { expect(output.combinedOutput).toMatchInlineSnapshot(` - > package-X@0.0.0 print-name - > echo test-package-X + > package-X@0.0.0 print-name + > echo test-package-X - test-package-X + test-package-X - > package-X@0.0.0 print-name - > echo test-package-X + > package-X@0.0.0 print-name + > echo test-package-X - test-package-X + test-package-X - > package-X@0.0.0 print-name - > echo test-package-X + > package-X@0.0.0 print-name + > echo test-package-X - test-package-X - lerna notice cli v999.9.9-e2e.0 - lerna info Executing command in 3 packages: "npm run print-name" - lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: - lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: - lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: - lerna success run Ran npm script 'print-name' in 3 packages in X.Xs: - lerna success - package-X - lerna success - package-X - lerna success - package-X + test-package-X + lerna notice cli v999.9.9-e2e.0 + lerna info Executing command in 3 packages: "npm run print-name" + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna success run Ran npm script 'print-name' in 3 packages in X.Xs: + lerna success - package-X + lerna success - package-X + lerna success - package-X - `); + `); }); }); diff --git a/e2e/tests/lerna-run/lerna-run-nx-include-dependencies.spec.ts b/e2e/tests/lerna-run/lerna-run-nx-include-dependencies.spec.ts index 3215333f75..dd5649e132 100644 --- a/e2e/tests/lerna-run/lerna-run-nx-include-dependencies.spec.ts +++ b/e2e/tests/lerna-run/lerna-run-nx-include-dependencies.spec.ts @@ -91,23 +91,15 @@ describe("lerna-run-nx-include-dependencies", () => { const output = await fixture.lerna("run print-name --scope package-3 -- --silent"); expect(output.combinedOutput).toMatchInlineSnapshot(` - - > package-X:print-name --silent - - > package-X@0.0.0 print-name - > echo test-package-X "--silent" - test-package-X --silent - - - - > Lerna (powered by Nx) Successfully ran target print-name for project package-X - - + test-package-X lerna notice cli v999.9.9-e2e.0 lerna verb rootPath /tmp/lerna-e2e/lerna-run-nx-include-dependencies/lerna-workspace lerna notice filter including "package-X" lerna info filter [ 'package-X' ] - lerna verb run nx.json was not found or is missing targetDefaults. Task dependencies will not be automatically included. + lerna info Executing command in 1 package: "npm run print-name --silent" + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna success run Ran npm script 'print-name' in 1 package in X.Xs: + lerna success - package-X `); }); @@ -120,23 +112,15 @@ describe("lerna-run-nx-include-dependencies", () => { const output = await fixture.lerna("run print-name --scope package-3 -- --silent"); expect(output.combinedOutput).toMatchInlineSnapshot(` - - > package-X:print-name --silent - - > package-X@0.0.0 print-name - > echo test-package-X "--silent" - test-package-X --silent - - - - > Lerna (powered by Nx) Successfully ran target print-name for project package-X - - + test-package-X lerna notice cli v999.9.9-e2e.0 lerna verb rootPath /tmp/lerna-e2e/lerna-run-nx-include-dependencies/lerna-workspace lerna notice filter including "package-X" lerna info filter [ 'package-X' ] - lerna verb run nx.json was not found or is missing targetDefaults. Task dependencies will not be automatically included. + lerna info Executing command in 1 package: "npm run print-name --silent" + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna success run Ran npm script 'print-name' in 1 package in X.Xs: + lerna success - package-X `); }); @@ -157,42 +141,18 @@ describe("lerna-run-nx-include-dependencies", () => { expect(output.combinedOutput).toMatchInlineSnapshot(` - > Lerna (powered by Nx) Running target print-name for project package-X and 2 task(s) it depends on - - - - > package-X:print-name - - - > package-X@0.0.0 print-name - > echo test-package-X - - test-package-X - - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - - > package-X:print-name - - > package-X@0.0.0 print-name - > echo test-package-X - test-package-X - - - - > Lerna (powered by Nx) Successfully ran target print-name for project package-X - - lerna notice cli v999.9.9-e2e.0 lerna verb rootPath /tmp/lerna-e2e/lerna-run-nx-include-dependencies/lerna-workspace lerna notice filter including "package-X" lerna info filter [ 'package-X' ] - lerna verb run nx.json with targetDefaults was found. Task dependencies will be automatically included. + lerna info Executing command in 1 package: "npm run print-name" + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna success run Ran npm script 'print-name' in 1 package in X.Xs: + lerna success - package-X `); }); @@ -212,50 +172,33 @@ describe("lerna-run-nx-include-dependencies", () => { expect(output.combinedOutput).toMatchInlineSnapshot(` - > Lerna (powered by Nx) Running target print-name for 3 project(s): - - - package-X - - package-X - - package-X - - - - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - - - - > Lerna (powered by Nx) Successfully ran target print-name for 3 projects - - lerna notice cli v999.9.9-e2e.0 lerna verb rootPath /tmp/lerna-e2e/lerna-run-nx-include-dependencies/lerna-workspace lerna notice filter including "package-X" lerna notice filter including dependencies lerna info filter [ 'package-X' ] - lerna verb run nx.json with targetDefaults was found. Task dependencies will be automatically included. - lerna info run Using the "include-dependencies" option when nx.json has targetDefaults defined will include both task dependencies detected by Nx and project dependencies detected by Lerna. See https://lerna.js.org/docs/recipes/using-lerna-powered-by-nx-to-run-tasks#--include-dependencies for details. + lerna info Executing command in 3 packages: "npm run print-name" + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna success run Ran npm script 'print-name' in 3 packages in X.Xs: + lerna success - package-X + lerna success - package-X + lerna success - package-X `); }); @@ -275,44 +218,19 @@ describe("lerna-run-nx-include-dependencies", () => { expect(output.combinedOutput).toMatchInlineSnapshot(` - > Lerna (powered by Nx) Running target print-name for project package-X and 2 task(s) it depends on - - - - > package-X:print-name - - - > package-X@0.0.0 print-name - > echo test-package-X - - test-package-X - - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - - > package-X:print-name - - > package-X@0.0.0 print-name - > echo test-package-X - test-package-X - - - - > Lerna (powered by Nx) Successfully ran target print-name for project package-X - - lerna notice cli v999.9.9-e2e.0 lerna verb rootPath /tmp/lerna-e2e/lerna-run-nx-include-dependencies/lerna-workspace lerna notice filter including "package-X" lerna notice filter excluding "package-X" lerna info filter [ 'package-X', '!package-X' ] - lerna verb run nx.json with targetDefaults was found. Task dependencies will be automatically included. - lerna info run Using the "ignore" option when nx.json has targetDefaults defined will exclude only tasks that are not determined to be required by Nx. See https://lerna.js.org/docs/recipes/using-lerna-powered-by-nx-to-run-tasks#--ignore for details. + lerna info Executing command in 1 package: "npm run print-name" + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna success run Ran npm script 'print-name' in 1 package in X.Xs: + lerna success - package-X `); }); diff --git a/e2e/tests/lerna-run/lerna-run-nx-incompatible-options.spec.ts b/e2e/tests/lerna-run/lerna-run-nx-incompatible-options.spec.ts index 08384b154a..7e39fd99c0 100644 --- a/e2e/tests/lerna-run/lerna-run-nx-incompatible-options.spec.ts +++ b/e2e/tests/lerna-run/lerna-run-nx-incompatible-options.spec.ts @@ -68,44 +68,29 @@ describe("lerna-run-nx-incompatible-options", () => { expect(output.combinedOutput).toMatchInlineSnapshot(` - > Lerna (powered by Nx) Running target print-name for 3 project(s): - - - package-X - - package-X - - package-X - - - - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - - - - > Lerna (powered by Nx) Successfully ran target print-name for 3 projects - - lerna notice cli v999.9.9-e2e.0 + lerna info Executing command in 3 packages: "npm run print-name" + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna success run Ran npm script 'print-name' in 3 packages in X.Xs: + lerna success - package-X + lerna success - package-X + lerna success - package-X `); }); @@ -114,46 +99,21 @@ describe("lerna-run-nx-incompatible-options", () => { const output = await fixture.lerna(`run print-name --parallel`); expect(output.combinedOutput).toMatchInlineSnapshot(` - - > Lerna (powered by Nx) Running target print-name for 3 project(s): - - - package-X - - package-X - - package-X - - - - > package-X:print-name - - - > package-X@0.0.0 print-name - > echo test-package-X - - test-package-X - - > package-X:print-name - - - > package-X@0.0.0 print-name - > echo test-package-X - - test-package-X - - > package-X:print-name - - - > package-X@0.0.0 print-name - > echo test-package-X - - test-package-X - - - - > Lerna (powered by Nx) Successfully ran target print-name for 3 projects - - + package-X: > package-X@0.0.0 print-name + package-X: > echo test-package-X + package-X: > package-X@0.0.0 print-name + package-X: > echo test-package-X + package-X: > package-X@0.0.0 print-name + package-X: > echo test-package-X + package-X: test-package-X + package-X: test-package-X + package-X: test-package-X lerna notice cli v999.9.9-e2e.0 - lerna WARN run "parallel", "sort", and "no-sort" are ignored when nx.json has targetDefaults defined. See https://lerna.js.org/docs/recipes/using-lerna-powered-by-nx-to-run-tasks for details. + lerna info Executing command in 3 packages: "npm run print-name" + lerna success run Ran npm script 'print-name' in 3 packages in X.Xs: + lerna success - package-X + lerna success - package-X + lerna success - package-X `); }); @@ -163,45 +123,29 @@ describe("lerna-run-nx-incompatible-options", () => { expect(output.combinedOutput).toMatchInlineSnapshot(` - > Lerna (powered by Nx) Running target print-name for 3 project(s): - - - package-X - - package-X - - package-X - - - - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - - - - > Lerna (powered by Nx) Successfully ran target print-name for 3 projects - - lerna notice cli v999.9.9-e2e.0 - lerna WARN run "parallel", "sort", and "no-sort" are ignored when nx.json has targetDefaults defined. See https://lerna.js.org/docs/recipes/using-lerna-powered-by-nx-to-run-tasks for details. + lerna info Executing command in 3 packages: "npm run print-name" + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna success run Ran npm script 'print-name' in 3 packages in X.Xs: + lerna success - package-X + lerna success - package-X + lerna success - package-X `); }); @@ -211,45 +155,29 @@ describe("lerna-run-nx-incompatible-options", () => { expect(output.combinedOutput).toMatchInlineSnapshot(` - > Lerna (powered by Nx) Running target print-name for 3 project(s): - - - package-X - - package-X - - package-X - - - - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - - - - > Lerna (powered by Nx) Successfully ran target print-name for 3 projects - - lerna notice cli v999.9.9-e2e.0 - lerna WARN run "parallel", "sort", and "no-sort" are ignored when nx.json has targetDefaults defined. See https://lerna.js.org/docs/recipes/using-lerna-powered-by-nx-to-run-tasks for details. + lerna info Executing command in 3 packages: "npm run print-name" + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna success run Ran npm script 'print-name' in 3 packages in X.Xs: + lerna success - package-X + lerna success - package-X + lerna success - package-X `); }); @@ -259,46 +187,30 @@ describe("lerna-run-nx-incompatible-options", () => { expect(output.combinedOutput).toMatchInlineSnapshot(` - > Lerna (powered by Nx) Running target print-name for 3 project(s): - - - package-X - - package-X - - package-X - - - - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - - - - > Lerna (powered by Nx) Successfully ran target print-name for 3 projects - - lerna notice cli v999.9.9-e2e.0 lerna notice filter including dependencies - lerna info run Using the "include-dependencies" option when nx.json has targetDefaults defined will include both task dependencies detected by Nx and project dependencies detected by Lerna. See https://lerna.js.org/docs/recipes/using-lerna-powered-by-nx-to-run-tasks#--include-dependencies for details. + lerna info Executing command in 3 packages: "npm run print-name" + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna success run Ran npm script 'print-name' in 3 packages in X.Xs: + lerna success - package-X + lerna success - package-X + lerna success - package-X `); }); @@ -354,44 +266,29 @@ describe("lerna-run-nx-incompatible-options without nx.json", () => { expect(output.combinedOutput).toMatchInlineSnapshot(` - > Lerna (powered by Nx) Running target print-name for 3 project(s): - - - package-X - - package-X - - package-X - - - - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - - - - > Lerna (powered by Nx) Successfully ran target print-name for 3 projects - - lerna notice cli v999.9.9-e2e.0 + lerna info Executing command in 3 packages: "npm run print-name" + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna success run Ran npm script 'print-name' in 3 packages in X.Xs: + lerna success - package-X + lerna success - package-X + lerna success - package-X `); }); @@ -400,45 +297,21 @@ describe("lerna-run-nx-incompatible-options without nx.json", () => { const output = await fixture.lerna(`run print-name --parallel`); expect(output.combinedOutput).toMatchInlineSnapshot(` - - > Lerna (powered by Nx) Running target print-name for 3 project(s): - - - package-X - - package-X - - package-X - - - - > package-X:print-name - - - > package-X@0.0.0 print-name - > echo test-package-X - - test-package-X - - > package-X:print-name - - - > package-X@0.0.0 print-name - > echo test-package-X - - test-package-X - - > package-X:print-name - - - > package-X@0.0.0 print-name - > echo test-package-X - - test-package-X - - - - > Lerna (powered by Nx) Successfully ran target print-name for 3 projects - - + package-X: > package-X@0.0.0 print-name + package-X: > echo test-package-X + package-X: test-package-X + package-X: > package-X@0.0.0 print-name + package-X: > echo test-package-X + package-X: > package-X@0.0.0 print-name + package-X: > echo test-package-X + package-X: test-package-X + package-X: test-package-X lerna notice cli v999.9.9-e2e.0 + lerna info Executing command in 3 packages: "npm run print-name" + lerna success run Ran npm script 'print-name' in 3 packages in X.Xs: + lerna success - package-X + lerna success - package-X + lerna success - package-X `); }); @@ -448,44 +321,29 @@ describe("lerna-run-nx-incompatible-options without nx.json", () => { expect(output.combinedOutput).toMatchInlineSnapshot(` - > Lerna (powered by Nx) Running target print-name for 3 project(s): - - - package-X - - package-X - - package-X - - - - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - - - - > Lerna (powered by Nx) Successfully ran target print-name for 3 projects - - lerna notice cli v999.9.9-e2e.0 + lerna info Executing command in 3 packages: "npm run print-name" + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna success run Ran npm script 'print-name' in 3 packages in X.Xs: + lerna success - package-X + lerna success - package-X + lerna success - package-X `); }); @@ -495,44 +353,29 @@ describe("lerna-run-nx-incompatible-options without nx.json", () => { expect(output.combinedOutput).toMatchInlineSnapshot(` - > Lerna (powered by Nx) Running target print-name for 3 project(s): - - - package-X - - package-X - - package-X - - - - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - - - - > Lerna (powered by Nx) Successfully ran target print-name for 3 projects - - lerna notice cli v999.9.9-e2e.0 + lerna info Executing command in 3 packages: "npm run print-name" + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna success run Ran npm script 'print-name' in 3 packages in X.Xs: + lerna success - package-X + lerna success - package-X + lerna success - package-X `); }); @@ -542,45 +385,30 @@ describe("lerna-run-nx-incompatible-options without nx.json", () => { expect(output.combinedOutput).toMatchInlineSnapshot(` - > Lerna (powered by Nx) Running target print-name for 3 project(s): - - - package-X - - package-X - - package-X - - - - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - > package-X:print-name - - > package-X@0.0.0 print-name > echo test-package-X test-package-X - - - - > Lerna (powered by Nx) Successfully ran target print-name for 3 projects - - lerna notice cli v999.9.9-e2e.0 lerna notice filter including dependencies + lerna info Executing command in 3 packages: "npm run print-name" + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna success run Ran npm script 'print-name' in 3 packages in X.Xs: + lerna success - package-X + lerna success - package-X + lerna success - package-X `); }); diff --git a/e2e/tests/lerna-run/lerna-run.spec.ts b/e2e/tests/lerna-run/lerna-run.spec.ts index d44d325cf0..20acd8b45e 100644 --- a/e2e/tests/lerna-run/lerna-run.spec.ts +++ b/e2e/tests/lerna-run/lerna-run.spec.ts @@ -56,50 +56,20 @@ describe("lerna-run", () => { it("should run script on all child packages", async () => { const output = await fixture.lerna("run print-name -- --silent"); expect(output.combinedOutput).toMatchInlineSnapshot(` - - > Lerna (powered by Nx) Running target print-name for 3 project(s): - - - package-X - - package-X - - package-X - - With additional flags: - --silent=true - - - - > package-X:print-name --silent - - - > package-X@0.0.0 print-name - > echo test-package-X "--silent" - - test-package-X --silent - - > package-X:print-name --silent - - - > package-X@0.0.0 print-name - > echo test-package-X "--silent" - - test-package-X --silent - - > package-X:print-name --silent - - - > package-X@0.0.0 print-name - > echo test-package-X "--silent" - - test-package-X --silent - - - - > Lerna (powered by Nx) Successfully ran target print-name for 3 projects - - - lerna notice cli v999.9.9-e2e.0 - - `); + test-package-X + test-package-X + test-package-X + lerna notice cli v999.9.9-e2e.0 + lerna info Executing command in 3 packages: "npm run print-name --silent" + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna success run Ran npm script 'print-name' in 3 packages in X.Xs: + lerna success - package-X + lerna success - package-X + lerna success - package-X + + `); }); describe("--stream", () => { @@ -107,42 +77,15 @@ describe("lerna-run", () => { const output = await fixture.lerna("run print-name --stream --concurrency=1 -- --silent"); expect(output.combinedOutput).toMatchInlineSnapshot(` - - > Lerna (powered by Nx) Running target print-name for 3 project(s): - - - package-X - - package-X - - package-X - - With additional flags: - --silent=true - - - - > package-X:print-name --silent - - package-X: > package-X@0.0.0 print-name - package-X: > echo test-package-X "--silent" - package-X: test-package-X --silent - - > package-X:print-name --silent - - package-X: > package-X@0.0.0 print-name - package-X: > echo test-package-X "--silent" - package-X: test-package-X --silent - - > package-X:print-name --silent - - package-X: > package-X@0.0.0 print-name - package-X: > echo test-package-X "--silent" - package-X: test-package-X --silent - - - - > Lerna (powered by Nx) Successfully ran target print-name for 3 projects - - + package-X: test-package-X + package-X: test-package-X + package-X: test-package-X lerna notice cli v999.9.9-e2e.0 + lerna info Executing command in 3 packages: "npm run print-name --silent" + lerna success run Ran npm script 'print-name' in 3 packages in X.Xs: + lerna success - package-X + lerna success - package-X + lerna success - package-X `); }); @@ -153,50 +96,17 @@ describe("lerna-run", () => { const output = await fixture.lerna("run print-name --parallel -- --silent"); expect(output.combinedOutput).toMatchInlineSnapshot(` + package-X: test-package-X + package-X: test-package-X + package-X: test-package-X + lerna notice cli v999.9.9-e2e.0 + lerna info Executing command in 3 packages: "npm run print-name --silent" + lerna success run Ran npm script 'print-name' in 3 packages in X.Xs: + lerna success - package-X + lerna success - package-X + lerna success - package-X - > Lerna (powered by Nx) Running target print-name for 3 project(s): - - - package-X - - package-X - - package-X - - With additional flags: - --silent=true - - - - > package-X:print-name --silent - - - > package-X@0.0.0 print-name - > echo test-package-X "--silent" - - test-package-X --silent - - > package-X:print-name --silent - - - > package-X@0.0.0 print-name - > echo test-package-X "--silent" - - test-package-X --silent - - > package-X:print-name --silent - - - > package-X@0.0.0 print-name - > echo test-package-X "--silent" - - test-package-X --silent - - - - > Lerna (powered by Nx) Successfully ran target print-name for 3 projects - - - lerna notice cli v999.9.9-e2e.0 - - `); + `); }); }); @@ -206,51 +116,17 @@ describe("lerna-run", () => { const output = await fixture.lerna("run print-name --no-prefix --parallel -- --silent"); expect(output.combinedOutput).toMatchInlineSnapshot(` + test-package-X + test-package-X + test-package-X + lerna notice cli v999.9.9-e2e.0 + lerna info Executing command in 3 packages: "npm run print-name --silent" + lerna success run Ran npm script 'print-name' in 3 packages in X.Xs: + lerna success - package-X + lerna success - package-X + lerna success - package-X - > Lerna (powered by Nx) Running target print-name for 3 project(s): - - - package-X - - package-X - - package-X - - With additional flags: - --silent=true - - - - > package-X:print-name --silent - - - > package-X@0.0.0 print-name - > echo test-package-X "--silent" - - test-package-X --silent - - > package-X:print-name --silent - - - > package-X@0.0.0 print-name - > echo test-package-X "--silent" - - test-package-X --silent - - > package-X:print-name --silent - - - > package-X@0.0.0 print-name - > echo test-package-X "--silent" - - test-package-X --silent - - - - > Lerna (powered by Nx) Successfully ran target print-name for 3 projects - - - lerna notice cli v999.9.9-e2e.0 - lerna WARN run "no-prefix" is ignored when not using streaming output. - - `); + `); }); }); @@ -259,42 +135,15 @@ describe("lerna-run", () => { const output = await fixture.lerna("run print-name --no-prefix --concurrency=1 --stream -- --silent"); expect(output.combinedOutput).toMatchInlineSnapshot(` - - > Lerna (powered by Nx) Running target print-name for 3 project(s): - - - package-X - - package-X - - package-X - - With additional flags: - --silent=true - - - - > package-X:print-name --silent - - > package-X@0.0.0 print-name - > echo test-package-X "--silent" - test-package-X --silent - - > package-X:print-name --silent - - > package-X@0.0.0 print-name - > echo test-package-X "--silent" - test-package-X --silent - - > package-X:print-name --silent - - > package-X@0.0.0 print-name - > echo test-package-X "--silent" - test-package-X --silent - - - - > Lerna (powered by Nx) Successfully ran target print-name for 3 projects - - + test-package-X + test-package-X + test-package-X lerna notice cli v999.9.9-e2e.0 + lerna info Executing command in 3 packages: "npm run print-name --silent" + lerna success run Ran npm script 'print-name' in 3 packages in X.Xs: + lerna success - package-X + lerna success - package-X + lerna success - package-X `); }); @@ -306,51 +155,21 @@ describe("lerna-run", () => { const output = await fixture.lerna("run print-name --profile -- --silent"); expect(output.combinedOutput).toMatchInlineSnapshot(` + test-package-X + test-package-X + test-package-X + lerna notice cli v999.9.9-e2e.0 + lerna info Executing command in 3 packages: "npm run print-name --silent" + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info profiler Performance profile saved to /tmp/lerna-e2e/lerna-run/lerna-workspace/Lerna-Profile-XXXXXXXXTXXXXXX.json + lerna success run Ran npm script 'print-name' in 3 packages in X.Xs: + lerna success - package-X + lerna success - package-X + lerna success - package-X - > Lerna (powered by Nx) Running target print-name for 3 project(s): - - - package-X - - package-X - - package-X - - With additional flags: - --silent=true - - - - > package-X:print-name --silent - - - > package-X@0.0.0 print-name - > echo test-package-X "--silent" - - test-package-X --silent - - > package-X:print-name --silent - - - > package-X@0.0.0 print-name - > echo test-package-X "--silent" - - test-package-X --silent - - > package-X:print-name --silent - - - > package-X@0.0.0 print-name - > echo test-package-X "--silent" - - test-package-X --silent - - - - > Lerna (powered by Nx) Successfully ran target print-name for 3 projects - - - Performance Profile: /tmp/lerna-e2e/lerna-run/lerna-workspace/Lerna-Profile-XXXXXXXXTXXXXXX.json - lerna notice cli v999.9.9-e2e.0 - - `); + `); const lernaProfileSavedOutputLine = output.combinedOutput.split("\n")[8]; @@ -365,51 +184,21 @@ describe("lerna-run", () => { const output = await fixture.lerna(`run print-name --profile --profile-location=profiles -- --silent`); expect(output.combinedOutput).toMatchInlineSnapshot(` + test-package-X + test-package-X + test-package-X + lerna notice cli v999.9.9-e2e.0 + lerna info Executing command in 3 packages: "npm run print-name --silent" + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info profiler Performance profile saved to /tmp/lerna-e2e/lerna-run/lerna-workspace/profiles/Lerna-Profile-XXXXXXXXTXXXXXX.json + lerna success run Ran npm script 'print-name' in 3 packages in X.Xs: + lerna success - package-X + lerna success - package-X + lerna success - package-X - > Lerna (powered by Nx) Running target print-name for 3 project(s): - - - package-X - - package-X - - package-X - - With additional flags: - --silent=true - - - - > package-X:print-name --silent - - - > package-X@0.0.0 print-name - > echo test-package-X "--silent" - - test-package-X --silent - - > package-X:print-name --silent - - - > package-X@0.0.0 print-name - > echo test-package-X "--silent" - - test-package-X --silent - - > package-X:print-name --silent - - - > package-X@0.0.0 print-name - > echo test-package-X "--silent" - - test-package-X --silent - - - - > Lerna (powered by Nx) Successfully ran target print-name for 3 projects - - - Performance Profile: /tmp/lerna-e2e/lerna-run/lerna-workspace/profiles/Lerna-Profile-XXXXXXXXTXXXXXX.json - lerna notice cli v999.9.9-e2e.0 - - `); + `); const lernaProfileSavedOutputLine = output.combinedOutput.split("\n")[8]; @@ -424,8 +213,27 @@ describe("lerna-run", () => { const output = await fixture.lerna(`run print-name --npm-client=yarn`, { silenceError: true }); expect(output.combinedOutput).toMatchInlineSnapshot(` + yarn run v1.22.10 + $ echo test-package-X + test-package-X + Done in X.Xs. + yarn run v1.22.10 + $ echo test-package-X + test-package-X + Done in X.Xs. + yarn run v1.22.10 + $ echo test-package-X + test-package-X + Done in X.Xs. lerna notice cli v999.9.9-e2e.0 - lerna ERR! 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. + lerna info Executing command in 3 packages: "yarn run print-name" + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna success run Ran npm script 'print-name' in 3 packages in X.Xs: + lerna success - package-X + lerna success - package-X + lerna success - package-X `); }); @@ -505,46 +313,31 @@ describe("lerna run with nx config", () => { expect(output.combinedOutput).toMatchInlineSnapshot(` - > Lerna (powered by Nx) Running target print-name for 3 project(s): - - - package-X - - package-X - - package-X - - - - > package-X:print-name - - - > package-X@0.0.0 print-name - > echo test-package-X - - test-package-X - - > package-X:print-name + > package-X@0.0.0 print-name + > echo test-package-X + test-package-X - > package-X@0.0.0 print-name - > echo test-package-X + > package-X@0.0.0 print-name + > echo test-package-X - test-package-X + test-package-X - > package-X:print-name + > package-X@0.0.0 print-name + > echo test-package-X + test-package-X + lerna notice cli v999.9.9-e2e.0 + lerna info Executing command in 3 packages: "npm run print-name" + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print-name' in 'package-X' in X.Xs: + lerna success run Ran npm script 'print-name' in 3 packages in X.Xs: + lerna success - package-X + lerna success - package-X + lerna success - package-X - > package-X@0.0.0 print-name - > echo test-package-X - - test-package-X - - - - > Lerna (powered by Nx) Successfully ran target print-name for 3 projects - - - lerna notice cli v999.9.9-e2e.0 - - `); + `); }); describe("run one", () => { @@ -553,20 +346,17 @@ describe("lerna run with nx config", () => { expect(output.combinedOutput).toMatchInlineSnapshot(` - > package-X:print-name-run-one-only - - > package-X@0.0.0 print-name-run-one-only - > echo test-package-X-run-one-only - test-package-X-run-one-only - - - - > Lerna (powered by Nx) Successfully ran target print-name-run-one-only for project package-X + > package-X@0.0.0 print-name-run-one-only + > echo test-package-X-run-one-only + test-package-X-run-one-only + lerna notice cli v999.9.9-e2e.0 + lerna info Executing command in 1 package: "npm run print-name-run-one-only" + lerna info run Ran npm script 'print-name-run-one-only' in 'package-X' in X.Xs: + lerna success run Ran npm script 'print-name-run-one-only' in 1 package in X.Xs: + lerna success - package-X - lerna notice cli v999.9.9-e2e.0 - - `); + `); }); it("should run script with colon on single child package using nx", async () => { @@ -574,20 +364,17 @@ describe("lerna run with nx config", () => { expect(output.combinedOutput).toMatchInlineSnapshot(` - > package-X:"print:name:run-one-only" - - > package-X@0.0.0 print:name:run-one-only - > echo test-package-X-run-one-only-with-colon - test-package-X-run-one-only-with-colon - - + > package-X@0.0.0 print:name:run-one-only + > echo test-package-X-run-one-only-with-colon - > Lerna (powered by Nx) Successfully ran target print:name:run-one-only for project package-X - - - lerna notice cli v999.9.9-e2e.0 + test-package-X-run-one-only-with-colon + lerna notice cli v999.9.9-e2e.0 + lerna info Executing command in 1 package: "npm run print:name:run-one-only" + lerna info run Ran npm script 'print:name:run-one-only' in 'package-X' in X.Xs: + lerna success run Ran npm script 'print:name:run-one-only' in 1 package in X.Xs: + lerna success - package-X - `); + `); }); }); @@ -596,36 +383,23 @@ describe("lerna run with nx config", () => { expect(output.combinedOutput).toMatchInlineSnapshot(` - > Lerna (powered by Nx) Running target print:name for 2 project(s): - - - package-X - - package-X - + > package-X@0.0.0 print:name + > echo test-package-X + test-package-X - > package-X:"print:name" + > package-X@0.0.0 print:name + > echo test-package-X + test-package-X + lerna notice cli v999.9.9-e2e.0 + lerna info Executing command in 2 packages: "npm run print:name" + lerna info run Ran npm script 'print:name' in 'package-X' in X.Xs: + lerna info run Ran npm script 'print:name' in 'package-X' in X.Xs: + lerna success run Ran npm script 'print:name' in 2 packages in X.Xs: + lerna success - package-X + lerna success - package-X - > package-X@0.0.0 print:name - > echo test-package-X - - test-package-X - - > package-X:"print:name" - - - > package-X@0.0.0 print:name - > echo test-package-X - - test-package-X - - - - > Lerna (powered by Nx) Successfully ran target print:name for 2 projects - - - lerna notice cli v999.9.9-e2e.0 - - `); + `); }); }); diff --git a/website/docs/concepts/task-pipeline-configuration.md b/website/docs/concepts/task-pipeline-configuration.md index 604e514a13..2f87d3d880 100644 --- a/website/docs/concepts/task-pipeline-configuration.md +++ b/website/docs/concepts/task-pipeline-configuration.md @@ -11,7 +11,7 @@ configure how Nx does it. :::tip -If you don't have `nx.json`, run `npx nx init`. +If you don't have `nx.json`, run `npx lerna add-caching`. ::: diff --git a/website/docs/lerna-and-nx.md b/website/docs/lerna-and-nx.md index 99ce912ffb..e354556800 100644 --- a/website/docs/lerna-and-nx.md +++ b/website/docs/lerna-and-nx.md @@ -49,7 +49,7 @@ Free and open source - Continue using Lerna as usual :::note -When Lerna is set to use Nx and detects `nx.json` with `targetDefaults` in the workspace, it will defer to Nx to detect task dependencies. Some options for `lerna run` will behave differently than older versions of Lerna. See [Using Lerna (Powered by Nx) to Run Tasks](./recipes/using-lerna-powered-by-nx-to-run-tasks) for more details. +When Lerna is set to use Nx and detects `nx.json` with `targetDefaults` in the workspace, it will defer to Nx to detect task dependencies. Some options for `lerna run` will behave differently than older versions of Lerna. See [Using Lerna (Powered by Nx) to Run Tasks](docs/lerna6-obsolete-options.md) for more details. ::: --- diff --git a/website/docs/lerna6-obsolete-options.md b/website/docs/lerna6-obsolete-options.md new file mode 100644 index 0000000000..3a9c1c5d76 --- /dev/null +++ b/website/docs/lerna6-obsolete-options.md @@ -0,0 +1,50 @@ +# Lerna 6: Obsolete Options + +Nx and Lerna work together seamlessly in the same workspace. + +When `nx.json` is detected in the current workspace, Lerna will respect the `nx.json` configuration during `lerna run` +and delegate to the Nx task runner. + +Nx will run tasks in an order and with a concurrency that it determines appropriate based on the task graph that it +creates. For more information, +see [Nx Mental Model: The Task Graph](https://nx.dev/concepts/mental-model#the-task-graph). + +**This behavior allows Nx to run tasks in the most efficient way possible, but it also means that some existing options +for `lerna run` become obsolete. +** + +## Obsolete Options + +### `--sort` and `--no-sort` + +When `nx.json` is present, Lerna will always run tasks in the order it deems is correct based on its knowledge of +project and task dependencies, so `--sort` and `--no-sort` have no effect. + +### `--parallel` + +Lerna will use the task graph to determine which tasks can be run in parallel and do so automatically, so `--parallel` +has no effect. + +:::note +If you want to limit the concurrency of tasks, you can still use +the [concurrency global option](https://github.com/lerna/lerna/blob/6cb8ab2d4af7ce25c812e8fb05cd04650105705f/core/global-options/README.md#--concurrency) +to accomplish this. +::: + +### `--include-dependencies` + +Lerna 6 will automatically run dependent tasks first when necessary, so `--include-dependencies` is obsolete. However, +the flag can still be used to include tasks that are not required (e.g., running the tests of all the dependent +projects). + +### `--ignore` + +When used with Nx, `--ignore` will never cause `lerna run` to exclude any tasks that are deemed to be +required [task graph](https://nx.dev/concepts/mental-model#the-task-graph). + +:::tip + +The effects on the options above will only apply if `nx.json` exists in the root with the `targetDefaults` property +defined. Otherwise, they will behave just as they would with Lerna's base task runner (if `useNx` is `false`). + +::: diff --git a/website/docs/recipes/using-lerna-powered-by-nx-to-run-tasks.md b/website/docs/recipes/using-lerna-powered-by-nx-to-run-tasks.md deleted file mode 100644 index bbc13b4e1c..0000000000 --- a/website/docs/recipes/using-lerna-powered-by-nx-to-run-tasks.md +++ /dev/null @@ -1,40 +0,0 @@ -# Using Lerna (Powered by Nx) to Run Tasks - -Nx and Lerna work together seamlessly in the same workspace. - -When `nx.json` is detected in the current workspace, Lerna will respect the `nx.json` configuration during `lerna run` and delegate to the Nx task runner. - -Nx will run tasks in an order and with a concurrency that it determines appropriate based on the task graph that it creates. For more information, see [Nx Mental Model: The Task Graph](https://nx.dev/concepts/mental-model#the-task-graph). - -**This behavior allows Nx to run tasks in the most efficient way possible, but it also means that some existing options for `lerna run` become obsolete. -** - -## Obsolete Options - -### `--sort` and `--no-sort` - -Nx will always run tasks in the order it deems is correct based on its knowledge of project and task dependencies, so `--sort` and `--no-sort` have no effect. - -### `--parallel` - -Nx will use the task graph to determine which tasks can be run in parallel and do so automatically, so `--parallel` has no effect. - -:::note -If you want to limit the concurrency of tasks, you can still use the [concurrency global option](https://github.com/lerna/lerna/blob/6cb8ab2d4af7ce25c812e8fb05cd04650105705f/core/global-options/README.md#--concurrency) to accomplish this. -::: - -### `--include-dependencies` - -Lerna by itself does not have knowledge of which tasks depend on others, so it defaults to excluding tasks on dependent projects when using [filter options](https://github.com/lerna/lerna/tree/6cb8ab2d4af7ce25c812e8fb05cd04650105705f/core/filter-options#lernafilter-options) and relies on `--include-dependencies` to manually specify that dependent projects' tasks should be included. - -This is no longer a problem when Lerna uses Nx to run tasks. Nx, utilizing its [task graph](https://nx.dev/concepts/mental-model#the-task-graph), will automatically run dependent tasks first when necessary, so `--include-dependencies` is obsolete. However, it can still be used to include project dependencies that Lerna detects but Nx does not deem necessary and would otherwise exclude. - -### `--ignore` - -When used with Nx, `--ignore` will never cause `lerna run` to exclude any tasks that are deemed to be required by the Nx [task graph](https://nx.dev/concepts/mental-model#the-task-graph). - -:::tip - -The effects on the options above will only apply if `nx.json` exists in the root with the `targetDefaults` property defined. Otherwise, they will behave just as they would with Lerna's base task runner (if `useNx` is `false`). - -::: diff --git a/website/sidebars.js b/website/sidebars.js index a76bf5aeea..a326ae6909 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -61,7 +61,7 @@ const sidebars = { { type: "category", label: "Recipes", - items: ["recipes/using-pnpm-with-lerna", "recipes/using-lerna-powered-by-nx-to-run-tasks"], + items: ["recipes/using-pnpm-with-lerna"], }, { type: "category", @@ -69,6 +69,7 @@ const sidebars = { items: ["api-reference/commands", "api-reference/configuration"], }, "faq", + "lerna6-obsolete-options", "troubleshooting", ], };