Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.
.claude/skills/microck-dependency-upgrade/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 384% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 44% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 69% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 115% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 116% | 0% |
Master major dependency version upgrades, compatibility analysis, staged upgrade strategies, and comprehensive testing approaches.
MAJOR.MINOR.PATCH (e.g., 2.3.1)
MAJOR: Breaking changes
MINOR: New features, backward compatible
PATCH: Bug fixes, backward compatible
^2.3.1 = >=2.3.1 <3.0.0 (minor updates)
~2.3.1 = >=2.3.1 <2.4.0 (patch updates)
2.3.1 = exact versionbash# npm npm outdated npm audit npm audit fix # yarn yarn outdated yarn audit # Check for major updates npx npm-check-updates npx npm-check-updates -u # Update package.json
bash# See why a package is installed npm ls package-name yarn why package-name # Find duplicate packages npm dedupe yarn dedupe # Visualize dependencies npx madge --image graph.png src/
javascript// compatibility-matrix.js const compatibilityMatrix = { 'react': { '16.x': { 'react-dom': '^16.0.0', 'react-router-dom': '^5.0.0', '@testing-library/react': '^11.0.0' }, '17.x': { 'react-dom': '^17.0.0', 'react-router-dom': '^5.0.0 || ^6.0.0', '@testing-library/react': '^12.0.0' }, '18.x': { 'react-dom': '^18.0.0', 'react-router-dom': '^6.0.0', '@testing-library/react': '^13.0.0' } } }; function checkCompatibility(packages) { // Validate package versions against matrix }
bash# 1. Identify current versions npm list --depth=0 # 2. Check for breaking changes # Read CHANGELOG.md and MIGRATION.md # 3. Create upgrade plan echo "Upgrade order: 1. TypeScript 2. React 3. React Router 4. Testing libraries 5. Build tools" > UPGRADE_PLAN.md
bash# Don't upgrade everything at once! # Step 1: Update TypeScript npm install typescript@latest # Test npm run test npm run build # Step 2: Update React (one major version at a time) npm install react@17 react-dom@17 # Test again npm run test # Step 3: Continue with other packages npm install react-router-dom@6 # And so on...
javascript// tests/compatibility.test.js describe('Dependency Compatibility', () => { it('should have compatible React versions', () => { const reactVersion = require('react/package.json').version; const reactDomVersion = require('react-dom/package.json').version; expect(reactVersion).toBe(reactDomVersion); }); it('should not have peer dependency warnings', () => { // Run npm ls and check for warnings }); });
bash# Use changelog parsers npx changelog-parser react 16.0.0 17.0.0 # Or manually check curl https://raw.githubusercontent.com/facebook/react/main/CHANGELOG.md
bash# React upgrade codemods npx react-codeshift <transform> <path> # Example: Update lifecycle methods npx react-codeshift \ --parser tsx \ --transform react-codeshift/transforms/rename-unsafe-lifecycles.js \ src/
javascript// migration-script.js const fs = require('fs'); const glob = require('glob'); glob('src/**/*.tsx', (err, files) => { files.forEach(file => { let content = fs.readFileSync(file, 'utf8'); // Replace old API with new API content = content.replace( /componentWillMount/g, 'UNSAFE_componentWillMount' ); // Update imports content = content.replace( /import { Component } from 'react'/g, "import React, { Component } from 'react'" ); fs.writeFileSync(file, content); }); });
javascript// Ensure tests pass before and after upgrade npm run test // Update test utilities if needed npm install @testing-library/react@latest
javascript// tests/integration/app.test.js describe('App Integration', () => { it('should render without crashing', () => { render(<App />); }); it('should handle navigation', () => { const { getByText } = render(<App />); fireEvent.click(getByText('Navigate')); expect(screen.getByText('New Page')).toBeInTheDocument(); }); });
javascript// visual-regression.test.js describe('Visual Regression', () => { it('should match snapshot', () => { const { container } = render(<App />); expect(container.firstChild).toMatchSnapshot(); }); });
javascript// cypress/e2e/app.cy.js describe('E2E Tests', () => { it('should complete user flow', () => { cy.visit('/'); cy.get('[data-testid="login"]').click(); cy.get('input[name="email"]').type('user@example.com'); cy.get('button[type="submit"]').click(); cy.url().should('include', '/dashboard'); }); });
json// renovate.json { "extends": ["config:base"], "packageRules": [ { "matchUpdateTypes": ["minor", "patch"], "automerge": true }, { "matchUpdateTypes": ["major"], "automerge": false, "labels": ["major-update"] } ], "schedule": ["before 3am on Monday"], "timezone": "America/New_York" }
yaml# .github/dependabot.yml version: 2 updates: - package-ecosystem: "npm" directory: "/" schedule: interval: "weekly" open-pull-requests-limit: 5 reviewers: - "team-leads" commit-message: prefix: "chore" include: "scope"
javascript// rollback.sh #!/bin/bash # Save current state git stash git checkout -b upgrade-branch # Attempt upgrade npm install package@latest # Run tests if npm run test; then echo "Upgrade successful" git add package.json package-lock.json git commit -m "chore: upgrade package" else echo "Upgrade failed, rolling back" git checkout main git branch -D upgrade-branch npm install # Restore from package-lock.json fi
bash# npm npm install --package-lock-only # Update lock file only npm ci # Clean install from lock file # yarn yarn install --frozen-lockfile # CI mode yarn upgrade-interactive # Interactive upgrades
bash# npm 7+: strict peer dependencies npm install --legacy-peer-deps # Ignore peer deps # npm 8+: override peer dependencies npm install --force
bash# Update all workspace packages npm install --workspaces # Update specific workspace npm install package@latest --workspace=packages/app
markdownPre-Upgrade: - [ ] Review current dependency versions - [ ] Read changelogs for breaking changes - [ ] Create feature branch - [ ] Backup current state (git tag) - [ ] Run full test suite (baseline) During Upgrade: - [ ] Upgrade one dependency at a time - [ ] Update peer dependencies - [ ] Fix TypeScript errors - [ ] Update tests if needed - [ ] Run test suite after each upgrade - [ ] Check bundle size impact Post-Upgrade: - [ ] Full regression testing - [ ] Performance testing - [ ] Update documentation - [ ] Deploy to staging - [ ] Monitor for errors - [ ] Deploy to production
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 38,373 | 18,257 | -52% | 1 | 1 | 0% | 1,152 | 5,577 | +384% | 0 | 0 | — |
case-02 | fail→fail | 15,031 | 13,300 | -12% | 1 | 1 | 0% | 2,587 | 4,748 | +84% | 0 | 0 | — |
case-03 | pass→pass | 8,440 | 7,027 | -17% | 1 | 1 | 0% | 1,802 | 3,868 | +115% | 0 | 0 | — |
case-04 | pass→pass | 8,829 | 6,202 | -30% | 1 | 1 | 0% | 1,571 | 3,396 | +116% | 0 | 0 | — |
case-05 | fail→fail | 17,012 | 16,972 | -0% | 1 | 1 | 0% | 3,069 | 5,621 | +83% | 0 | 0 | — |
case-06 | fail→fail | 9,587 | 9,034 | -6% | 1 | 1 | 0% | 1,693 | 4,294 | +154% | 0 | 0 | — |
case-11 | fail→pass | 13,827 | 6,942 | -50% | 1 | 1 | 0% | 2,656 | 3,819 | +44% | 0 | 0 | — |
case-07 | pass→pass | 5,117 | 5,984 | +17% | 1 | 1 | 0% | 917 | 3,468 | +278% | 0 | 0 | — |
case-08 | pass→pass | 5,734 | 5,466 | -5% | 1 | 1 | 0% | 1,118 | 3,492 | +212% | 0 | 0 | — |
case-09 | pass→pass | 7,012 | 5,144 | -27% | 1 | 1 | 0% | 1,320 | 3,343 | +153% | 0 | 0 | — |
case-10 | pass→pass | 5,286 | 4,051 | -23% | 1 | 1 | 0% | 992 | 3,185 | +221% | 0 | 0 | — |
case-12 | pass→pass | 16,210 | 3,581 | -78% | 1 | 1 | 0% | 2,959 | 3,106 | +5% | 0 | 0 | — |
case-13 | fail→pass | 18,038 | 13,623 | -24% | 1 | 1 | 0% | 2,874 | 4,852 | +69% | 0 | 0 | — |
case-14 | pass→pass | 11,734 | 7,616 | -35% | 1 | 1 | 0% | 2,471 | 3,817 | +54% | 0 | 0 | — |
case-15 | fail→fail | 21,265 | 17,719 | -17% | 1 | 1 | 0% | 4,120 | 5,956 | +45% | 0 | 0 | — |
case-16 | pass→pass | 7,643 | 6,821 | -11% | 1 | 1 | 0% | 1,352 | 3,644 | +170% | 0 | 0 | — |
case-17 | pass→pass | 9,248 | 4,313 | -53% | 1 | 1 | 0% | 1,629 | 3,134 | +92% | 0 | 0 | — |
case-18 | pass→pass | 12,559 | 6,889 | -45% | 1 | 1 | 0% | 1,955 | 3,601 | +84% | 0 | 0 | — |
case-19 | pass→pass | 11,510 | 8,670 | -25% | 1 | 1 | 0% | 2,236 | 4,158 | +86% | 0 | 0 | — |
case-20 | pass→pass | 9,422 | 7,042 | -25% | 1 | 1 | 0% | 1,772 | 3,764 | +112% | 0 | 0 | — |
case-21 | pass→pass | 9,452 | 6,909 | -27% | 1 | 1 | 0% | 1,878 | 3,905 | +108% | 0 | 0 | — |
case-22 | pass→pass | 13,324 | 9,161 | -31% | 1 | 1 | 0% | 2,876 | 4,463 | +55% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +14 percentage points is the difference between those two pass rates over the 21 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.