Skip to content

[codex] pin pnpm in GitHub workflows#609

Open
Sean-Kenneth-Doherty wants to merge 2 commits into
firstcontributions:mainfrom
Sean-Kenneth-Doherty:codex/pin-preview-pnpm
Open

[codex] pin pnpm in GitHub workflows#609
Sean-Kenneth-Doherty wants to merge 2 commits into
firstcontributions:mainfrom
Sean-Kenneth-Doherty:codex/pin-preview-pnpm

Conversation

@Sean-Kenneth-Doherty
Copy link
Copy Markdown

Summary

Pin the pnpm version used by the PR preview workflow and the GitHub Pages deploy workflow to 10.33.4 instead of latest.

Why

The preview workflow pins Node.js 20 but installs pnpm@latest. The current latest pnpm release is 11.x, whose package metadata requires Node.js >=22.13. Dependabot PR preview runs #597 and #598 both failed before dependency installation with ERR_UNKNOWN_BUILTIN_MODULE: node:sqlite after pnpm 11 was installed on Node 20.

Pinning pnpm to the latest 10.x release keeps the current Node 20 workflow compatible and prevents future latest drift from breaking preview or Pages deploy runs unexpectedly.

Validation

  • npm view pnpm@latest version engines --json reports pnpm 11.1.2 requires node >=22.13
  • npm view pnpm@10.33.4 version engines --json reports pnpm 10.33.4 requires node >=18.12
  • pnpm build
  • git diff --check

@Sean-Kenneth-Doherty
Copy link
Copy Markdown
Author

Fresh validation against the current PR head (6c8f436):

  • the PR is scoped to .github/workflows/deploy-to-gh-pages.yml and .github/workflows/pr-preview.yml
  • both workflows replace pnpm latest with pnpm 10.33.4
  • Ruby YAML parsing succeeds for both workflow files
  • npm view pnpm@10.33.4 version returns 10.33.4, so the pinned package version exists in the registry
  • GITHUB_TOKEN=$(gh auth token) pnpm build -> Astro build succeeded, 2 pages
  • workflow text has 0 remaining pnpm latest references and one 10.33.4 pin in each changed workflow
  • git diff --check origin/main...HEAD -> clean

I validated this in an isolated temporary git worktree so generated .astro/dist output did not touch the main checkout.

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