Pin pnpm to 11.5.2 - #158
Merged
Merged
Conversation
CI floated on pnpm@latest, causing version drift with local environments and with the allowBuilds config in pnpm-workspace.yaml (which requires pnpm 10.26+). Pin pnpm via package.json's packageManager field and in the withastro/action workflows so CI and local development use the same version.
katrinafyi
reviewed
Jun 7, 2026
katrinafyi
left a comment
Member
There was a problem hiding this comment.
This seems like a huge headache, thanks for digging into it.
Is there any way to have GitHub actions use the package.json version rather than re-stating it?
Member
Author
Hm! I didn't think of that. Will need to do some research, but good idea. |
thomas-zahner
approved these changes
Jun 7, 2026
Member
Author
|
@katrinafyi, you were right. Addressed it in 0d086f6: instead of restating Looking at
So |
Instead of restating pnpm@11.5.2 in each withastro/action step, omit the package-manager input. The action auto-detects pnpm from pnpm-lock.yaml and pnpm/action-setup reads the version from the packageManager field in package.json, making it the single source of truth (addresses review feedback).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
"packageManager": "pnpm@11.5.2"topackage.jsonand replacepnpm@latestwithpnpm@11.5.2in thewithastro/actionworkflows (deploy, check-links, check-pr-links). This pins pnpm to a single version so CI and local development agree and CI can't silently jump to a future major.Background: CI installs with
pnpm@latestwhile local environments may run older versions like pnpm 9, where thepnpm-workspace.yamladded in #153 (without apackages:field) causes every pnpm command to fail withERROR packages field missing or empty, breakingmake watch. TheallowBuilds:config also requires pnpm 10.26+.Supersedes #157.