Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/lib/content/configuring-npm/package-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,21 @@ To make sure the package `@npm/foo` is always installed as version `1.0.0` no ma
}
```

Override values can use any specifier that npm accepts for dependencies, including
an exact version, a semver range, a dist-tag, or a replacement specifier such as
`npm:`, `file:`, or a Git URL.

For example, if you only need to enforce a minimum patched release instead of one
exact version, you can use a semver range:

```json
{
"overrides": {
"@npm/foo": "^1.0.0"
}
}
```

The above is a short hand notation, the full object form can be used to allow overriding a package itself as well as a child of the package.
This will cause `@npm/foo` to always be `1.0.0` while also making `@npm/bar` at any depth beyond `@npm/foo` also `1.0.0`:

Expand Down
Loading