resolveRangeToInstallSpecifier() — astro Function Reference
Architecture documentation for the resolveRangeToInstallSpecifier() function in index.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 445f1ba1_08d9_b5b7_5f3f_eabbaf6609b7["resolveRangeToInstallSpecifier()"] 9151bb3d_ee1e_da42_752a_45a9db1dd918["index.ts"] 445f1ba1_08d9_b5b7_5f3f_eabbaf6609b7 -->|defined in| 9151bb3d_ee1e_da42_752a_45a9db1dd918 a25a4899_7ef7_478a_55fd_a5648adaa725["convertIntegrationsToInstallSpecifiers()"] a25a4899_7ef7_478a_55fd_a5648adaa725 -->|calls| 445f1ba1_08d9_b5b7_5f3f_eabbaf6609b7 style 445f1ba1_08d9_b5b7_5f3f_eabbaf6609b7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/cli/add/index.ts lines 800–808
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, but fallback if there are no stable versions
const stableVersions = versions.filter((v) => !v.includes('-'));
const maxStable = maxSatisfying(stableVersions, range) ?? maxSatisfying(versions, range);
if (!maxStable) return name;
return `${name}@^${maxStable}`;
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does resolveRangeToInstallSpecifier() do?
resolveRangeToInstallSpecifier() is a function in the astro codebase, defined in packages/astro/src/cli/add/index.ts.
Where is resolveRangeToInstallSpecifier() defined?
resolveRangeToInstallSpecifier() is defined in packages/astro/src/cli/add/index.ts at line 800.
What calls resolveRangeToInstallSpecifier()?
resolveRangeToInstallSpecifier() is called by 1 function(s): convertIntegrationsToInstallSpecifiers.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free