test(versioning/conda): clarify latest is a valid version (#46246)

As a follow-up to 4b5a64e6e1, we should
make sure that we document the fact that `latest` is a valid version to
Conda.

Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
This commit is contained in:
Jamie Tanna
2026-09-16 10:57:16 +00:00
committed by GitHub
parent 4d88ac46a1
commit 809e56572c
2 changed files with 23 additions and 0 deletions
@@ -2256,6 +2256,25 @@ describe('modules/manager/github-actions/extract', () => {
},
],
},
{
// `'latest'` is the default `pixi-version`, and is a valid version according to Conda versioning, but not one that can be used to bump the verson
step: {
uses: 'prefix-dev/setup-pixi@v0.8.3',
with: {
'pixi-version': 'latest',
},
},
expected: [
{
currentValue: 'latest',
datasource: 'github-releases',
depName: 'prefix-dev/pixi',
depType: 'uses-with',
packageName: 'prefix-dev/pixi',
versioning: 'conda',
},
],
},
{
step: {
uses: 'oven-sh/setup-bun@v2',
@@ -18,6 +18,7 @@ describe('modules/versioning/conda/index', () => {
${'renovatebot/renovate'} | ${false}
${'renovatebot/renovate#master'} | ${false}
${'https://github.com/renovatebot/renovate.git'} | ${false}
${'latest'} | ${true}
`('isVersion("$input") === $expected', ({ input, expected }) => {
const res = !!api.isVersion(input);
expect(res).toBe(expected);
@@ -39,6 +40,7 @@ describe('modules/versioning/conda/index', () => {
${'renovatebot/renovate'} | ${false}
${'renovatebot/renovate#master'} | ${false}
${'https://github.com/renovatebot/renovate.git'} | ${false}
${'latest'} | ${true}
`('isValid("$input") === $expected', ({ input, expected }) => {
const res = !!api.isValid(input);
expect(res).toBe(expected);
@@ -123,6 +125,7 @@ describe('modules/versioning/conda/index', () => {
${'==1.*'} | ${false}
${'*'} | ${false}
${'>=1.0'} | ${false}
${'latest'} | ${false}
`('isSingleVersion("$version") === $isSingle', ({ version, isSingle }) => {
const res = !!api.isSingleVersion(version);
expect(res).toBe(isSingle);
@@ -185,6 +188,7 @@ describe('modules/versioning/conda/index', () => {
${'1.0.*'} | ${'bump'} | ${'1.0.0'} | ${'1.2.3'} | ${'1.2.*'}
${'1.2.*'} | ${'widen'} | ${'1.0.0'} | ${'1.2.3'} | ${'1.2.*'}
${'>=1.0.0'} | ${'bump'} | ${'1.0.0'} | ${'1.2.3'} | ${'>=1.2.3'}
${'latest'} | ${'replace'} | ${'1.0.0'} | ${'1.2.3'} | ${null}
`(
'getNewValue($currentValue, $rangeStrategy, $currentVersion, $newVersion) === $expected',
({ currentValue, rangeStrategy, currentVersion, newVersion, expected }) => {