Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

pnpm-version-bumper

БесплатноБез исполняемых скриптовНе проверен

Systematically bump package versions in pnpm monorepos by analyzing pnpm-lock.yaml, walking dependency trees, and finding the optimal parent package to…

babylonlabs-ioот babylonlabs-io★ 15 звёзд на GitHub12 установок в других каталогах

Об этом скилле

pnpm Version Bumper

Overview

Systematically resolve package version conflicts in pnpm monorepos by analyzing the lockfile, walking the dependency tree, and finding the optimal parent package to upgrade. When walking the tree doesn't work, suggest pnpm overrides as a last resort.

Quick Start

For a request like "Bump tmp to >=0.2.4":

  1. Check pnpm-lock.yaml for all installed versions (don't rely on pnpm why alone)
  2. Identify which versions don't meet the requirement
  3. Walk up the dependency tree from problem version to workspace package
  4. Find a parent package that can be upgraded to solve the problem
  5. Update package.json, run pnpm install, and verify

Core Workflow

Execute these steps in order, reporting progress at each step for transparency.

1. Install Dependencies and Identify Versions

Run pnpm install to ensure lockfile is up to date.

Use grep -n "<package>@" pnpm-lock.yaml to extract all installed versions from pnpm-lock.yaml. Do NOT rely on pnpm why alone as it can be misleading and may not show all versions.

Report to user: "Found X versions of in pnpm-lock.yaml: [list versions with line numbers]"

2. Identify Problem Versions

For each version found, check if it satisfies the requirement. Consider semver rules:

  • >=X.Y.Z: Version must be greater than or equal to X.Y.Z
  • ^X.Y.Z: Compatible with X.Y.Z (same major version for X>0, same minor for 0.Y.Z)
  • ~X.Y.Z: Approximately equivalent to X.Y.Z (same minor version)

For complex semver ranges, read references/semver-guide.md for detailed rules.

Report to user: "@ [meets/does not meet] requirement "

If all versions meet requirement, inform user and stop - no work needed.

3. Analyze Dependency Tree

For each problematic version, run pnpm why -r <package>@<version> to show the full dependency chain from workspace package down to the problem package.

Report to user: "Dependency chain for @:"

Show the full output from pnpm why, then summarize the chain: " → @ → @ → ... → @"

4. Walk Up the Tree

Starting from the direct parent of the problem package, examine each package in the chain to see if upgrading it would solve the problem.

For each parent package in the chain:

a. Check parent's current requirement:

  • Run npm view <parent-package>@<current-version> dependencies | grep <package>
  • Extract the semver range requirement
  • Report: "@ requires : "

b. Check if parent can be upgraded:

  • Find what the grandparent requires: npm view <grandparent>@<version> dependencies | grep <parent>
  • List available versions: npm view <parent-package> versions --json
  • Filter to versions within grandparent's allowed range
  • Identify the latest acceptable version
  • Report: "Latest version of within allowed range: "

c. Check if upgrading solves the problem:

  • Run npm view <parent-package>@<newer-version> dependencies
  • Check if it uses a different/newer version of the problem package
  • Verify the new version meets the requirement
  • Report: "@ uses @" (and state whether it meets requirement)

d. If solution found:

  • Report: "Solution found! Upgrading from to will resolve the issue."
  • Find which workspace package depends on this parent
  • Update that workspace package's package.json to require the new version
  • Run pnpm install
  • Proceed to verification (step 5)
  • Stop - problem solved

e. If no solution at this level:

  • Report: "No solution found by upgrading , checking next parent in chain..."
  • Continue to the next parent up the chain

5. Verify Resolution

After making changes, run these verification steps and report each result:

a. Run pnpm why -r <package>@<old-version> - should return empty

  • Report: "✓ @ no longer in dependency tree"

b. Run grep "<package>@<old-version>" pnpm-lock.yaml - should return empty

  • Report: "✓ @ not found in pnpm-lock.yaml"

c. Run grep "<package>@" pnpm-lock.yaml - confirm only acceptable versions remain

  • Report: "✓ Only @ remains (meets requirement )"

d. Run pnpm why -r <package> - show final dependency tree

  • Report: "Final dependency tree:" [show full output]

Final summary: "Successfully bumped by upgrading from to . All versions now meet requirement ."

Verification Failed? It's common that there will be other branch of the dependency tree still using the old version. If so, return to step 4 and continue walking up the tree to find another parent to upgrade.

6. Handle Edge C

Полный SKILL.md на GitHub

Установить pnpm-version-bumper в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/overrides-guide.mdreferences/semver-guide.md

FAQ

Что делает скилл pnpm-version-bumper?

Systematically bump package versions in pnpm monorepos by analyzing pnpm-lock.yaml, walking dependency trees, and finding the optimal parent package to upgrade. Use when the user asks to bump a package to meet a specific version requirement (e.g., "bump tmp to >=0.2.4", "upgrade package X to meet requirement Y", or "resolve version conflict for package Z"). Handles transitive dependencies and suggests overrides when needed.

Как установить скилл pnpm-version-bumper?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл pnpm-version-bumper запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить pnpm-version-bumper с