Skip to content

Roads? Where we're going ...#16

Merged
indexzero merged 5 commits intomainfrom
timetravel
Feb 3, 2026
Merged

Roads? Where we're going ...#16
indexzero merged 5 commits intomainfrom
timetravel

Conversation

@indexzero
Copy link
Owner

@indexzero indexzero commented Jan 28, 2026

roads

This PR adds --before $T to flatcover which functions similarly to npm install --before $T but for the purposes of presence in a given remote registry at time $T

  • Time-travel without the registry roundtrip: packument timestamps now flow through to output

    • Extract time[version] from packument response during coverage check
    • Include time field in JSON, NDJSON, and CSV when --full specified
    • ISO 8601 format preserves timezone information for downstream tooling
  • Spec field for the lazy and the wise: name@version computed once, used everywhere

    • Add spec convenience field to all --full output formats
    • Eliminates string concatenation in consumer pipelines
    • CSV column order updated: package,version,spec,present,integrity,resolved,time
  • Documentation matches implementation:

    • Reorganize output format docs into formats and fields sections
    • Add time-travel reanalysis example showing the actual workflow
    • Remove misleading per-format field descriptions
  • Relevant test coverage:

    • Verify time field appears in JSON, NDJSON, and CSV output
    • Validate ISO 8601 format parsing
    • Confirm time enables client-side --before filtering without network

indexzero and others added 5 commits January 25, 2026 02:51
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>
@indexzero indexzero merged commit aae49dc into main Feb 3, 2026
5 checks passed
@indexzero indexzero deleted the timetravel branch February 3, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant