Skip to content

Shared pinned-versions check for npm, cargo and python - #44

Merged
goastler merged 2 commits into
mainfrom
ci/pinned-versions
Nov 7, 2026
Merged

goastler merged 2 commits into
mainfrom
ci/pinned-versions

Conversation

@goastler

@goastler goastler commented Nov 6, 2026

Copy link
Copy Markdown
Member

What changed

  • New .github/scripts/pinned_versions.py and reusable pinned-versions.yml. Fails on any dependency that is not one exact version: package.json ranges (peerDependencies exempt), Cargo.toml requirements not written =x.y.z (a bare "1.2" is a range in cargo), and pyproject/requirements entries not ==. Also fails on lockfile entries with no integrity hash, like the copied check-pinned-versions.mjs in captcha and captcha-private, which this replaces.

Effect

Nothing yet. Once repos call it, an unpinned dependency fails CI. On captcha-private today it finds 46 python and cargo ranges and no npm ones, so those have to be pinned before switching.

Tests

test_pinned_versions.py: 11 unit tests (each range form, cargo workspace/path/git, python markers/URLs, pnpm and npm lockfiles, submodule/ignored-dir skipping, exclude, parse errors).

@goastler
goastler merged commit a994ae2 into main Nov 7, 2026
83 checks passed
@goastler
goastler deleted the ci/pinned-versions branch November 7, 2026 00:14
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.

1 participant