Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(run): update docs for v6 (#3366)
- Loading branch information
1 parent
8a1660e
commit 130f490
Showing
13 changed files
with
120 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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`). | ||
|
||
::: |
Oops, something went wrong.