diff --git a/lib/dependency.ts b/lib/dependency.ts index ded6c8bf..6a5abda3 100644 --- a/lib/dependency.ts +++ b/lib/dependency.ts @@ -250,6 +250,9 @@ async function _resolveLatestVersion( ([version, { yanked }]) => !yanked && !isPreRelease(version), ); const semvers = Object.keys(candidates).map(SemVer.parse); + if (!semvers.length) { + break; + } const latest = SemVer.format(semvers.sort(SemVer.compare).reverse()[0]); if (isPreRelease(latest)) { break;