newVersionAvailable() — astro Function Reference
Architecture documentation for the newVersionAvailable() function in messages.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD f8c31fea_fef6_3226_8a6d_ee48c10b93ce["newVersionAvailable()"] a89de736_d85a_fc8a_68a9_5d9ea54128d5["messages.ts"] f8c31fea_fef6_3226_8a6d_ee48c10b93ce -->|defined in| a89de736_d85a_fc8a_68a9_5d9ea54128d5 style f8c31fea_fef6_3226_8a6d_ee48c10b93ce fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/core/messages.ts lines 86–97
export async function newVersionAvailable({ latestVersion }: { latestVersion: string }) {
const badge = bgYellow(black(` update `));
const headline = yellow(`▶ New version of Astro available: ${latestVersion}`);
const packageManager = (await detect())?.agent ?? 'npm';
const execCommand = resolveCommand(packageManager, 'execute', ['@astrojs/upgrade']);
// NOTE: Usually it's impossible for `execCommand` to be null as `package-manager-detector` should
// already match a valid package manager
const details = !execCommand
? ''
: ` Run ${cyan(`${execCommand.command} ${execCommand.args.join(' ')}`)} to update`;
return ['', `${badge} ${headline}`, details, ''].join('\n');
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does newVersionAvailable() do?
newVersionAvailable() is a function in the astro codebase, defined in packages/astro/src/core/messages.ts.
Where is newVersionAvailable() defined?
newVersionAvailable() is defined in packages/astro/src/core/messages.ts at line 86.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free