# Make npm, pnpm, Yarn and Dependabot wait for new releases

> A release-age gate delays installation of packages published in the last day.

Source: https://fullbytedeveloper.com/blog/package-manager-release-cooldown
Keyword: COOLDOWN
Published here: 2026-11-10, updated 2026-12-03

A package published an hour ago can already be in your lockfile if installs chase `latest`. A release-age gate skips versions younger than a window you set, so a malicious publish can be yanked before your next resolve [1][2][4][5]. Set the same idea in npm, pnpm, Yarn, and Dependabot.

## One minute: pick a window and write it down

Start with one day for developer installs and three days for automated version bumps. Those numbers match common defaults: pnpm 11 defaults `minimumReleaseAge` to 1440 minutes, and Dependabot defaults version-update cooldown to three days [2][3][5]. Write the policy in the repo so every laptop and CI job share it.

```text
Developer installs: wait ~1 day after publish
Dependabot version bumps: wait 3 days (default)
Security updates: no cooldown (Dependabot still ships them)
```

The gate is not a malware scanner. It only refuses versions whose registry publish time is too recent. A five-day-old malicious package still installs.

## npm: min-release-age in days

npm's config key is `min-release-age`. The value is a number of days. When set, npm builds the tree so only versions older than that window install [1]. Put it in the project `.npmrc`:

```ini
min-release-age=1
```

Exclude packages you own and publish often:

```ini
min-release-age=1
min-release-age-exclude[]=@myorg/*
```

Per the docs, when the window blocks a fix that `npm audit fix` would install, npm keeps the vulnerable version, warns, and exits non-zero. Add the package to `min-release-age-exclude`, or relax the window, when you need that fix immediately [1].

This agent environment ran npm 10.9.9. Setting the option there failed:

```text
npm error `min-release-age` is not a valid npm option
```

Use an npm CLI that documents `min-release-age` (npm docs under the v11 config pages) before you rely on the gate in CI [1]. Check with:

```bash
npm --version
npm config get min-release-age
```

## pnpm: minimumReleaseAge in minutes

pnpm measures the window in minutes. Since pnpm 11, `minimumReleaseAge` defaults to `1440` (one day) and supply-chain defaults flipped safer [2][3]. Put the setting in `pnpm-workspace.yaml`, not as a casual `.npmrc` knob: pnpm 11 reads non-auth settings from YAML [3].

```yaml
minimumReleaseAge: 1440
minimumReleaseAgeExclude:
  - '@myorg/*'
```

`minimumReleaseAgeExclude` lists package names (or patterns) that may install immediately [2]. `minimumReleaseAgeStrict` controls whether resolve fails when no mature version matches the range; when you set `minimumReleaseAge` yourself, strict mode defaults on [2].

This environment had pnpm 10.33.4, where `pnpm config get minimum-release-age` printed `undefined`. Upgrade before you treat the one-day default as present.

## Yarn Berry: npmMinimalAgeGate as a duration

Yarn documents `npmMinimalAgeGate` as a minimum age according to the npm registry publish date. Versions newer than the gate are not considered for installation [4]. The docs show a duration string:

```yaml
# .yarnrc.yml
npmMinimalAgeGate: "1d"
```

`npmPreapprovedPackages` lists descriptors or name globs excluded from package gates [4]. On Yarn 4.10.3 in this environment, with no gate set, `yarn config get npmMinimalAgeGate` printed `0`. After writing `npmMinimalAgeGate: "1d"` into `.yarnrc.yml`, the same command printed `1`.

Classic Yarn 1.x does not carry this Berry setting. Confirm `yarn --version` starts with 2+ (Berry) before you copy the YAML.

## Dependabot: cooldown for version updates only

In `.github/dependabot.yml`, the `cooldown` block delays version updates. GitHub applies a default cooldown of three days to version updates even when `cooldown` is omitted. That default does not apply to security updates [5].

```yaml
version: 2
updates:
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "weekly"
    cooldown:
      default-days: 3
      exclude:
        - "@myorg/*"
```

You can split major, minor, and patch waits with `semver-major-days`, `semver-minor-days`, and `semver-patch-days` where the ecosystem supports SemVer [5]. The `exclude` list wins over `include`: a name on both lists updates immediately [5].

