mirror of
https://github.com/pnpm/pnpm.git
synced 2026-05-29 11:11:43 -04:00
Backport of #11622 to release/10. The npm registry returns abbreviated package metadata (without per-version `time`) by default, which made the maturity check throw ERR_PNPM_MISSING_TIME whenever cached abbreviated metadata was reused under `publishedBy`/`minimumReleaseAge`. pnpm now upgrades cached abbreviated metadata to the full document via a follow-up fetch, persists the upgrade to the on-disk cache so subsequent installs skip the extra fetch, and lets ERR_PNPM_MISSING_TIME from the cache fast path fall through to the network fetch even under strict mode. Adapted to release/10's simpler pickPackage shape (no 304/etag plumbing, no `pickMatchingVersionFast`/`pickMatchingVersionFinal` split, no `ignoreMissingTimeField`), so the unconditional helper triggers the upgrade whenever the cached meta lacks `time`.