pnpm-upgrade
Original:🇺🇸 English
Translated
Keep pnpm current: run pnpm self-update/corepack prepare, align packageManager in package.json, and bump pnpm/action-setup + pinned pnpm versions in .github/workflows to the latest release. Use this when refreshing the pnpm toolchain manually or in automation.
2installs
Sourceopenai/openai-agents-js
Added on
NPX Install
npx skill4agent add openai/openai-agents-js pnpm-upgradeTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →pnpm Upgrade
Use these steps to update pnpm and CI pins without blunt search/replace.
Steps (run from repo root)
-
Update pnpm locally
- Try ; if pnpm is missing or self-update fails, run
pnpm self-update.corepack prepare pnpm@latest --activate - Capture the resulting version as .
PNPM_VERSION=$(pnpm -v)
- Try
-
Align package.json
- Open and set
package.jsontopackageManager(preserve trailing newline and formatting).pnpm@${PNPM_VERSION}
- Open
-
Find latest pnpm/action-setup tag
- Query GitHub API: .
curl -fsSL https://api.github.com/repos/pnpm/action-setup/releases/latest | jq -r .tag_name - Use /
GITHUB_TOKENif available for higher rate limits.GH_TOKEN - Store as (e.g.,
ACTION_TAG). Abort if missing.v4.2.0
- Query GitHub API:
-
Update workflows carefully (no broad regex)
- Files: everything under that uses
.github/workflows/.pnpm/action-setup - For each file, edit by hand:
- Set .
uses: pnpm/action-setup@${ACTION_TAG} - If a field exists, set it to
with: version:(keep quoting style/indent).${PNPM_VERSION}
- Set
- Do not touch unrelated steps. Avoid multiline sed/perl one-liners.
- Files: everything under
-
Verify
- Run and confirm it matches
pnpm -v.packageManager - to ensure only intended workflow/package.json changes.
git diff
- Run
-
Follow-up
- If runtime code/build/test config was changed (not typical here), run ; otherwise, a light check is enough.
$code-change-verification - Commit with and open a PR (automation may do this).
chore: upgrade pnpm toolchain
- If runtime code/build/test config was changed (not typical here), run
Notes
- Tools needed: ,
curl,jq,node/pnpm. Install if missing.corepack - Keep edits minimal and readable—prefer explicit file edits over global replacements.
- If GitHub API is rate-limited, retry with a token or bail out rather than guessing the tag.