Skip to content

chore: configure dependency minimum release age / cooldown#2426

Merged
Piccirello merged 1 commit into
mainfrom
chore/dependency-minimum-release-age
May 28, 2026
Merged

chore: configure dependency minimum release age / cooldown#2426
Piccirello merged 1 commit into
mainfrom
chore/dependency-minimum-release-age

Conversation

@Piccirello
Copy link
Copy Markdown
Member

Adds a minimum release age ("cooldown") to this repo's package-manager
configuration so newly published dependency versions wait ~7 days before they
can be adopted. This reduces exposure to compromised or unstable packages that
are caught and unpublished shortly after release.

Applied per package manager found in the repo:

  • Dependabot (.github/dependabot.yml): cooldown.default-days: 7 per ecosystem
  • pnpm (pnpm-workspace.yaml): minimumReleaseAge: 10080 (minutes)
  • npm (.npmrc): min-release-age=7 (days)
  • yarn (.yarnrc.yml): npmMinimalAgeGate: "7d"
  • bun (bunfig.toml): minimumReleaseAge = 604800 (seconds)
  • uv (pyproject.toml): exclude-newer = "7 days"

Generated and verified with semgrep (package_managers.* rules); the check passes
after this change.

Adds a minimum release age ("cooldown") to this repo's package-manager
configuration so newly published dependency versions wait ~7 days before they
can be adopted. This reduces exposure to compromised or unstable packages that
are caught and unpublished shortly after release.

Applied per package manager found in the repo:
- Dependabot (.github/dependabot.yml): cooldown.default-days: 7 per ecosystem
- pnpm (pnpm-workspace.yaml): minimumReleaseAge: 10080 (minutes)
- npm (.npmrc): min-release-age=7 (days)
- yarn (.yarnrc.yml): npmMinimalAgeGate: "7d"
- bun (bunfig.toml): minimumReleaseAge = 604800 (seconds)
- uv (pyproject.toml): exclude-newer = "7 days"

Generated and verified with semgrep (package_managers.* rules); the check passes
after this change.
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 28, 2026

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
.npmrc:3
**Known npm bug with tilde version ranges**

`min-release-age` was introduced in npm CLI 11.10.0 (Feb 2026) and is the correct key here. However, there is a [known bug](https://github.com/npm/cli/issues/9005) where having this setting in `.npmrc` causes `npm install` to fail with `--min-release-age cannot be provided when using --before` whenever any dependency in the tree uses a `~` version range — npm internally derives `--before` from the release-age value and then treats it as a conflict. Since most `package.json` files use tilde ranges, any direct `npm install` invocation in CI or local dev would be broken by this setting until the bug is resolved upstream.

Reviews (1): Last reviewed commit: "chore: configure dependency minimum rele..." | Re-trigger Greptile

Comment thread .npmrc
@@ -1,2 +1,3 @@
node-linker=hoisted
shamefully-hoist=true
min-release-age=7
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Known npm bug with tilde version ranges

min-release-age was introduced in npm CLI 11.10.0 (Feb 2026) and is the correct key here. However, there is a known bug where having this setting in .npmrc causes npm install to fail with --min-release-age cannot be provided when using --before whenever any dependency in the tree uses a ~ version range — npm internally derives --before from the release-age value and then treats it as a conflict. Since most package.json files use tilde ranges, any direct npm install invocation in CI or local dev would be broken by this setting until the bug is resolved upstream.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .npmrc
Line: 3

Comment:
**Known npm bug with tilde version ranges**

`min-release-age` was introduced in npm CLI 11.10.0 (Feb 2026) and is the correct key here. However, there is a [known bug](https://github.com/npm/cli/issues/9005) where having this setting in `.npmrc` causes `npm install` to fail with `--min-release-age cannot be provided when using --before` whenever any dependency in the tree uses a `~` version range — npm internally derives `--before` from the release-age value and then treats it as a conflict. Since most `package.json` files use tilde ranges, any direct `npm install` invocation in CI or local dev would be broken by this setting until the bug is resolved upstream.

How can I resolve this? If you propose a fix, please make it concise.

@Piccirello Piccirello enabled auto-merge (squash) May 28, 2026 23:10
@Piccirello Piccirello requested a review from feliperalmeida May 28, 2026 23:19
@Piccirello Piccirello merged commit 982b7f8 into main May 28, 2026
15 checks passed
@Piccirello Piccirello deleted the chore/dependency-minimum-release-age branch May 28, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants