dependencies-upgrade

Guides safe package version upgrades using peer ranges, build-first checks, and linter rule handling.

1|Updated Jan 14, 2024
One-click install
npx skills add https://github.com/Eyhenij/rt-tools --skill dependencies-upgrade-eyhenij
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dependencies-upgrade
Source: https://github.com/Eyhenij/rt-tools/tree/main/.claude/skills/dependencies-upgrade
Command: npx skills add https://github.com/Eyhenij/rt-tools --skill dependencies-upgrade-eyhenij

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Upgrading npm packages often breaks builds silently: peer dependency conflicts slip through installs, formatter updates reformat hundreds of files, and new linter rules flood the tree with findings. This Skill provides a disciplined procedure for raising dependency versions without losing the real cause of failures. ## Core Features & Use Cases - Peer-range upper bound selection: Raise a package to the last version within every dependent's peer range, verified with npm view commands rather than guessing from the registry. - Ordered verification pipeline: Exact versions in package.json, install with lockfile in the same commit, CSS custom property checks against installed package sources, build before linters, then tests and browser verification. - Reformatting and linter rule policy: Decide which reformatted files to keep based on linter coverage, and handle new linter rules via documented config switches or targeted eslint-disable-next-line comments. - Use Case: After a Dependabot alert on a transitive dependency, follow the pattern to pick the correct upper bound, verify removed styling properties with grep, and land the update in its own branch and commit. ## Quick Start Ask the assistant to apply the dependencies-upgrade pattern to raise a specific package version and verify the build, linters, and tests in the correct order.

Frequently Asked Questions about dependencies-upgrade

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

FAQPage Schema
How do I choose the right version when upgrading an npm package?

Choose the last version that still falls within the peer dependency ranges of every package that depends on it, not the latest in the registry. Check with `npm view <package>@<version> peerDependencies` package by package, since auto-installed peers can hide conflicts.

How to upgrade dependencies in an Nx monorepo without breaking the build?

Pin exact versions in package.json, run the install with the lockfile in the same commit, then run the Nx build before linters. The build reports type incompatibilities in one line, while linters produce hundreds of findings that hide the real cause.

Why does pnpm install not update a package listed in overrides?

A package named in the overrides field stays pinned to the version in that list, so pnpm install completes without errors but never moves it. You must update the overrides entry explicitly to raise the version.

Should I run linters or the build first after a dependency upgrade?

Run the build first. A type incompatibility surfaces as a single build error, whereas the linter on the same tree reports a hundred findings and the actual cause gets lost among them.

How do I handle new linter rules after upgrading ESLint or Stylelint?

Switch off rules that forbid accepted techniques once in the config with a written reason, and use targeted eslint-disable-next-line comments with reasons for rules that are right in substance. Never mix the two approaches without documentation.

What should I do when a formatter upgrade reformats the whole repository?

Keep only the reformatting of files the linter actually checks, such as .ts and .html under eslint.config.mjs or .scss under stylelint.config.js. Reformat the rest later alongside edits that touch those files anyway, so meaningful changes stay reviewable.