Implement --show-version-specifiers for tree (#5240)

## Summary
resolves https://github.com/astral-sh/uv/issues/5217

## Test Plan
existing tests pass (should be perfectly backwards compatible) + added a
few tests to cover the new functionality. in particular, in addition to
the simple use of `--show-version-specifiers`, its interaction with
`--invert` and `--package` flags are tested.
This commit is contained in:
Chan Kang 2024-07-20 14:31:16 -04:00 committed by GitHub
parent 1b09cb26f5
commit 12518a01a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 389 additions and 17 deletions

View file

@ -2764,4 +2764,8 @@ pub struct DisplayTreeArgs {
/// Show the reverse dependencies for the given package. This flag will invert the tree and display the packages that depend on the given package.
#[arg(long, alias = "reverse")]
pub invert: bool,
/// Show the version constraint(s) imposed on each package.
#[arg(long)]
pub show_version_specifiers: bool,
}