diff --git a/lib/workers/repository/process/lookup/index.ts b/lib/workers/repository/process/lookup/index.ts index ea4b77b968e5c2..e481f6b3acbc0d 100644 --- a/lib/workers/repository/process/lookup/index.ts +++ b/lib/workers/repository/process/lookup/index.ts @@ -59,8 +59,6 @@ export async function lookupUpdates( config.versioning ??= getDefaultVersioning(config.datasource); const versioningApi = allVersioning.get(config.versioning); - const unconstrainedValue = - !!config.lockedVersion && is.undefined(config.currentValue); let dependency: ReleaseResult | null = null; const res: UpdateResult = { @@ -124,10 +122,14 @@ export async function lookupUpdates( ); } } + const isValid = is.string(compareValue) && versioningApi.isValid(compareValue); - if (unconstrainedValue || isValid) { + const unconstrainedValue = + !!config.lockedVersion && is.undefined(config.currentValue); + + if (isValid || unconstrainedValue) { if ( !config.updatePinnedDependencies && // TODO #22198 @@ -752,7 +754,6 @@ export async function lookupUpdates( rollbackPrs: config.rollbackPrs, isVulnerabilityAlert: config.isVulnerabilityAlert, updatePinnedDependencies: config.updatePinnedDependencies, - unconstrainedValue, err, }, 'lookupUpdates error',