Skip to content

Commit

Permalink
Parse latest npm alias or github url separately from current (#1276).
Browse files Browse the repository at this point in the history
  • Loading branch information
raineorshine committed Mar 9, 2023
1 parent 9883fbe commit 9128ebc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/upgradeDependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ function upgradeDependencies(
// parse npm alias
if (versionUtil.isNpmAlias(current)) {
currentParsed = versionUtil.parseNpmAlias(current)![1]
}
if (versionUtil.isNpmAlias(latest)) {
latestParsed = versionUtil.parseNpmAlias(latest)![1]
}

Expand All @@ -68,7 +70,9 @@ function upgradeDependencies(
const currentTag = versionUtil.getGithubUrlTag(current)!
const [currentSemver] = parseRange(currentTag)
currentParsed = versionUtil.stringify(currentSemver)
}

if (versionUtil.isGithubUrl(latest)) {
const latestTag = versionUtil.getGithubUrlTag(latest)!
const [latestSemver] = parseRange(latestTag)
latestParsed = versionUtil.stringify(latestSemver)
Expand Down

0 comments on commit 9128ebc

Please sign in to comment.