When using `docker` versioning, we correctly treat a `v1.2` -> `v1.3`
version update as valid.
However, when using the previous implementation of `github-actions`'
versioning, we would silently ignore them, filtering them in
`filterValidVersions`.
This leads to cases where a `v1.2` would be upgraded to `v1.3.0`, which
wasn't correct.
Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
GitHub Actions' versioning somewhat mirrors the SemVer-style versioning,
but doesn't quite.
This is in the case that it's common to use (mutable) tags like `v7` or
`v4.2`, as well as full SemVer style` `v1.2.3` and `v1.3.4-rc2`, doesn't
quite match it.
In addition, with GitHub's recent move to introduce Immutable Tags,
these require new releases to be a full SemVer `major.minor.patch` tag.
However, we don't currently have a way to take users from `@v7` to
`@v8.1.1`, in the case they're using Immutable Tags.
Given this isn't currently straightforward with any of our existing
SemVer-y versioning modules like `semver-coerced` or `semver-partial`,
we should instead introduce a specific Versioning module.
This mostly covers the functionality that `semver-partial` has, but
needs to take advantage of the `allVersions` parameter to find the
"shortest" possible tag for a given resolved Semantic Version.
This was previously attempted in previous changes, but reverted in
db64cc6de0 due to additional complexity.
We won't turn it on by default right now, but as a future change.
Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
As part of future changes, we'll introduce a new Versioning module for
GitHub Actions, which requires knowing if the version it's proposing
actually exists.
This is a more useful concept for Versioning modules to be able to take
advantage of, so we can expose this as an optional capability that
Versioning modules can use.
* feat: port Ubuntu versioning support to Debian container images
Resolves#27862.
Signed-off-by: Alexander Gil <pando855@gmail.com>
* refactor: Remove dead code in debian versioning
Signed-off-by: Alexander Gil <pando855@gmail.com>
* refactor: Rename groups to match
* perf: optimize isStable method by reusing getVersionByCodename result
* fix(debian): specify radix in parseInt for dated container image version
---------
Signed-off-by: Alexander Gil <pando855@gmail.com>
Co-authored-by: Jamie Tanna <jamie.tanna@mend.io>
* fix(maven): determing properly closed ranges
A Maven range like [1,2) contains various (usually pre-release) versions of the 2.x line.
By Maven definition the smallest possible 2.x version is 2-alpha, so a properly closed range that only allows 1.x versions
would be [1,2-alpha). This is now detected and properly advanced.
* fix(maven): normalize both sides of version comparison
Without this a leftValue of v3 is incremented to 4 and then compared to v4.
* fix(maven): do not loose the v-prefix of versions in range handling
If versions of a project always start with a v prefix, this was lost when Maven ranges were involved.
The coerce and increment methods stripped the v away and it was never added back in.
* Properly fix underlying problem and make PR standalone
* Add missing coverage
* Remove unused callback parameter
* test(conan): add failing tests for wildcard-equivalent ranges in getNewValue
Add test cases for [*], [>=*], and [x] ranges with all three
strategies (widen, replace, bump). [>=*] and [x] currently crash
with TypeError in getNewValue.
* fix(conan): handle wildcard-equivalent ranges in getNewValue
Ranges like [*], [>=*], [x], and [] are all semantically "match
everything". parseRange() returns an empty array for these, causing
getNewValue to crash with TypeError when accessing properties on
undefined. Use semver.validRange() to detect all wildcard-equivalent
forms instead of checking only for '*'.
* chore: Add vitest plugin to oxlint
* Remove unused line in versioning spec
* Remove coverage threshold check job
The coverage threshold check has been removed from the build workflow. This job was redundant as
coverage is already handled by the codecov job.
* Refine versioning API schema with existence check
* Revert "Remove coverage threshold check job"
This reverts commit f2c9dd872b.
* Remove vitest ESLint plugin
The vitest ESLint plugin and its configurations have been removed. ESLint will no longer enforce
vitest-specific rules.
* Remove unused vitest eslint plugin
The `@vitest/eslint-plugin` is no longer used and can be safely removed.
* fix(versioning/hex): handle Elixir == pin prefix in isSingleVersion
Hex versioning inherited npm's isSingleVersion which only strips a single
= prefix. Elixir uses == for pinning, so "== 1.7.16" was not recognized
as a pinned version, causing duplicate pin PRs on every update.
Add isSingleVersion override that handles the double == prefix and add
getPinnedValue to emit the correct == prefix when pinning.
* fix: use non-null assertion instead of optional chaining in test
* feat(versioning): add elm versioning support
* fix(versioning/elm): remove unnecessary defensive check in nextMajor
* fix(versioning/elm): use named capture groups in range regex
* fix(versioning/elm): use semver gte instead of gt || eq
* Update lib/modules/versioning/elm/index.ts
---------
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Refactors `getNewValue` logic to replace it with an optional
`getPinnedValue()` where rangeStrategy=pin. This way each versioning
module doesn't need to add and test extensive "pin" logic.
This should not be breaking, but out of an abundance of caution, we'll
mark it as such.
* feat(gitlab-ci): Add `semver-partial` versioning
* Add supported range strategies to semver-partial
* Add test cases for invalid semver inputs
* Remove unused sortVersions spec test
* Add tests for semver-partial versioning edge cases
* Simplify semver-partial version comparison logic
* Rewrite AI slop
* Add tests and improve semver-partial version matching
* Remove support for v-prefixed versions and bump strategy
* Refactor isLessThanRange to use parseVersion/Range
* Remove duplicate test cases in semver-partial spec
* Remove GitLab CI extract changes (split into separate PR)