**Warning:** Do not read a quiet Dependabot week as "npm is safe." Security PRs can still open the same day a patched release lands, by design [5].

<figure>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 280" role="img" aria-label="Publish, wait through age gate, then install; security updates skip Dependabot cooldown">
  <defs>
    <marker id="arrowCooldownGate" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto">
      <path d="M0,0 L8,3 L0,6 Z" fill="#14b8a6"/>
    </marker>
  </defs>
  <rect x="0" y="0" width="720" height="280" rx="12" fill="#0b1f3a"/>
  <text x="24" y="36" fill="#f8fafc" font-family="ui-sans-serif, system-ui, sans-serif" font-size="16" font-weight="700">release-age gate</text>
  <rect x="24" y="56" width="150" height="64" rx="8" fill="#123052" stroke="#64748b" stroke-width="2"/>
  <text x="36" y="84" fill="#f8fafc" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">t=0 publish</text>
  <text x="36" y="104" fill="#cbd5e1" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">registry latest</text>
  <path d="M174 88 H222" stroke="#14b8a6" stroke-width="3" fill="none" marker-end="url(#arrowCooldownGate)"/>
  <rect x="230" y="56" width="180" height="64" rx="8" fill="#123052" stroke="#f59e0b" stroke-width="2"/>
  <text x="242" y="84" fill="#f59e0b" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">age window</text>
  <text x="242" y="104" fill="#f8fafc" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">skip young versions</text>
  <path d="M410 88 H458" stroke="#14b8a6" stroke-width="3" fill="none" marker-end="url(#arrowCooldownGate)"/>
  <rect x="466" y="56" width="230" height="64" rx="8" fill="#123052" stroke="#14b8a6" stroke-width="2"/>
  <text x="478" y="84" fill="#f8fafc" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">install / Dependabot</text>
  <text x="478" y="104" fill="#cbd5e1" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">mature version only</text>
  <path d="M320 120 V152" stroke="#14b8a6" stroke-width="3" fill="none" marker-end="url(#arrowCooldownGate)"/>
  <rect x="24" y="160" width="672" height="96" rx="8" fill="#123052" stroke="#64748b" stroke-width="2"/>
  <text x="36" y="192" fill="#f8fafc" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">npm min-release-age (days) · pnpm minimumReleaseAge (minutes)</text>
  <text x="36" y="216" fill="#f8fafc" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">Yarn npmMinimalAgeGate (duration) · Dependabot cooldown default-days</text>
  <text x="36" y="240" fill="#f59e0b" font-family="ui-sans-serif, system-ui, sans-serif" font-size="14">Dependabot security updates skip cooldown [5]</text>
</svg>
</figure>

*Age gates delay ordinary installs and version bumps; Dependabot security updates still move immediately.*

## Lockfiles still decide what you ship

The age gate runs when the client resolves or installs. If `package-lock.json`, `pnpm-lock.yaml`, or `yarn.lock` already pins a bad version, a cold install of that lockfile still gets the bad pin. Commit the lockfile. In CI use deterministic installs:

```bash
npm ci
pnpm install --frozen-lockfile
yarn install --immutable
```

After an incident, delete the bad pin from the lockfile (or regenerate after excluding the version), then let the age gate prevent racing the next compromise. For how a worm reused stolen publish credentials across packages, see [How the September 2025 npm worm spread](/blog/shai-hulud-npm-worm-response).

## Mistakes that leave the gate open

Putting `minimumReleaseAge` only in `.npmrc` on a pnpm 11+ repo that expects YAML settings, then assuming the default still protects you [3].

Using Yarn classic while copying Berry `.yarnrc.yml` keys. The gate never loads.

Setting Dependabot `cooldown` and then wondering why security PRs still open the same day. Version updates wait; security updates do not [5].

Chasing floating ranges in apps without a lockfile. The gate helps, but every machine can still resolve a different mature version unless you pin.

Running npm 10 in CI while the docs and laptop use npm 11 with `min-release-age`. The option is rejected and installs proceed without the window.

## Rollout that does not block the whole company

1. Enable Dependabot `cooldown` (or accept the three-day default) on version updates [5].
2. Set a one-day window in the package manager your apps actually use.
3. Exclude internal scopes you publish several times a day.
4. Document how to break glass for an urgent patched release (`min-release-age-exclude`, `minimumReleaseAgeExclude`, or a temporary shorter window).

