From d44bd16ba806e5932862bea4300b8dbc646441ee Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Sun, 16 Aug 2026 09:16:20 +0200 Subject: [PATCH] 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 --- benchmarkFixture.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/benchmarkFixture.js b/benchmarkFixture.js index 859eb45..19f4ee4 100644 --- a/benchmarkFixture.js +++ b/benchmarkFixture.js @@ -180,9 +180,17 @@ async function writeRegistryConfig (pm, cwd, opts) { * zero would leave no verifier configured at all, silently deleting the * verification work whose offload to the server the accelerated column * exists to measure. + * + * `registrySupportsTimeField` is what pnpm cannot assume about an arbitrary + * registry but the benchmark can state about its own: pnpr serves the + * per-version `time` map in its abbreviated metadata precisely so the + * release-age check can read it there. Left at its `false` default, pnpm + * re-fetches the full packument of every package just to learn publication + * dates the abbreviated document already carries — paying for a + * conservative assumption, not for the verification itself. */ export function pnpmWorkspaceYaml (opts = {}) { - let yaml = "packages:\n - '.'\n" + let yaml = "packages:\n - '.'\nregistrySupportsTimeField: true\n" if (opts.pnprServer) { yaml += `pnprServer: ${opts.pnprServer}\n` }