chore: upgrade pnpm to v11 and add minimumReleaseAge - #127
Conversation
|
Thank you for following the naming conventions! 🙏 |
📝 WalkthroughWalkthroughThis PR upgrades pnpm from version 10.33.2 to 11.1.3, migrates workspace hoisting configuration from Changespnpm Version and Configuration Update
🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/autofix.yml:
- Around line 17-20: Replace the floating tag "pnpm/action-setup@v6" with the
immutable commit SHA
"pnpm/action-setup@ac6db6d3c1f721f886538a378a2d73e85697340a" wherever it appears
(e.g., in the autofix workflow and the other workflows referenced in the comment
such as ci.yml and build.yml) so the workflow uses the pinned commit instead of
the movable v6 tag; update each occurrences of the string "uses:
pnpm/action-setup@v6" to use the SHA version.
In @.github/workflows/build.yml:
- Around line 18-20: The workflow uses an unstable tag "pnpm/action-setup@v6";
replace that mutable reference with an immutable commit SHA or digest in
.github/workflows/build.yml (and likewise in .github/workflows/ci.yml and
.github/workflows/autofix.yml) by updating the uses value (e.g. change
pnpm/action-setup@v6 to pnpm/action-setup@<commit-sha>) so the action is pinned
to a specific commit; ensure all occurrences of pnpm/action-setup@v6 are updated
consistently and run a workflow lint/CI check to validate the new references.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: ba47de97-50a7-4389-a5ee-e25e88c26f17
📒 Files selected for processing (6)
.github/workflows/autofix.yml.github/workflows/build.yml.github/workflows/ci.yml.npmrcpackage.jsonpnpm-workspace.yaml
💤 Files with no reviewable changes (1)
- .npmrc
| uses: pnpm/action-setup@v6 | ||
| with: | ||
| version: latest | ||
| run_install: false | ||
|
|
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Resolve the current SHA for v6 and find unpinned pnpm/action-setup usage in workflows.
set -euo pipefail
echo "Resolved object for pnpm/action-setup tag v6:"
gh api repos/pnpm/action-setup/git/ref/tags/v6 | jq -r '.object.sha'
echo
echo "Workflow lines using pnpm/action-setup without commit pin:"
rg -n --type=yaml 'uses:\s*pnpm/action-setup@v[0-9]+' .github/workflowsRepository: HugoRCD/default-repository
Length of output: 414
Pin pnpm/action-setup to an immutable commit SHA
.github/workflows/autofix.yml still uses pnpm/action-setup@v6 (also present in ci.yml and build.yml). Tag v6 currently resolves to ac6db6d3c1f721f886538a378a2d73e85697340a; pin to that SHA to satisfy hardened CI requirements.
🔒 Proposed fix
- - name: Install pnpm
- uses: pnpm/action-setup@v6
+ - name: Install pnpm
+ uses: pnpm/action-setup@<commit-sha>
with:
run_install: false🧰 Tools
🪛 zizmor (1.25.2)
[error] 17-17: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/autofix.yml around lines 17 - 20, Replace the floating tag
"pnpm/action-setup@v6" with the immutable commit SHA
"pnpm/action-setup@ac6db6d3c1f721f886538a378a2d73e85697340a" wherever it appears
(e.g., in the autofix workflow and the other workflows referenced in the comment
such as ci.yml and build.yml) so the workflow uses the pinned commit instead of
the movable v6 tag; update each occurrences of the string "uses:
pnpm/action-setup@v6" to use the SHA version.
| uses: pnpm/action-setup@v6 | ||
| with: | ||
| version: latest | ||
| run_install: false |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== build.yml (around lines 10-30) =="
if [ -f .github/workflows/build.yml ]; then
nl -ba .github/workflows/build.yml | sed -n '10,35p'
else
echo "File not found: .github/workflows/build.yml"
fi
echo
echo "== Search for pnpm/action-setup usage =="
rg -n "pnpm/action-setup@" .github/workflows || trueRepository: HugoRCD/default-repository
Length of output: 168
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== build.yml (around lines 10-35) =="
if [ -f .github/workflows/build.yml ]; then
cat -n .github/workflows/build.yml | sed -n '10,35p'
else
echo "File not found: .github/workflows/build.yml"
fi
echo
echo "== Search for pnpm/action-setup usage =="
rg -n "pnpm/action-setup@" .github/workflows || trueRepository: HugoRCD/default-repository
Length of output: 779
Pin pnpm/action-setup to an immutable reference (commit SHA/digest).
.github/workflows/build.yml uses pnpm/action-setup@v6 (mutable tag). The same tag is used in .github/workflows/ci.yml and .github/workflows/autofix.yml; pin each to a commit SHA.
🧰 Tools
🪛 zizmor (1.25.2)
[error] 18-18: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/build.yml around lines 18 - 20, The workflow uses an
unstable tag "pnpm/action-setup@v6"; replace that mutable reference with an
immutable commit SHA or digest in .github/workflows/build.yml (and likewise in
.github/workflows/ci.yml and .github/workflows/autofix.yml) by updating the uses
value (e.g. change pnpm/action-setup@v6 to pnpm/action-setup@<commit-sha>) so
the action is pinned to a specific commit; ensure all occurrences of
pnpm/action-setup@v6 are updated consistently and run a workflow lint/CI check
to validate the new references.
Summary
Two related changes to harden the supply chain and modernize the package manager setup.
1. Upgrade pnpm to v11
packageManagertopnpm@11.1.3pnpm/action-setup@v2→@v6; remove pinnedversion: latestpnpm-workspace.yamlwithshamefullyHoist(moved from.npmrc) and explicitallowBuildsmap (required in v11).npmrc2. Add
minimumReleaseAgeto harden supply chain2-day minimum age (2880 minutes) before any newly published dependency can resolve. Trusted-source allowlist exempts the Nuxt and Vercel ecosystems.
Test plan
pnpm installresolves cleanly with v11Summary by CodeRabbit