Watch the first week of CI. Failures that say no version satisfies the range usually mean every candidate is still inside the window. Either wait, widen the range to an older line, or exclude that one package on purpose.

## How the window interacts with ranges

A caret range such as `^1.4.0` can still resolve to many versions. The age gate removes the young ones from consideration, then the usual semver solver picks among what remains [1][2]. If every version that satisfies the range is still inside the window, resolve fails (or, for pnpm in non-strict mode, may fall back depending on `minimumReleaseAgeStrict`) [2]. That failure is the gate working. Widen the range only when you deliberately accept an older line, not by clearing the window in panic.

Exact pins (`1.4.2`) and lockfile entries still install that exact version even if it would be too young to newly resolve today. Treat lockfile review after an incident as mandatory. The age gate protects the next resolve, not the pin you already shipped to production last night.

Transitive dependencies count. A direct dependency can be months old while one of its nested deps published malware an hour ago. pnpm documents that `minimumReleaseAge` applies to all dependencies including transitive ones [2]. npm's tree build with `min-release-age` similarly constrains installable versions across the tree [1]. Do not assume "we only depend on three packages" means three publish clocks.

## Local overrides without abandoning the repo policy

Sometimes you need a one-off install of a package published twenty minutes ago (your own canary, a partner's hotfix). Prefer a documented exclude for that package name over deleting the project-wide window. npm's `min-release-age-exclude`, pnpm's `minimumReleaseAgeExclude`, Yarn's `npmPreapprovedPackages`, and Dependabot's `cooldown.exclude` exist for that [1][2][4][5]. Put the exclude in the PR description so the next reader knows it was intentional.

CLI flags and environment overrides can relax a lower-priority config. Know your tool's precedence so a laptop export does not silently disable the gate while CI still enforces it. For npm, `before` can coexist with `min-release-age`; when both apply in one source, `before` wins [1]. Use absolute cutoffs for forensic rebuilds of an old tree; use relative age for day-to-day defense.

## What cooldown does not cover

Git dependencies and local path packages are outside the "registry publish time" story. A malicious commit on a git URL can be brand new while still installing. Exotic protocols need separate policy (pnpm's supply-chain docs discuss related defaults such as blocking exotic subdeps in v11) [3].

Private registries that omit publish `time` metadata may skip or fail the age check depending on tool settings. pnpm's `minimumReleaseAgeIgnoreMissingTime` defaults to skipping the check when time is missing; set it false if you want hard failure instead [2]. Know what your mirror stores before you celebrate the YAML.

Cooldown also does not replace refusing typosquat names, reviewing lifecycle scripts, or requiring provenance where you publish. It is one delay valve in a longer supply-chain checklist.

A cooldown buys hours while registries and researchers react. It does not replace pin review, provenance checks, or refusing fake package names. Pair it with a lockfile and a human glance at sudden major bumps.

Pair the age gate with the pack trap in [.npmignore can publish the .env your .gitignore was hiding](/blog/npmignore-vs-gitignore-publishing). Browse the [Dev tools topic](https://fullbytedeveloper.com/blog/topic/dev-tools).

Send this to the friend who installs every npm release the same hour it lands.

Image: Fresh package cubes arriving on a short conveyor and held in a glowing amber waiting bay while a time-ring around the bay completes a rotation, after which a cube may enter the install hopper, shown as unmarked geometric solids with no typography or logos.
https://fullbytedeveloper.com/media/package-manager-release-cooldown/package-manager-release-cooldown-venice.webp
A release-age gate delays brand-new packages before they can be installed.

## Sources

1. [npm docs: min-release-age config](https://docs.npmjs.com/cli/v11/using-npm/config#min-release-age)
2. [pnpm docs: minimumReleaseAge](https://pnpm.io/settings/dependency-resolution#minimumreleaseage)
3. [pnpm 11.0 release notes](https://pnpm.io/blog/releases/11.0)
4. [Yarn docs: npmMinimalAgeGate](https://yarnpkg.com/configuration/yarnrc#npmMinimalAgeGate)
5. [GitHub docs: Dependabot cooldown option](https://docs.github.com/en/code-security/reference/supply-chain-security/dependabot-options-reference)
