This skill updates Node.js and pnpm versions across the project when explicitly requested, verifying against official sources before applying changes.
npx playbooks add skill yuann3/skills --skill update-packages
Systematically update Node.js, pnpm, and npm dependencies to latest versions across entire project, including all package.json files, CI/CD configs, and Docker files. Core principle: Always verify against official sources, never assume or guess versions.
ONLY when user explicitly asks to update Node.js or pnpm versions.
Do NOT use this skill:
Wait for explicit user request.
| Step | Action | Verification |
|------|--------|--------------|
| 1 | Check official sources | nodejs.org, pnpm.io |
| 2 | Update npm dependencies | Use npm-check-updates |
| 3 | Find all locations | .tool-versions, package.json, CI/CD, Dockerfiles |
| 4 | Update systematically | Every occurrence found |
| 5 | Verify locally | node -v, pnpm -v, run tests |
| 6 | Test CI/CD | Run workflow or review changes |
ALWAYS check official sources first - never guess or use cached knowledge:
# Node.js - Check official site
# Visit: https://nodejs.org/en/download/package-manager
# Or use API:
curl -s https://nodejs.org/dist/index.json | grep -m1 '"version"' | cut -d'"' -f4
# pnpm - Check official site
# Visit: https://pnpm.io/installation
# Or use npm:
npm view pnpm version
Why: Your knowledge may be outdated. Official sources are authoritative.
Use the package manager to run npm-check-updates for all package.json files:
# Using pnpm (recommended if project uses pnpm)
pnpm dlx npm-check-updates -u
# For monorepos or multiple package.json files
pnpm dlx npm-check-updates -u --deep
# After updating, install new versions
pnpm install
Alternative package managers:
# Using npx (npm)
npx npm-check-updates -u
npm install
# Using yarn
npx npm-check-updates -u
yarn install
What this does:
Options:
-u or --upgrade: Write updated versions to package.json--deep: Update nested package.json files in workspaces--target minor: Only update to latest minor versions--target patch: Only update to latest patch versions--interactive: Choose which packages to updateSearch comprehensively - don't rely on memory:
# Find Node.js version references
grep -r "node" --include="*.json" --include="*.yml" --include="*.yaml" \
--include="Dockerfile*" --include=".nvmrc" --include=".node-version" \
--include=".tool-versions"
# Find pnpm version references
grep -r "pnpm" --include="*.json" --include="*.yml" --include="*.yaml" \
--include="Dockerfile*" --include="package.json" --include=".tool-versions"
Common locations:
.tool-versions (asdf version manager).nvmrc or .node-version (other version managers)package.json (engines field, packageManager field).github/workflows/*.yml (GitHub Actions).gitlab-ci.yml (GitLab CI)Dockerfile and docker-compose.yml.circleci/, azure-pipelines.yml, etc.)For each location found:
Node.js updates:
// package.json
{
"engines": {
"node": ">=22.0.0" // Update to latest major
}
}
# .github/workflows/ci.yml
- uses: actions/setup-node@v4
with:
node-version: '22' # Update to latest major
# .tool-versions (asdf)
nodejs 22.11.0
pnpm 9.14.2
# .nvmrc (if using nvm)
22.11.0
pnpm updates:
// package.json
{
"packageManager": "pnpm@9.14.2", // Exact latest version
"engines": {
"pnpm": ">=9.0.0" // Latest major
}
}
# .github/workflows/ci.yml
- uses: pnpm/action-setup@v4
with:
version: 9.14.2 # Exact latest version
Local verification:
# Update local versions (asdf example)
asdf install nodejs 22.11.0
asdf install pnpm 9.14.2
asdf global nodejs 22.11.0 # or asdf local
asdf global pnpm 9.14.2
# Verify versions
node -v # Should show v22.x.x
pnpm -v # Should show 9.x.x
# Test installation works
pnpm install
pnpm build # Or relevant build command
CI/CD verification:
| Mistake | Fix |
|---------|-----|
| Guessing latest version | Check nodejs.org and pnpm.io |
| Manually updating dependencies | Use npm-check-updates |
| Missing .tool-versions or CI configs | Use grep to find ALL locations |
| Updating only package.json | Update CI/CD, Docker, version files |
| Not testing locally first | Install versions locally, run build |
| Skipping CI/CD verification | Push and verify pipelines pass |
Without systematic approach:
With systematic approach:
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.