Serve the packument time field (fix ERR_PNPM_MISSING_TIME)#17
Merged
Conversation
The bridge fetched only the abbreviated npm packument, which omits the per-version time map, and never added time for injected preview versions. pnpm's minimum-release-age resolution then hard-failed with ERR_PNPM_MISSING_TIME. Source the time map from npm's full packument via a separate, parallel, fail-soft fetch (the served response keeps the compact abbreviated version docs), seed packument.time from it, and add an entry for each injected preview version. Handles the synthesized (not-on-npm) case too.
A preview version's time (release date) was derived from npm's package-level modified time or a per-request new Date(), so it shifted per request. Stamp it once server-side in POST /-/publish (and the on-demand build) into the stored meta, serve that as the version's time, and fall back to a fixed past date for a ref registered but not yet published. Any client-reported time is ignored.
c3dfb42 to
9b14b22
Compare
This was referenced Jun 29, 2026
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.
The bridge fetched only the abbreviated npm packument (which omits the per-version
timemap) and never addedtimefor injected preview versions, so pnpm'sminimum-release-ageresolution failed withERR_PNPM_MISSING_TIME.Source
timefrom npm's full packument via a separate, parallel, fail-soft fetch (the served response keeps the compact abbreviated version docs), and add an entry for each injected preview version (incl. the synthesized not-on-npm case). Reproducing test written first; 55 tests pass.