mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-25 15:01:49 +00:00
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:
@@ -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 }) => {
|
||||
|
||||
Reference in New Issue
Block a user