Simplify manifest version handling#92
Merged
Merged
Conversation
7aca952 to
96ee35b
Compare
There was a problem hiding this comment.
Pull request overview
This PR simplifies how prek versions are represented and resolved by switching internal handling to “bare” semver strings (e.g., 0.3.5) while keeping GitHub-facing tags and outputs v-prefixed where needed.
Changes:
- Refactors the bundled version manifest shape to be a flat array of releases and updates resolver/lookup logic accordingly.
- Introduces branded
Version/NormalizedVersiontypes and adjusts install + main flow to use bare versions internally while outputtingv-prefixed versions. - Moves/updates unit tests to cover the new manifest and version normalization behavior.
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/manifest.test.ts | Adds dedicated tests for manifest version resolution, input parsing, and normalization helpers. |
| test/install.test.ts | Removes manifest/input tests from install tests; updates checksum fixtures to match new manifest asset type. |
| src/types.ts | Introduces Version/NormalizedVersion and simplifies VersionManifest + manifest release/asset shapes. |
| src/manifest.ts | Updates manifest lookup and version resolution to return bare Version values and use the new manifest structure. |
| src/main.ts | Normalizes output prek-version back to a v-prefixed tag while using bare versions internally. |
| src/install.ts | Switches install flow/tool-cache integration to use bare Version values consistently. |
| src/inputs.ts | Adds a clarifying comment; no functional changes. |
| scripts/update-version-manifest.mjs | Writes the manifest as an array of releases, drops unused fields, and skips draft releases. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
946a4a7 to
3f29d9e
Compare
3f29d9e to
3a1ed42
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cleanup