Skip to content

Commit

Permalink
docs: Move deprecated options for run command to bottom (#5180)
Browse files Browse the repository at this point in the history
  • Loading branch information
mehulkar committed Jun 3, 2023
1 parent eaf20a2 commit 2b1e7f0
Showing 1 changed file with 78 additions and 67 deletions.
145 changes: 78 additions & 67 deletions docs/pages/repo/docs/reference/command-line-reference/run.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,6 @@ Set the working directory of the command.
turbo run build --cwd=./somewhere/else
```

### `--deps`

<Callout type="error">
`--deps` is deprecated in `1.2.x`. Please use
[`--filter`](/repo/docs/core-concepts/monorepos/filtering#include-dependents-of-matched-workspaces)
instead.
</Callout>

Defaults to `true`. Include dependent workspace consumers in the execution.

```sh
turbo run build --deps
turbo run build --no-deps
```

**Example**

Let's say you have workspaces A, B, C, and D where A depends on B and C depends on D. You run `turbo run build` for the first time and everything is built and cached. Then, you change a line of code in B. With the `--deps` flag on, running `turbo run build` will execute `build` in B and then A, but not in C and D because they are not impacted by the change. If you were to run `turbo run build --no-deps` instead, turbo will only run `build` in B.

### `--dry / --dry-run`

Instead of executing tasks, display details about the affected workspaces and tasks that would be run.
Expand Down Expand Up @@ -245,18 +226,6 @@ Just a quick overview.
- `{}` allows for a comma-separated list of "or" expressions
- `!` at the beginning of a pattern will negate the match

### `--include-dependencies`

<Callout type="error">
`--include-dependencies` is deprecated in `1.2.x`. Please use
[`--filter`](/repo/docs/core-concepts/monorepos/filtering#include-dependencies-of-matched-workspaces)
instead.
</Callout>

Default `false`. When `true`, `turbo` will add any workspaces that the workspaces in the current execution _depend_ on (i.e. those declared in `dependencies` or `devDependencies`).

This is useful when using `--filter` in CI as it guarantees that every dependency needed for the execution is actually executed.

### `--no-cache`

Default `false`. Do not cache results of the task. This is useful for watch commands like `next dev` or `react-scripts start`.
Expand Down Expand Up @@ -340,42 +309,6 @@ turbo run build --remote-only

The same behavior can also be set via the `TURBO_REMOTE_ONLY=true` environment variable.

### `--scope`

<Callout type="error">
`--scope` is deprecated in `1.2.x`. Please use
[`--filter`](/repo/docs/core-concepts/monorepos/filtering#filter-by-package) instead.
</Callout>

`type: string[]`

Specify/filter workspaces to act as entry points for execution. Globs against `package.json` `name` field (and not the file system.)

```sh
turbo run lint --scope="@example/**"
turbo run dev --scope="@example/a" --scope="@example/b" --no-cache --no-deps
```

### `--since`

<Callout type="error">
`--since` is deprecated in `1.2.x`. Please use
[`--filter`](/repo/docs/core-concepts/monorepos/filtering#filter-by-changed-workspaces)
instead.
</Callout>

Filter execution based on which workspaces have changed since a merge-base.

```
turbo run build --since=origin/main
```

<Callout type="info">
**Important**: This uses the `git diff ${target_branch}...` mechanism to
identify which workspaces have changed. There is an assumption that all the
input files for a workspace exist inside their respective workspace folders.
</Callout>

### `--summarize`

Generates a JSON file in `.turbo/runs` containing metadata about the run, including affected workspaces,
Expand Down Expand Up @@ -475,5 +408,83 @@ turbo run build --verbosity=2
turbo run build -vvv
```

## Deprecated Options

### `--include-dependencies`

<Callout type="error">
`--include-dependencies` is deprecated in `1.2.x`. Please use
[`--filter`](/repo/docs/core-concepts/monorepos/filtering#include-dependencies-of-matched-workspaces)
instead.
</Callout>

Default `false`. When `true`, `turbo` will add any workspaces that the
workspaces in the current execution _depend_ on (i.e. those declared in
`dependencies` or `devDependencies`).

This is useful when using `--filter` in CI as it guarantees that every
dependency needed for the execution is actually executed.

### `--deps`

<Callout type="error">
`--deps` is deprecated in `1.2.x`. Please use
[`--filter`](/repo/docs/core-concepts/monorepos/filtering#include-dependents-of-matched-workspaces)
instead.
</Callout>

Defaults to `true`. Include dependent workspace consumers in the execution.

```sh
turbo run build --deps
turbo run build --no-deps
```

**Example**

Let's say you have workspaces A, B, C, and D where A depends on B and C depends
on D. You run `turbo run build` for the first time and everything is built and
cached. Then, you change a line of code in B. With the `--deps` flag on, running
`turbo run build` will execute `build` in B and then A, but not in C and D
because they are not impacted by the change. If you were to run
`turbo run build --no-deps` instead, turbo will only run `build` in B.

### `--scope`

<Callout type="error">
`--scope` is deprecated in `1.2.x`. Please use
[`--filter`](/repo/docs/core-concepts/monorepos/filtering#filter-by-package) instead.
</Callout>

`type: string[]`

Specify/filter workspaces to act as entry points for execution. Globs against
`package.json` `name` field (and not the file system.)

```sh
turbo run lint --scope="@example/**"
turbo run dev --scope="@example/a" --scope="@example/b" --no-cache --no-deps
```

### `--since`

<Callout type="error">
`--since` is deprecated in `1.2.x`, use
[`--filter`](/repo/docs/core-concepts/monorepos/filtering#filter-by-changed-workspaces)
instead.
</Callout>

Filter execution based on which workspaces have changed since a merge-base.

```
turbo run build --since=origin/main
```

<Callout type="info">
**Important**: This uses the `git diff ${target_branch}...` mechanism to
identify which workspaces have changed. There is an assumption that all the
input files for a workspace exist inside their respective workspace folders.
</Callout>

[1]: /repo/docs/reference/configuration#passThroughEnv
[2]: /repo/docs/reference/configuration#globalPassThroughEnv

1 comment on commit 2b1e7f0

@vercel
Copy link

@vercel vercel bot commented on 2b1e7f0 Jun 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.