After the litellm incident on PyPI, and then axios on npm, I came across this trick on Twitter: configure your package manager to reject dependency releases that are too new.
uv
npm
bun
Installing from a lockfile in CI
A release-age buffer applies when selecting dependency versions. In CI, install from the lockfile committed to your repository instead of letting the install update it. These commands fail if the lockfile needs to change to match the project’s dependency declarations:
- uv:
uv sync --locked - npm:
npm ci - Bun:
bun ci
bun ci is equivalent to: