diff --git a/lib/modules/manager/helmv3/update.ts b/lib/modules/manager/helmv3/update.ts index d44d1dc12100e48577aa4b1489c58e8bddd93150..cd742214e67b91bb53045a89922610ae8ef5c84c 100644 --- a/lib/modules/manager/helmv3/update.ts +++ b/lib/modules/manager/helmv3/update.ts @@ -6,7 +6,7 @@ import type { BumpPackageVersionResult } from '../types'; export function bumpPackageVersion( content: string, currentValue: string, - bumpVersion: ReleaseType | string + bumpVersion: ReleaseType ): BumpPackageVersionResult { logger.debug( { bumpVersion, currentValue }, @@ -15,7 +15,7 @@ export function bumpPackageVersion( let newChartVersion: string | null; let bumpedContent = content; try { - newChartVersion = semver.inc(currentValue, bumpVersion as ReleaseType); + newChartVersion = semver.inc(currentValue, bumpVersion); if (!newChartVersion) { throw new Error('semver inc failed'); } diff --git a/lib/modules/manager/maven/update.ts b/lib/modules/manager/maven/update.ts index c76169b2cf9d7374699ab8d42931621aeb0ec5b8..390979fcac55a2d2c369a2c363f9bb90478786f4 100644 --- a/lib/modules/manager/maven/update.ts +++ b/lib/modules/manager/maven/update.ts @@ -56,7 +56,7 @@ export function updateDependency({ export function bumpPackageVersion( content: string, currentValue: string | undefined, - bumpVersion: ReleaseType | string + bumpVersion: ReleaseType ): BumpPackageVersionResult { logger.debug( { bumpVersion, currentValue }, @@ -83,7 +83,7 @@ export function bumpPackageVersion( const startTagPosition = versionNode.startTagPosition; const versionPosition = content.indexOf(versionNode.val, startTagPosition); - const newPomVersion = semver.inc(currentValue, bumpVersion as ReleaseType); + const newPomVersion = semver.inc(currentValue, bumpVersion); if (!newPomVersion) { throw new Error('semver inc failed'); } diff --git a/lib/modules/manager/npm/update/package-version/index.ts b/lib/modules/manager/npm/update/package-version/index.ts index 83dc96007ed3569883b77daf6886d280e19055fe..ba5022fb0ac0d7e3c306990fc488c5d5153ef316 100644 --- a/lib/modules/manager/npm/update/package-version/index.ts +++ b/lib/modules/manager/npm/update/package-version/index.ts @@ -6,7 +6,7 @@ import type { BumpPackageVersionResult } from '../../../types'; export function bumpPackageVersion( content: string, currentValue: string, - bumpVersion: ReleaseType | string + bumpVersion: ReleaseType ): BumpPackageVersionResult { logger.debug( { bumpVersion, currentValue }, @@ -29,7 +29,7 @@ export function bumpPackageVersion( return { bumpedContent }; } } else { - newPjVersion = semver.inc(currentValue, bumpVersion as ReleaseType); + newPjVersion = semver.inc(currentValue, bumpVersion); } // TODO: fix types (#7154) logger.debug(`newPjVersion: ${newPjVersion!}`); diff --git a/lib/modules/manager/nuget/update.ts b/lib/modules/manager/nuget/update.ts index ad258f2ff3d08babfe0b10eaa72e067bf8f16364..232c1ab8508d24d57afa4f2ed13ed72456a88245 100644 --- a/lib/modules/manager/nuget/update.ts +++ b/lib/modules/manager/nuget/update.ts @@ -7,7 +7,7 @@ import type { BumpPackageVersionResult } from '../types'; export function bumpPackageVersion( content: string, currentValue: string | undefined, - bumpVersion: ReleaseType | string + bumpVersion: ReleaseType ): BumpPackageVersionResult { logger.debug( { bumpVersion, currentValue }, @@ -38,7 +38,7 @@ export function bumpPackageVersion( startTagPosition ); - const newProjVersion = semver.inc(currentValue, bumpVersion as ReleaseType); + const newProjVersion = semver.inc(currentValue, bumpVersion); if (!newProjVersion) { throw new Error('semver inc failed'); } diff --git a/lib/modules/manager/sbt/update.ts b/lib/modules/manager/sbt/update.ts index 91ab867c3946c87e7440070e8d79ab28a0333b7d..0fa3ecfe75e40797df82c7b811aa0b1c7501cc09 100644 --- a/lib/modules/manager/sbt/update.ts +++ b/lib/modules/manager/sbt/update.ts @@ -6,14 +6,14 @@ import type { BumpPackageVersionResult } from '../types'; export function bumpPackageVersion( content: string, currentValue: string, - bumpVersion: ReleaseType | string + bumpVersion: ReleaseType ): BumpPackageVersionResult { logger.debug( { bumpVersion, currentValue }, 'Checking if we should bump build.sbt version' ); let bumpedContent = content; - const bumpedVersion = semver.inc(currentValue, bumpVersion as ReleaseType); + const bumpedVersion = semver.inc(currentValue, bumpVersion); if (!bumpedVersion) { logger.warn('Version incremental failed'); return { bumpedContent }; diff --git a/lib/modules/manager/types.ts b/lib/modules/manager/types.ts index 15a6fd974219646aea988d2a52db21c4cf4422fa..9312bcd6069166664a430ec5e6d9babcddd2cc14 100644 --- a/lib/modules/manager/types.ts +++ b/lib/modules/manager/types.ts @@ -117,7 +117,7 @@ export interface PackageDependency<T = Record<string, any>> versioning?: string; dataType?: string; enabled?: boolean; - bumpVersion?: ReleaseType | string; + bumpVersion?: ReleaseType; npmPackageAlias?: boolean; packageFileVersion?: string; gitRef?: boolean; @@ -238,7 +238,7 @@ export interface ManagerApi extends ModuleApi { bumpPackageVersion?( content: string, currentValue: string, - bumpVersion: ReleaseType | string + bumpVersion: ReleaseType ): Result<BumpPackageVersionResult>; detectGlobalConfig?(): Result<GlobalManagerConfig>;