Skip to content

Commit

Permalink
refactor: rename lookup functions
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Feb 18, 2021
1 parent c34e54c commit 71e26d8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/workers/repository/process/lookup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export interface LookupUpdateConfig
depName: string;
}

function getType(
function getUpdateType(
config: LookupUpdateConfig,
currentVersion: string,
newVersion: string
Expand All @@ -76,7 +76,7 @@ function getType(
return 'minor';
}

function getFromVersion(
function getCurrentVersion(
config: LookupUpdateConfig,
rangeStrategy: string,
latestVersion: string,
Expand Down Expand Up @@ -259,13 +259,13 @@ export async function lookupUpdates(
.filter((release) => !release.isDeprecated)
.map((release) => release.version);
const currentVersion =
getFromVersion(
getCurrentVersion(
config,
rangeStrategy,
latestVersion,
nonDeprecatedVersions
) ||
getFromVersion(
getCurrentVersion(
config,
rangeStrategy,
latestVersion,
Expand Down Expand Up @@ -366,7 +366,7 @@ export async function lookupUpdates(
update.newMajor = versioning.getMajor(newVersion);
update.newMinor = versioning.getMinor(newVersion);
update.updateType =
update.updateType || getType(config, currentVersion, newVersion);
update.updateType || getUpdateType(config, currentVersion, newVersion);
update.isSingleVersion =
update.isSingleVersion || !!versioning.isSingleVersion(update.newValue);
if (!versioning.isVersion(update.newValue)) {
Expand Down

0 comments on commit 71e26d8

Please sign in to comment.