🎯

ln-711-npm-upgrader

🎯Skill

from levnikolaevich/claude-code-skills

VibeIndex|
What it does

Automatically upgrades Node.js project dependencies using npm, yarn, or pnpm, with intelligent breaking change detection and migration support.

πŸ“¦

Part of

levnikolaevich/claude-code-skills(85 items)

ln-711-npm-upgrader

Installation

npm installInstall npm package
npm install --legacy-peer-deps
npm installInstall npm package
npm install --force
npxRun with npx
npx tsc --noEmit
npm runRun npm script
npm run build
πŸ“– Extracted from docs: levnikolaevich/claude-code-skills
12Installs
-
AddedFeb 4, 2026

Skill Details

SKILL.md

Upgrades npm/yarn/pnpm dependencies with breaking change handling

Overview

# ln-711-npm-upgrader

Type: L3 Worker

Category: 7XX Project Bootstrap

Parent: ln-710-dependency-upgrader

Upgrades Node.js dependencies using npm, yarn, or pnpm with automatic breaking change detection and migration.

---

Overview

| Aspect | Details |

|--------|---------|

| Input | Project path, package manager type |

| Output | Updated package.json, lock file, migration report |

| Supports | npm, yarn (classic & berry), pnpm |

---

Workflow

See [diagram.html](diagram.html) for visual workflow.

Phases: Pre-flight β†’ Analyze β†’ Security Audit β†’ Check Outdated β†’ Identify Breaking β†’ Apply Upgrades β†’ Apply Migrations β†’ Verify Build β†’ Report

---

Phase 0: Pre-flight Checks

| Check | Required | Action if Missing |

|-------|----------|-------------------|

| Lock file (package-lock.json, yarn.lock, pnpm-lock.yaml) | Yes | Warn and run npm install first |

| package.json | Yes | Block upgrade |

> Workers assume coordinator (ln-710) already verified git state and created backup.

---

Phase 1: Analyze Dependencies

Read package.json and categorize dependencies for upgrade priority.

Dependency Categories

| Category | Examples | Priority |

|----------|----------|----------|

| framework | react, vue, angular | 2 (after peer deps) |

| build | vite, webpack, esbuild | 3 |

| ui | @radix-ui/*, tailwindcss | 4 |

| state | @tanstack/react-query, zustand | 5 |

| utils | lodash, date-fns | 6 |

| dev | eslint, prettier, typescript | 7 |

| peer | @types/*, typescript | 1 (first) |

---

Phase 2: Security Audit

Commands

| Manager | Command |

|---------|---------|

| npm | npm audit --audit-level=high |

| yarn | yarn audit --level high |

| pnpm | pnpm audit --audit-level high |

Actions

| Severity | Action |

|----------|--------|

| Critical | Block upgrade, report |

| High | Warn, continue |

| Moderate/Low | Log only |

---

Phase 3: Check Outdated

Commands

| Manager | Command |

|---------|---------|

| npm | npm outdated --json |

| yarn | yarn outdated --json |

| pnpm | pnpm outdated --json |

---

Phase 4: Identify Breaking Changes

Detection

  1. Compare current vs latest major versions
  2. Check [breaking_changes_patterns.md](../ln-710-dependency-upgrader/references/breaking_changes_patterns.md)
  3. Query Context7/Ref for migration guides

Common Breaking Changes

> See [breaking_changes_patterns.md](../ln-710-dependency-upgrader/references/breaking_changes_patterns.md) for full patterns.

| Package | Breaking Version | Key Changes |

|---------|------------------|-------------|

| react | 18 β†’ 19 | JSX Transform, ref as prop |

| vite | 5 β†’ 6 | ESM only, Node 18+ |

| eslint | 8 β†’ 9 | Flat config required |

| tailwindcss | 3 β†’ 4 | CSS-based config |

| typescript | 5.4 β†’ 5.5+ | Stricter inference |

---

Phase 5: Apply Upgrades

Upgrade Order

  1. Peer dependencies (TypeScript, @types/*)
  2. Framework packages (React, Vue core)
  3. Build tools (Vite, webpack)
  4. UI libraries (after framework)
  5. Utilities (lodash, date-fns)
  6. Dev dependencies (testing, linting)

Commands

| Manager | Command |

|---------|---------|

| npm | npm install @latest --save |

| yarn | yarn add @latest |

| pnpm | pnpm add @latest |

Peer Dependency Conflicts

| Situation | Solution |

|-----------|----------|

| ERESOLVE error | npm install --legacy-peer-deps |

| Still fails | npm install --force (last resort) |

---

MCP Tools for Migration Search

Priority Order (Fallback Strategy)

| Priority | Tool | When to Use |

|----------|------|-------------|

| 1 | mcp__context7__query-docs | First choice for library docs |

| 2 | mcp__Ref__ref_search_documentation | Official docs and GitHub |

| 3 | WebSearch | Latest info, community solutions |

Context7 Usage

| Step | Tool | Parameters |

|------|------|------------|

| 1. Find library | mcp__context7__resolve-library-id | libraryName: "react", query: "migration guide" |

| 2. Query docs | mcp__context7__query-docs | libraryId: "/facebook/react", query: "react 18 to 19 migration" |

MCP Ref Usage

| Action | Tool | Query Example |

|--------|------|---------------|

| Search | mcp__Ref__ref_search_documentation | "react 19 migration guide breaking changes" |

| Read | mcp__Ref__ref_read_url | URL from search results |

WebSearch Fallback

Use when Context7/Ref return no results:

  • " breaking changes migration 2025"
  • " fix stackoverflow"

---

Phase 6: Apply Migrations

Process

  1. Use MCP tools (see section above) to find migration guide
  2. Apply automated code transforms via Edit tool
  3. Log manual migration steps for user

> Do NOT apply hardcoded migrations. Always fetch current guides via MCP tools.

---

Phase 7: Verify Build

Commands

| Check | Command |

|-------|---------|

| TypeScript | npm run check or npx tsc --noEmit |

| Build | npm run build |

| Tests | npm test (if available) |

On Failure

  1. Identify failing package from error
  2. Search Context7/Ref for fix
  3. If unresolved: rollback package, continue with others

---

Phase 8: Report Results

Report Schema

| Field | Description |

|-------|-------------|

| project | Project path |

| packageManager | npm, yarn, or pnpm |

| duration | Total time |

| upgrades.major[] | Breaking changes applied |

| upgrades.minor[] | Feature updates |

| upgrades.patch[] | Bug fixes |

| migrations[] | Applied migrations |

| skipped[] | Already latest |

| buildVerification | PASSED or FAILED |

| warnings[] | Non-blocking issues |

---

Configuration

```yaml

Options:

# Upgrade scope

upgradeType: major # major | minor | patch

# Breaking changes

allowBreaking: true

autoMigrate: true

queryMigrationGuides: true # Use Context7/Ref

# Security

auditLevel: high # none | low | moderate | high | critical

minimumReleaseAge: 14 # days

# Peer dependencies

legacyPeerDeps: false

force: false

# Verification

runBuild: true

runTests: false

runTypeCheck: true

# Rollback

createBackup: true

rollbackOnFailure: true

```

---

Error Handling

| Error | Cause | Solution |

|-------|-------|----------|

| ERESOLVE | Peer dep conflict | --legacy-peer-deps |

| ENOENT | Missing lock file | npm install first |

| Build fail | Breaking change | Apply migration via Context7 |

| Type errors | Version mismatch | Update @types/* |

Rollback

Restore package.json and lock file from git, then run clean install to restore previous state.

---

References

  • [breaking_changes_patterns.md](../ln-710-dependency-upgrader/references/breaking_changes_patterns.md)
  • [npm_peer_resolution.md](references/npm_peer_resolution.md)

---

Version: 1.1.0

Last Updated: 2026-01-10

More from this repository10

πŸͺ
levnikolaevich-claude-code-skillsπŸͺMarketplace

Official marketplace for Agile Linear Workflow plugin - complete end-to-end automation for software development teams using Linear. Includes 7XX Project Bootstrap series for technology-agnostic project migration.

🎯
ln-140-test-docs-creator🎯Skill

Generates comprehensive test documentation with testing strategy and test organization structure for software projects.

🎯
ln-110-project-docs-coordinator🎯Skill

Coordinates project documentation by gathering context once, detecting project type, and delegating document creation to 5 specialized workers.

🎯
ln-114-frontend-docs-creator🎯Skill

Generates design guidelines documentation for frontend projects with WCAG 2.1 compliance when a frontend framework is detected.

🎯
ln-113-backend-docs-creator🎯Skill

Generates backend documentation files (API spec and database schema) automatically when backend or database technologies are detected in a project.

🎯
ln-610-code-comments-auditor🎯Skill

Audits code comments and docstrings across 6 quality categories, generating a comprehensive compliance score and actionable recommendations for improvement.

🎯
ln-115-devops-docs-creator🎯Skill

Generates a comprehensive runbook.md for DevOps setup, dynamically tailored to project's Docker configuration and deployment specifics.

🎯
ln-772-error-handler-setup🎯Skill

Configures global exception handling middleware for .NET and Python backend applications with standardized error responses.

🎯
ln-120-reference-docs-creator🎯Skill

Generates reference documentation structure and smart documents for project tech stack, creating only justified architectural decision records and guides.

🎯
ln-625-dependencies-auditor🎯Skill

Audits dependencies for outdated packages, unused imports, unnecessary libraries, and custom implementations, providing actionable recommendations.