shouldCheckForUpdates() — astro Function Reference
Architecture documentation for the shouldCheckForUpdates() function in update-check.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 2179d604_d7e2_ff52_1334_b487c6e76354["shouldCheckForUpdates()"] b91228c7_974e_a490_80d5_1ddf98044159["update-check.ts"] 2179d604_d7e2_ff52_1334_b487c6e76354 -->|defined in| b91228c7_974e_a490_80d5_1ddf98044159 style 2179d604_d7e2_ff52_1334_b487c6e76354 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/core/dev/update-check.ts lines 36–49
export async function shouldCheckForUpdates(preferences: AstroPreferences): Promise<boolean> {
if (ci.isCI) {
return false;
}
const timeSinceLastCheck = Date.now() - (await preferences.get('_variables.lastUpdateCheck'));
const hasCheckUpdatesEnabled = await preferences.get('checkUpdates.enabled');
return (
timeSinceLastCheck > CHECK_MS_INTERVAL &&
process.env.ASTRO_DISABLE_UPDATE_CHECK !== 'true' &&
hasCheckUpdatesEnabled
);
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does shouldCheckForUpdates() do?
shouldCheckForUpdates() is a function in the astro codebase, defined in packages/astro/src/core/dev/update-check.ts.
Where is shouldCheckForUpdates() defined?
shouldCheckForUpdates() is defined in packages/astro/src/core/dev/update-check.ts at line 36.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free