Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico authored and astrobot-houston committed Dec 11, 2023
1 parent a7c75b3 commit d656797
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/astro/src/cli/add/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -642,15 +642,15 @@ async function convertIntegrationsToInstallSpecifiers(
}

/**
* Resolves package with a given range to a STABLE version
* peerDependencies might specify a compatible prerelease,
* but `astro add` should only ever install stable releases
*/
* Resolves package with a given range to a STABLE version
* peerDependencies might specify a compatible prerelease,
* but `astro add` should only ever install stable releases
*/
async function resolveRangeToInstallSpecifier(name: string, range: string): Promise<string> {
const versions = await fetchPackageVersions(name);
if (versions instanceof Error) return name;
// Filter out any prerelease versions
const stableVersions = versions.filter(v => !v.includes('-'));
const stableVersions = versions.filter((v) => !v.includes('-'));
const maxStable = maxSatisfying(stableVersions, range);
return `${name}@^${maxStable}`;
}
Expand Down

0 comments on commit d656797

Please sign in to comment.