Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
> [!WARNING]
> This version is **not released yet** and is under active development.

- [uvx] Implement `outdated` operation. Bump minimal requirement to `0.10.10`.

## [`6.2.1` (2026-03-26)](https://github.com/kdeldycke/meta-package-manager/compare/v6.2.0...v6.2.1)

- [brew,cask] Remove `--quiet` from `outdated` command where it conflicts with `--json`. Closes {issue}`1703`.
Expand Down
30 changes: 30 additions & 0 deletions meta_package_manager/managers/uv.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,15 @@ class UVX(UVBase):

homepage_url = "https://docs.astral.sh/uv/guides/tools/"

requirement = "0.10.10"
"""`0.10.10 <https://github.com/astral-sh/uv/releases/tag/0.10.10>`_ is the first
version to introduce ``tool list --outdated`` command.
"""

_INSTALLED_REGEXP = re.compile(r"^(?P<package_id>\S+)\s+v(?P<version>\S+)$")
_OUTDATED_REGEXP = re.compile(
r"^(?P<package_id>\S+)\s+v(?P<version>\S+)\s+\[latest:\s+(?P<latest>\S+)\]$",
)

@property
def installed(self) -> Iterator[Package]:
Expand All @@ -235,6 +243,28 @@ def installed(self) -> Iterator[Package]:
installed_version=match.group("version"),
)

@property
def outdated(self) -> Iterator[Package]:
"""Fetch outdated packages.

.. code-block:: shell-session

$ uv --color never --no-progress tool list --outdated
pycowsay v0.0.0.1 [latest: 0.0.0.2]
- pycowsay
"""
output = self.run_cli("tool", "list", "--outdated")

if output:
for line in output.splitlines():
match = self._OUTDATED_REGEXP.match(line)
if match:
yield self.package(
id=match.group("package_id"),
installed_version=match.group("version"),
latest_version=match.group("latest"),
)

def install(self, package_id: str, version: str | None = None) -> str:
"""Install one package.

Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Meta Package Manager,zypper,1
| [`snap`](https://snapcraft.io) | 2.0.0 | 🅱️ | 🐧 | | ⨂ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | |
| [`steamcmd`](https://developer.valvesoftware.com/wiki/SteamCMD) | None | 🅱️ | 🐧 | 🍎 | ⨂ | 🪟 | | | | ✓ | | | | | |
| [`uv`](https://docs.astral.sh/uv) | 0.5.0 | 🅱️ | 🐧 | 🍎 | ⨂ | 🪟 | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | | ✓ |
| [`uvx`](https://docs.astral.sh/uv/guides/tools/) | 0.5.0 | 🅱️ | 🐧 | 🍎 | ⨂ | 🪟 | ✓ | | | ✓ | ✓ | ✓ | ✓ | | |
| [`uvx`](https://docs.astral.sh/uv/guides/tools/) | 0.10.10 | 🅱️ | 🐧 | 🍎 | ⨂ | 🪟 | ✓ | | | ✓ | ✓ | ✓ | ✓ | | |
| [`vscode`](https://code.visualstudio.com) | 1.60.0 | 🅱️ | 🐧 | 🍎 | ⨂ | 🪟 | ✓ | | | ✓ | | | ✓ | | |
| [`vscodium`](https://vscodium.com) | 1.60.0 | 🅱️ | 🐧 | 🍎 | ⨂ | 🪟 | ✓ | | | ✓ | | | ✓ | | |
| [`winget`](https://github.com/microsoft/winget-cli) | 1.7 | | | | | 🪟 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | |
Expand Down
Loading