Skip to content

feat: support uv.lock as version-file - #379

Merged
eifinger merged 1 commit into
astral-sh:mainfrom
somaz94:feat/version-file-uv-lock
Jul 5, 2026
Merged

eifinger merged 1 commit into
astral-sh:mainfrom
somaz94:feat/version-file-uv-lock

Conversation

@somaz94

@somaz94 somaz94 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Adds uv.lock as a supported version-file format, alongside the existing
pyproject.toml and requirements.txt. A uv.lock pins the exact resolved
ruff version, so reading it gives a reproducible install that matches the
project's lockfile — the single source of truth — instead of the lower-bound /
range typically declared in pyproject.toml.

The parser reads the [[package]] entry whose name is ruff and returns its
version. If ruff is absent or the file cannot be parsed, the action warns and
falls back to latest (same behaviour as the other formats).

Validation:

  • npm run all — tsc typecheck clean, biome clean, dist rebuilt, jest 65/65 pass
  • Added unit tests (__tests__/version/file-parser.test.ts) + a uv.lock fixture
  • Added an integration job (test-default-version-from-uv-lock) that runs the
    action against the fixture and asserts ruff 0.9.5 is installed

closes #375

@somaz94
somaz94 marked this pull request as ready for review June 17, 2026 02:12
@somaz94
somaz94 requested a review from eifinger as a code owner June 17, 2026 02:12
@eifinger eifinger added the enhancement New feature or request label Jul 5, 2026
@eifinger

eifinger commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Thank you!

@eifinger
eifinger merged commit f3db229 into astral-sh:main Jul 5, 2026
68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

uv.lock as version-file

2 participants