mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
[ci] format
This commit is contained in:
parent
a7c75b3339
commit
d656797fce
1 changed files with 5 additions and 5 deletions
|
@ -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}`;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue