-
Notifications
You must be signed in to change notification settings - Fork 28
feat: declare that the registry serves time in abbreviated metadata #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
zkochan
wants to merge
1
commit into
main
Choose a base branch
from
add-registry-supports-time-field
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: pnpm/benchmarks
Length of output: 37395
🏁 Script executed:
Repository: pnpm/benchmarks
Length of output: 4981
🏁 Script executed:
Repository: pnpm/benchmarks
Length of output: 50373
🏁 Script executed:
Repository: pnpm/benchmarks
Length of output: 3092
🌐 Web query:
pnpm 12 registrySupportsTimeField release-age verification abbreviated metadata💡 Result:
The registrySupportsTimeField setting in pnpm is a boolean configuration used to optimize dependency resolution when using time-based resolution modes or features requiring package release timestamps [1][2]. Background and Purpose Standard abbreviated metadata (the compact format typically requested by package managers to speed up installations) does not include the time field, which contains publication timestamps [3][4]. Features such as resolutionMode: time-based require these timestamps to function [2][4]. Without registrySupportsTimeField enabled, pnpm is forced to fetch full metadata—which is significantly slower—to access the necessary time information [1][2][4]. If a registry is configured to include the time field in its abbreviated metadata, setting registrySupportsTimeField to true allows pnpm to use the faster abbreviated format while still accessing the required temporal data [1][2]. Verification and Support As of August 2026, the primary registry documented to support including the time field in abbreviated metadata is Verdaccio (version 5.15.1 and later) [1][2]. Related Considerations 1. Errors: If pnpm expects time metadata that is missing, it may throw an ERR_PNPM_MISSING_TIME error [5][6]. This often occurs when using features like resolutionMode: time-based or trustPolicy: no-downgrade [5][7][6]. 2. Release Age: There is a related setting, minimumReleaseAgeIgnoreMissingTime (default: true), which controls whether pnpm skips the minimumReleaseAge check if the registry metadata lacks the time field [8][5]. This prevents installations from failing unnecessarily when working with registries that do not provide this data [8]. 3. Global Config vs. Local Config: Technical issues have been identified where global trust policies (e.g., trustPolicy: no-downgrade) could trigger ERR_PNPM_MISSING_TIME even if the registry provides the time field, because the internal logic incorrectly fetched abbreviated metadata for global operations [7][6]. This has been addressed in recent updates [7].
Citations:
pnpm dedupefailing withERR_PNPM_MISSING_TIMEpnpm#11238🏁 Script executed:
Repository: pnpm/benchmarks
Length of output: 10185
🌐 Web query:
site:github.com/pnpm/pnpm "registrySupportsTimeField" "minimumReleaseAge"💡 Result:
registrySupportsTimeField is a configuration setting in pnpm used to indicate whether a package registry provides the necessary "time" metadata field required for time-based dependency resolution features [1][2][3]. This setting acts as a gate for features that depend on per-version publish dates [2]. Specifically, when pnpm's resolution mode is set to time-based or when a trust policy such as no-downgrade is active, pnpm requires access to the package's publish time [2][4]. If the registry does not provide this information—or if pnpm is unable to retrieve it—these features may fail with an error such as ERR_PNPM_MISSING_TIME [4][5]. By setting registrySupportsTimeField to false, you inform pnpm that the registry cannot be relied upon for this metadata, which influences how pnpm fetches and processes package metadata [2]. This setting is frequently relevant when using registries (like certain private artifact repositories) that do not preserve or provide the original publication timestamps for packages [6]. Related configuration options include: minimumReleaseAge: Defines the required age (in minutes) for a package release to be considered eligible for installation [1][7]. minimumReleaseAgeIgnoreMissingTime: A setting that, when enabled (default is true), allows pnpm to proceed even if the "time" field is missing, effectively bypassing the time-based check for those specific packages [4][5].
Citations:
pnpm dedupefailing withERR_PNPM_MISSING_TIMEpnpm#11238pnpm dedupefailing withERR_PNPM_MISSING_TIMEpnpm#11238minimumReleaseAgeandtrustPolicychecks pnpm#11720🏁 Script executed:
Repository: pnpm/benchmarks
Length of output: 499
🏁 Script executed:
Repository: pnpm/benchmarks
Length of output: 295
🏁 Script executed:
Repository: pnpm/benchmarks
Length of output: 50371
🏁 Script executed:
Repository: pnpm/benchmarks
Length of output: 50371
🏁 Script executed:
Repository: pnpm/benchmarks
Length of output: 39972
Separate
registrySupportsTimeFieldfromminimumReleaseAge.pnpm uses
registrySupportsTimeFieldforresolutionMode: time-based. pnpm 12 obtainsminimumReleaseAgetimestamps through a separate on-demand metadata path. Since this benchmark uses the default resolution mode, document the setting as time-based compatibility, not as a current release-age optimization.🤖 Prompt for AI Agents