Skip to content

Instantly share code, notes, and snippets.

@tracy-codes
Created May 19, 2026 19:15
Show Gist options
  • Select an option

  • Save tracy-codes/c2bfe1f86338c2b4da271107cb25c8dc to your computer and use it in GitHub Desktop.

Select an option

Save tracy-codes/c2bfe1f86338c2b4da271107cb25c8dc to your computer and use it in GitHub Desktop.
Set minimum release globally for npm, pnpm, and bun.
# Install npm >= 11.10.0
# ===== npm (days) =====
npm config set min-release-age 3 --location=user
npm config set ignore-scripts true --location=user
# ===== pnpm (minutes) — 3 days = 4320 =====
pnpm config set minimumReleaseAge 4320 --global
# ===== bun (seconds) — 3 days = 259200 =====
touch ~/.bunfig.toml
grep -q '^\[install\]' ~/.bunfig.toml || printf '\n[install]\n' >> ~/.bunfig.toml
sed -i.bak '/^minimumReleaseAge[[:space:]]*=/d' ~/.bunfig.toml && rm -f ~/.bunfig.toml.bak
printf 'minimumReleaseAge = 259200\n' >> ~/.bunfig.toml
# Verify
echo "=== npm ==="
npm config get min-release-age # may show 'null' due to npm bug #9199
npm config get before # this is the real proof — should be ~3 days ago
npm config get ignore-scripts
echo "=== pnpm ==="
pnpm config get minimumReleaseAge
echo "=== bun ==="
cat ~/.bunfig.toml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment