Skip to content

Commit

Permalink
docs(core): document projectsAffectedByDependencyUpdates (#27134)
Browse files Browse the repository at this point in the history
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
No docs for new config flag

## Expected Behavior
Docs 🎉 

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #22259
  • Loading branch information
AgentEnder authored Jul 25, 2024
1 parent 97b0084 commit 8e596c3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/shared/using-nx/affected.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,22 @@ Nx provides two methods to exclude glob patterns (files and folders) from `affec
- Glob patterns defined in your `.gitignore` file are ignored.
- Glob patterns defined in an optional `.nxignore` file are ignored.

## Marking Projects Affected by Dependency Updates

By default, Nx will mark all projects as affected whenever your package manager's lock file changes. This behavior is a failsafe in case Nx misses a project that should be affected by a dependency update. If you'd like to opt in to a smarter behavior you can configure Nx to only mark projects as affected if they actually depend on the updated packages.

```json {% fileName="nx.json" %}
{
"pluginsConfig": {
"@nx/js": {
"projectsAffectedByDependencyUpdates": "auto"
}
}
}
```

The flag `projectsAffectedByDependencyUpdates` can be set to `auto`, `all`, or an array that contains project specifiers. The default value is `all`.

## Not Using Git

If you aren't using Git, you can pass `--files` to any affected command to indicate what files have been changed.

0 comments on commit 8e596c3

Please sign in to comment.