feat: add update-pnpm-minimum-release-age input - #3
Conversation
pnpm 12 defaults minimumReleaseAge to 24 hours, and pnpm self-update deliberately drops the repository's release-age settings (including minimumReleaseAgeExclude) so a repo cannot decide whether the binary may be replaced. On CI, where no user-level config exists, the built-in cutoff therefore applies to pnpm itself: a dist-tag pointing at a release younger than 24 hours is silently resolved to the newest mature version, and update-pnpm cannot move to a same-day release. The new input sets PNPM_CONFIG_MINIMUM_RELEASE_AGE for the self-update invocation only (env-level policy is honored by design), so workflows that follow prereleases can pass 0 and pick up a release immediately. The dependency update keeps the repository's own release-age settings. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📜 Recent review details🔇 Additional comments (5)
📝 WalkthroughWalkthroughThe action adds Changespnpm release-age override
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Summary by QodoAdd self-update minimumReleaseAge override for pnpm updates
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Summary
Adds an
update-pnpm-minimum-release-ageinput that overrides pnpm'sminimumReleaseAge(in minutes) for thepnpm self-updatestep only, by settingPNPM_CONFIG_MINIMUM_RELEASE_AGEright before the self-update invocation.Why
pnpm 12 defaults
minimumReleaseAgeto 24 hours, andpnpm self-updatedeliberately ignores the repository's release-age settings — includingminimumReleaseAgeExclude— so a repo cannot decide whether the pnpm binary may be replaced (clear_self_update_policy). On CI there is no user-level config, so the built-in 24-hour cutoff applies to pnpm itself: a dist-tag pointing at a release younger than 24 hours is silently resolved to the newest mature version instead, and the action reports "already set to use" the old version.This is exactly what happened in pnpm/pnpm's update-lockfile workflow after publishing
pnpm@12.0.0-beta.1: three runs of https://github.com/pnpm/pnpm/actions/workflows/update-lockfile.yml minutes after the publish all stayed on beta.0 (e.g. https://github.com/pnpm/pnpm/actions/runs/30571699202). Env-level policy is honored by self-update by design, so passingPNPM_CONFIG_MINIMUM_RELEASE_AGE=0lets a workflow that follows prereleases pick up a same-day release; verified against the released 12.0.0-beta.0 binary.The variable is exported only immediately before self-update (the last step of
update.sh), so the dependency update keeps the repository's own release-age settings.Testing
bats test/— 31 tests pass, including two new ones covering the env var's presence and scoping (the pnpm stub now recordsPNPM_CONFIG_MINIMUM_RELEASE_AGEwhen set).Written by an agent (Claude Code, claude-fable-5).
Summary by CodeRabbit
New Features
Documentation