Merged
Conversation
Add the ability to check registry coverage as of a specific point in time. When --before is set, a version is only considered "present" if its publish timestamp in the packument's time object is earlier than the specified ISO date. This enables answering questions like "what was my coverage on Dec 1?" without any additional HTTP requests - the time metadata is already included in standard packument responses. Changes: - Add --before/-b CLI option accepting an ISO date string - Extract packument.time alongside packument.versions - Filter versions where time[version] >= before as not present - Defensive: missing time entries are treated as present Co-authored-by: Claude <claude@anthropic.com>
Store packuments to disk. Send If-None-Match on subsequent requests. Handle 304. ~80 lines, no new dependencies. The simplest cache that could possibly work. Co-authored-by: Claude <claude@anthropic.com>
Include publication timestamp (time) and spec (name@version) fields when using --full flag. The time field enables local time-travel reanalysis of cached coverage data without re-querying the registry. - Add time field from packument to all output formats (CSV, JSON, NDJSON) - Add spec convenience field combining name@version - Update CSV header to include new columns - Add comprehensive tests for time field functionality Co-authored-by: Claude <claude@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds
--before $Ttoflatcoverwhich functions similarly tonpm install --before $Tbut for the purposes of presence in a given remote registry at time$TTime-travel without the registry roundtrip: packument timestamps now flow through to output
time[version]from packument response during coverage checktimefield in JSON, NDJSON, and CSV when--fullspecifiedSpec field for the lazy and the wise:
name@versioncomputed once, used everywherespecconvenience field to all--fulloutput formatspackage,version,spec,present,integrity,resolved,timeDocumentation matches implementation:
Relevant test coverage:
--beforefiltering without network