Skip to content

Commit

Permalink
chore: fix types (#23665)
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice authored Aug 2, 2023
1 parent c42f02f commit 68f34a9
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions lib/modules/manager/helmv3/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand All @@ -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');
}
Expand Down
4 changes: 2 additions & 2 deletions lib/modules/manager/maven/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand All @@ -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');
}
Expand Down
4 changes: 2 additions & 2 deletions lib/modules/manager/npm/update/package-version/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand All @@ -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!}`);
Expand Down
4 changes: 2 additions & 2 deletions lib/modules/manager/nuget/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down Expand Up @@ -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');
}
Expand Down
4 changes: 2 additions & 2 deletions lib/modules/manager/sbt/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down
4 changes: 2 additions & 2 deletions lib/modules/manager/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -238,7 +238,7 @@ export interface ManagerApi extends ModuleApi {
bumpPackageVersion?(
content: string,
currentValue: string,
bumpVersion: ReleaseType | string
bumpVersion: ReleaseType
): Result<BumpPackageVersionResult>;

detectGlobalConfig?(): Result<GlobalManagerConfig>;
Expand Down

0 comments on commit 68f34a9

Please sign in to comment.