Skip to content

Commit d44bd16

Browse files
zkochanclaude
andcommitted
feat: declare that the registry serves time in abbreviated metadata
pnpr ships the per-version `time` map in its abbreviated packuments precisely so pnpm's release-age check can read it there, and `registrySupportsTimeField: true` is how a client is told to rely on that. pnpm cannot assume it about an arbitrary registry, but the benchmark can state it about its own. Today the setting is measurably inert on the published rows: pnpm 12's release-age verifier does not consult it - its timestamp ladder goes abbreviated `modified` shortcut, local full-meta mirror, attestation endpoint, full packument - so a package modified inside the cutoff window still pays the full-metadata fallback (the lockfile row measured 4.6s with the flag as without; `trustLockfile: true` at 3.9s bounds what the verifier could recover). The flag gates only time-based resolution's up-front full fetch. Declared anyway because it is true, and because the verifier learning to read per-version `time` from abbreviated metadata (reported upstream) will then speed these rows up with no benchmark change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 4dde06b commit d44bd16

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

benchmarkFixture.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,17 @@ async function writeRegistryConfig (pm, cwd, opts) {
180180
* zero would leave no verifier configured at all, silently deleting the
181181
* verification work whose offload to the server the accelerated column
182182
* exists to measure.
183+
*
184+
* `registrySupportsTimeField` is what pnpm cannot assume about an arbitrary
185+
* registry but the benchmark can state about its own: pnpr serves the
186+
* per-version `time` map in its abbreviated metadata precisely so the
187+
* release-age check can read it there. Left at its `false` default, pnpm
188+
* re-fetches the full packument of every package just to learn publication
189+
* dates the abbreviated document already carries — paying for a
190+
* conservative assumption, not for the verification itself.
183191
*/
184192
export function pnpmWorkspaceYaml (opts = {}) {
185-
let yaml = "packages:\n - '.'\n"
193+
let yaml = "packages:\n - '.'\nregistrySupportsTimeField: true\n"
186194
if (opts.pnprServer) {
187195
yaml += `pnprServer: ${opts.pnprServer}\n`
188196
}

0 commit comments

Comments
 (0)