From 809e56572cb036ee15b2de8f5ef7aee5a034e495 Mon Sep 17 00:00:00 2001 From: Jamie Tanna Date: Wed, 16 Sep 2026 10:57:16 +0000 Subject: [PATCH] test(versioning/conda): clarify `latest` is a valid version (#46246) As a follow-up to 4b5a64e6e1921fe6012e094a81fe2514240dedb6, we should make sure that we document the fact that `latest` is a valid version to Conda. Co-authored-by: Claude Sonnet 5 --- .../manager/github-actions/extract.spec.ts | 19 +++++++++++++++++++ lib/modules/versioning/conda/index.spec.ts | 4 ++++ 2 files changed, 23 insertions(+) diff --git a/lib/modules/manager/github-actions/extract.spec.ts b/lib/modules/manager/github-actions/extract.spec.ts index 90ff36063c..efccf3c225 100644 --- a/lib/modules/manager/github-actions/extract.spec.ts +++ b/lib/modules/manager/github-actions/extract.spec.ts @@ -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', diff --git a/lib/modules/versioning/conda/index.spec.ts b/lib/modules/versioning/conda/index.spec.ts index b72e9d3de7..d17e6076e9 100644 --- a/lib/modules/versioning/conda/index.spec.ts +++ b/lib/modules/versioning/conda/index.spec.ts @@ -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 }) => {