fix: add -test to VERSION_REGEX prerelease filter#7647
Conversation
Versions with `-test` suffix (e.g., `0.48.7-test-signing-binaries`) were not being filtered out when resolving `latest`, causing mise to incorrectly select test/prerelease versions over stable releases. For example, `mise latest terragrunt` returned `0.48.7-test-signing-binaries` instead of `0.97.2` because `-test` was not in the prerelease filter regex. This adds `-test` alongside the existing `-alpha`, `-beta`, `-rc`, etc. patterns in both the main VERSION_REGEX and the Java-specific one.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes an issue where mise latest incorrectly returns versions with a -test suffix (e.g., 0.48.7-test-signing-binaries instead of 0.97.2 for terragrunt). The fix adds -test to the VERSION_REGEX pattern that filters out prerelease versions.
Changes:
- Added
-testto the prerelease filter regex inVERSION_REGEXto exclude test versions from being returned as the latest version
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/plugins/mod.rs | Added -test to the main VERSION_REGEX pattern used for filtering prerelease versions |
| src/plugins/core/java.rs | Added -test to the Java-specific VERSION_REGEX pattern to maintain consistency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jdx
pushed a commit
that referenced
this pull request
Jan 13, 2026
### 🐛 Bug Fixes - **(backend)** filter pre-release versions with latest + install_before by @koh-sh in [#7631](#7631) - **(docs)** formatting in configuration hierarchy section by @jonathanagustin in [#7638](#7638) - **(npm)** migrate npm publish to OIDC trusted publishing by @jdx in [#7607](#7607) - **(registry)** correct checkmake version test pattern by @jdx in [#7632](#7632) - **(release)** handle empty grep result in aqua-registry changelog by @jdx in [f45b4c6](f45b4c6) - **(self-update)** self-update fails across year boundary due to semver mismatch by @jdx in [#7611](#7611) - **(tasks)** fix tool inheritance from intermediate parents by @chadxz in [#7637](#7637) - add `-test` to VERSION_REGEX prerelease filter by @belgio99 in [#7647](#7647) ### 📚 Documentation - **(tasks)** remove documentation for unimplemented features by @turbocrime in [#7599](#7599) - update `mise aliases` references to `mise tool-alias` by @muzimuzhi in [#7615](#7615) - use call operator in PowerShell profile example by @shina1024 in [#7639](#7639) - replace ASCII .pub key with binary .gpg for signed-by on Ubuntu/Debian by @gmalinowski in [#7649](#7649) ### 🛡️ Security - **(security)** prevent code execution from untrusted fork in registry-comment workflow by @jdx in [4a2441e](4a2441e) ###◀️ Revert - Revert "fix(release): handle empty grep result in aqua-registry changelog" by @jdx in [522ffdc](522ffdc) - Revert "chore(release): include manually updated aqua-registry entries in the changelog " by @jdx in [1ebb943](1ebb943) ### 📦️ Dependency Updates - update ghcr.io/jdx/mise:alpine docker digest to fbfffcf by @renovate[bot] in [#7619](#7619) - lock file maintenance by @renovate[bot] in [#7646](#7646) ### 📦 Registry - add hatoo/oha tool by @jylenhof in [#7633](#7633) ### Chore - **(registry)** fix registry comment workflow by @risu729 in [#7554](#7554) - **(release)** include manually updated aqua-registry entries in the changelog by @risu729 in [#7603](#7603) ### New Contributors - @belgio99 made their first contribution in [#7647](#7647) - @gmalinowski made their first contribution in [#7649](#7649) - @chadxz made their first contribution in [#7637](#7637) - @shina1024 made their first contribution in [#7639](#7639) - @jonathanagustin made their first contribution in [#7638](#7638) - @turbocrime made their first contribution in [#7599](#7599) ## 📦 Aqua Registry Updates #### New Packages (3) - [`ampcode/zvelte-check`](https://github.com/ampcode/zvelte-check) - [`nickel-lang/nickel`](https://github.com/nickel-lang/nickel) - [`openshift/rosa`](https://github.com/openshift/rosa)
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.
Summary
Fix
mise latestincorrectly returning versions with-testsuffix.Problem
Starting today (?),
mise latest terragruntreturns0.48.7-test-signing-binariesinstead of0.97.2.The
VERSION_REGEXfilters out prerelease versions with suffixes like-alpha,-beta,-rc,-dev, etc., but-testwas missing from the pattern.Reproduction
Solution
Add
-testto the prerelease filter regex in:src/plugins/mod.rs(main VERSION_REGEX)src/plugins/core/java.rs(Java-specific VERSION_REGEX)