diff --git a/lib/modules/manager/types.ts b/lib/modules/manager/types.ts index 4a4360f2943380c426d1e9d1634b0dd98bbe4ec9..29a13410b27af0062794da224135169f6d3cc9d3 100644 --- a/lib/modules/manager/types.ts +++ b/lib/modules/manager/types.ts @@ -84,7 +84,7 @@ export interface LookupUpdate { newMajor?: number; newMinor?: number; newName?: string; - newValue: string; + newValue?: string; semanticCommitType?: string; pendingChecks?: boolean; pendingVersions?: string[]; diff --git a/lib/workers/repository/process/lookup/generate.ts b/lib/workers/repository/process/lookup/generate.ts index b7d2f93e6e58c586385778fabcf31b0453d9ec96..21f6a3170cdbdf973b565c521d2fbd74e074d9c5 100644 --- a/lib/workers/repository/process/lookup/generate.ts +++ b/lib/workers/repository/process/lookup/generate.ts @@ -66,7 +66,7 @@ export async function generateUpdate( update.newValue = currentValue; } } else { - update.newValue = currentValue!; + update.newValue = currentValue; } update.newMajor = versioning.getMajor(newVersion)!; update.newMinor = versioning.getMinor(newVersion)!; diff --git a/lib/workers/repository/process/lookup/index.ts b/lib/workers/repository/process/lookup/index.ts index f8f9b4426bdc676c6b94cff268d5709b6355612a..c8a5ed8be9b6fde729ec1578c3df605bfc928a71 100644 --- a/lib/workers/repository/process/lookup/index.ts +++ b/lib/workers/repository/process/lookup/index.ts @@ -381,10 +381,9 @@ export async function lookupUpdates( } res.isSingleVersion = true; } - res.isSingleVersion = - !!res.isSingleVersion || - !!versioning.isSingleVersion(update.newValue); - + res.isSingleVersion ??= + is.string(update.newValue) && + versioning.isSingleVersion(update.newValue); res.updates.push(update); } } else if (compareValue) { @@ -455,7 +454,7 @@ export async function lookupUpdates( ) { for (const update of res.updates) { logger.debug({ update }); - if (is.string(config.currentValue)) { + if (is.string(config.currentValue) && is.string(update.newValue)) { update.newValue = config.currentValue.replace( compareValue, update.newValue