Skip to main content

Module freshness

Module freshness 

Source
Expand description

Release-freshness signal: publish-time tracking and cooldown-window checks.

Mirrors GitHub Dependabot’s default 3-day package cooldown: a version published very recently is a distinct signal from one that has been live for a while, independent of whether it is otherwise “the latest”. This module is deliberately minimal (a Unix-seconds newtype plus two free functions) and stays confined to deps-core — ecosystem crates only ever produce a PublishTime, never touch the time crate directly.

Structs§

FreshnessSettings
LSP-facing freshness settings, threaded into hover/diagnostics/completion.
PublishTime
A release publish instant, normalized to Unix epoch seconds (UTC).

Constants§

DEFAULT_COOLDOWN_SECS
Dependabot’s default cooldown window (3 days), in seconds.

Functions§

format_relative_age
Formats an age in seconds as a coarse, human-readable relative duration.
is_within_cooldown
Whether an age (in seconds) falls within a cooldown window (in seconds).