fix: replace pnpm/action-setup@v6 with corepack in all CI workflows#1122
Merged
fix: replace pnpm/action-setup@v6 with corepack in all CI workflows#1122
Conversation
Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/d0e206fc-2b0c-43f9-b31d-f37a660851c9 Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…o fix ERR_PNPM_BROKEN_LOCKFILE Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/d0e206fc-2b0c-43f9-b31d-f37a660851c9 Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
hotlong
April 13, 2026 13:03
View session
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates GitHub Actions workflows to install pnpm via Corepack (using the packageManager field in package.json) and bumps the pnpm store cache key version to avoid stale caches, aiming to resolve CI failures related to ERR_PNPM_BROKEN_LOCKFILE.
Changes:
- Replaced
pnpm/action-setup@v6withcorepack enableacross CI workflows. - Added
pnpm --versionverification steps (in most workflows) for easier CI debugging. - Bumped pnpm store cache keys from
v2tov3and documented the CI change in the changelog.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| CHANGELOG.md | Documents the CI move from pnpm/action-setup@v6 to Corepack and the cache key bump. |
| .github/workflows/ci.yml | Switches pnpm installation to Corepack, adds pnpm --version, bumps cache key to v3 across CI jobs. |
| .github/workflows/lint.yml | Switches pnpm installation to Corepack, adds pnpm --version, bumps cache key to v3. |
| .github/workflows/release.yml | Switches pnpm installation to Corepack, adds pnpm --version, bumps cache key to v3. |
| .github/workflows/validate-deps.yml | Switches pnpm installation to Corepack, adds pnpm --version, bumps cache key to v3. |
| .github/workflows/pr-automation.yml | Switches pnpm installation to Corepack (but currently lacks the pnpm --version step used elsewhere). |
Comment on lines
+68
to
72
| - name: Enable Corepack | ||
| run: corepack enable | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile |
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.
All CI jobs fail with
ERR_PNPM_BROKEN_LOCKFILE: "expected a single document in the stream, but found more"since PR #1117 merge. The lockfile content is valid (verified with the exact@zkochan/js-yaml@0.0.11parser bundled in pnpm 10.31.0), andpnpm install --frozen-lockfilesucceeds locally. The issue ispnpm/action-setup@v6's npm-based self-installer producing a pnpm environment that misparses the lockfile.Changes
Replace
pnpm/action-setup@v6→corepack enableacross all 5 workflows (ci.yml,lint.yml,release.yml,validate-deps.yml,pr-automation.yml). Corepack uses thepackageManagerfield inpackage.jsonwith SHA-512 verification — identical binary to local dev.Add
pnpm --versionstep after corepack enable for CI debuggability.Bump pnpm store cache keys
v2→v3to avoid restoring stale caches from the old setup.Regenerate
pnpm-lock.yamlfrom scratch (rm + pnpm install) for a clean baseline.Before/After