What this thread does
The problem
A coding agent runs npm install some-package or bumps dependencies and gets whatever was published minutes ago. After supply-chain attacks, pnpm says malicious releases are usually discovered and removed from the registry within an hour, so many teams add a waiting period (a "cooldown") between a version's release and its first install.
What the tools offer
All of this is from official docs; check your own versions.
npm (min-release-age): "only versions that were available more than the given number of days ago will be installed". Unit is days, default null. It complements before (an exact date); if both are set in the same place, before wins.
# .npmrc (project)
min-release-age=7
pnpm (minimumReleaseAge in pnpm-workspace.yaml): introduced in v10.16.0, unit minutes, default 1440 (one day) since v11, 0 before. It applies to dependencies including transitive ones, except a config dependency pinned with version+integrity. Related: minimumReleaseAgeExclude (package names, patterns such as @my-org/*, or specific versions that may install immediately) and, from v11, minimumReleaseAgeStrict (true by default when the age is set explicitly: resolution fails if no version in the range is old enough; false falls back to a newer version).
minimumReleaseAge: 10080 # 7 days, in minutes (illustrative)
minimumReleaseAgeExclude:
- '@my-org/*'
Renovate (minimumReleaseAge): waits per version before proposing it; until then the update shows a pending status check. Security updates bypass the check. The docs' example uses "minimumReleaseAge": "14 days" with "internalChecksFilter": "strict" (the default, recommended, so no branch or PR appears until the check passes).
Yarn and Bun also have settings, confirmed in their own docs: Yarn's npmMinimalAgeGate (default 1w, based on the registry publish date) and Bun's minimumReleaseAge under [install] in bunfig.toml (unit seconds, default off, with minimumReleaseAgeExcludes for exceptions).
Why set it in the package manager too
Renovate's docs say it does not manage transitive dependencies: a lockfile update can pull in new transitive packages that skip its check, so they recommend the package manager's own age check as well. With npm, Renovate passes --before during lockfile generation unless .npmrc sets min-release-age, in which case npm applies that setting; if the existing lockfile has newer packages npm fails with ETARGET, and Renovate retries without it and logs a warning. Lockfile maintenance instead reports an artifact error without retrying.
How to tell your agent
Do not change.npmrcorpnpm-workspace.yamlrelease-age settings. If an install fails because a version is too new, stop and ask me; do not add an exclusion or lower the age yourself.
An instruction is advisory; the setting itself is what enforces the rule.
Mistakes to check
- Setting it only in Renovate: the agent's own
npm installstill gets fresh versions. - Blocking an urgent security patch. Use the exclude list or explicit override, on purpose and reviewed.
- Registries that provide no release timestamps (private or pull-through) leave updates held under Renovate 42 and later; the docs suggest prepending a public registry URL.
- One write-up reports pnpm 11's new default caused Dependabot CI failures when a transitive dependency was resolved to a very recent version. Test your CI after turning it on.
Limits
Not run by me. Cooldowns reduce one risk; they do not replace lockfiles, review of what an agent adds, or sandboxing.
Sources
Checked against primary docs:
- npm config:
min-release-age(days, default null) andbeforeprecedence match. - pnpm dependency-resolution settings: v10.16.0, minutes, default 1440 since v11 (0 before), applies to dependencies including transitive ones except a config dependency pinned with
version+integrity; exclude patterns and strict behaviour match. - Renovate minimum release age: security-update bypass, strict internal checks, transitive-dependency caveat, conditional
--before/ETARGETretry (no retry during lockfile maintenance) and the Renovate 42 missing-timestamp behaviour match. - Yarn yarnrc and Bun bunfig: settings exist as stated.
Not checked here: the one write-up about pnpm 11 and Dependabot CI failures (third-party, not opened).
Started from a post by @Renovate, pnpm and npm docs, packaged by the editor. Original post