pnpm-upgrade

Updates pnpm locally and pins pnpm/action-setup commit SHAs in GitHub workflows.

Updated May 23, 2026
One-click install
npx skills add https://github.com/kiranimmadi2/promptforge-ai --skill pnpm-upgrade-kiranimmadi2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pnpm-upgrade
Source: https://github.com/kiranimmadi2/promptforge-ai/tree/main/openai-agents-js/.agents/skills/pnpm-upgrade
Command: npx skills add https://github.com/kiranimmadi2/promptforge-ai --skill pnpm-upgrade-kiranimmadi2

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Keeping pnpm and its CI integrations current is error-prone: the packageManager field needs an exact sha512 integrity hash, and GitHub Actions must be pinned to immutable commit SHAs rather than mutable tags. This Skill automates that multi-step upgrade without blunt search-and-replace edits. ## Core Features & Use Cases - Local pnpm upgrade: Runs pnpm self-update or falls back to corepack prepare, then captures the resulting version. - Integrity-pinned packageManager: Queries the npm registry for the package integrity, converts the sha512 digest to hex, and writes the full pnpm@version+sha512.hash string into package.json. - Workflow pin refresh: Resolves the latest pnpm/action-setup release tag to a commit SHA via git ls-remote and updates each workflow file by hand, preserving quoting and indentation. - Use Case: A maintainer wants to bump the pnpm toolchain across a monorepo before a release; the Skill updates the local install, package.json, and all .github/workflows pins, then verifies with git diff. ## Quick Start Use $pnpm-upgrade to update pnpm locally, align the packageManager field in package.json, and refresh the pinned pnpm/action-setup versions in my GitHub workflows.

Frequently Asked Questions about pnpm-upgrade

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I update pnpm to the latest version?

Run pnpm self-update from the repository root; if pnpm is missing or self-update fails, use corepack prepare pnpm@latest --activate. Confirm the result with pnpm -v and record that version for the remaining upgrade steps.

How do I pin pnpm/action-setup to a commit SHA in GitHub Actions?

Query the GitHub API for the latest pnpm/action-setup release tag, then run git ls-remote on that tag to get the dereferenced commit SHA. Set uses: pnpm/action-setup@<sha> in each workflow and update any with: version field to the new pnpm version.

What is the packageManager field format in package.json for pnpm?

The format is pnpm@<version>+sha512.<hex>, where the hex digest comes from converting the npm registry integrity value's base64 payload to lowercase hex. Fetch the integrity with curl against registry.npmjs.org and decode it with base64 and xxd.

Why should GitHub Actions be pinned to commit SHAs instead of tags?

Tags are mutable and can be re-pointed, while commit SHAs are immutable references to exact code. The Skill uses the latest release tag only to discover which commit SHA to pin, keeping workflows reproducible and resistant to tag tampering.

What should I do if the GitHub API rate limit blocks the upgrade?

Authenticate the API request with a GITHUB_TOKEN or GH_TOKEN environment variable to get higher rate limits. If the tag still cannot be resolved, abort the upgrade rather than guessing a version.