Repository navigation
chore: pin packageManager to pnpm@10.34.4 - #262
NnamdiCyber wants to merge 1 commit into
Conversation
Add packageManager field to package.json pinning pnpm@10.34.4, the version that created pnpm-lock.yaml, so local and CI installs use the same version. CI pnpm/action-setup pins 10.34.4 instead of floating 10. Add a check:pnpm-version script (run in CI and pre-commit) that rejects lockfile updates from an incompatible pnpm major.
|
@NnamdiCyber Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
truthixify
left a comment
There was a problem hiding this comment.
The package-manager pin is incomplete and currently breaks required CI. The examples workflow still configures pnpm/action-setup with version 10 while package.json specifies pnpm@10.34.4, so all eight example jobs fail before install. The main test jobs also fail formatting on scripts/check-pnpm-version.mjs. Update every workflow to use one source of truth (prefer omitting the action version when packageManager is present), format the script, and rerun the required matrix.
chore: pin packageManager to pnpm@10.34.4
Problem
package.jsonhad nopackageManagerfield, so CI installed a floating pnpm 10 release while the lockfile was created by pnpm 10.34.4. Different pnpm majors can produce different lockfile resolutions, causing drift between local and CI installs.Changes
package.json: added"packageManager": "pnpm@10.34.4"(Corepack resolves this locally).scripts/check-pnpm-version.mjs(new): readspackageManager, compares its major against runningpnpm --version, exits non-zero on mismatch. Rejects lockfile edits made with an incompatible pnpm major..github/workflows/ci.yml: pinned all 10pnpm/action-setup@v4version: 10→10.34.4; addedpnpm run check:pnpm-versionafterinstall --frozen-lockfilein the test job..husky/pre-commit: runspnpm check:pnpm-versionbefore format/build/test.Verification
package.jsonparses; check script passes locally (ok: pnpm@10.34.4 matches pnpm@10.34.4).Closes #240