Skip to content

Auto-detect prek version from project config files#95

Draft
shaanmajid wants to merge 3 commits intoj178:mainfrom
shaanmajid:feat/version-auto-detection
Draft

Auto-detect prek version from project config files#95
shaanmajid wants to merge 3 commits intoj178:mainfrom
shaanmajid:feat/version-auto-detection

Conversation

@shaanmajid
Copy link
Copy Markdown
Collaborator

@shaanmajid shaanmajid commented Mar 16, 2026

Closes #38

@shaanmajid shaanmajid changed the title Support version-file for selecting prek version Auto-detect prek version from project config files Mar 16, 2026
@j178
Copy link
Copy Markdown
Owner

j178 commented Mar 16, 2026

Sorry, I didn’t notice this before merging #94, which changed resolveVersion to allow installing an exact version even if it is not found in the bundled version manifest.

@shaanmajid shaanmajid force-pushed the feat/version-auto-detection branch 2 times, most recently from 52bccb4 to d81811c Compare March 18, 2026 23:29
Add a version-file input and auto-detection from .tool-versions so
users no longer need to duplicate their prek version pin in the
workflow file.

Resolution priority:
1. Explicit prek-version input (not 'latest')
2. version-file input (hard fail if missing/malformed)
3. Auto-detected .tool-versions (working-directory, then repo root)
4. Latest stable release from version manifest

Supported version-file formats: .tool-versions, mise.toml, uv.lock,
pyproject.toml, requirements*.txt, package.json.

PEP 440 specifiers (~=, ==, !=) are translated to semver-compatible
constraints and resolved against the bundled version manifest.

Closes j178#38
@shaanmajid shaanmajid force-pushed the feat/version-auto-detection branch from d81811c to 735704f Compare March 19, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request: using prek version from uv.lock

2 participants