Install the skill above, then run this in your AI tool:
/dependency-upgrade <your description>
About
Master major dependency version upgrades, compatibility analysis, staged upgrade strategies, and comprehensive testing approaches.
Source
What gets added to your project
Preview every file this package writes on install before you run the command above.
Summary
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.
Skill instructions
Dependency Upgrade
Master major dependency version upgrades, compatibility analysis, staged upgrade strategies, and comprehensive testing approaches.
# 1. Identify current versions
npm list --depth=0
# 2. Check for breaking changes# Read CHANGELOG.md and MIGRATION.md# 3. Create upgrade planecho"Upgrade order:
1. TypeScript
2. React
3. React Router
4. Testing libraries
5. Build tools" > UPGRADE_PLAN.md
Phase 2: Incremental Updates
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...
Phase 3: Validation
javascript
// tests/compatibility.test.jsdescribe("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
});
});
Breaking Change Handling
Identifying Breaking Changes
bash
# Check the changelog directly
curl https://raw.githubusercontent.com/facebook/react/master/CHANGELOG.md
Codemod for Automated Fixes
bash
# Run jscodeshift with transform URL
npx jscodeshift -t <transform-url> <path>
# Example: Rename unsafe lifecycle methods
npx jscodeshift -t https://raw.githubusercontent.com/reactjs/react-codemod/master/transforms/rename-unsafe-lifecycles.js src/
# For TypeScript files
npx jscodeshift -t https://raw.githubusercontent.com/reactjs/react-codemod/master/transforms/rename-unsafe-lifecycles.js --parser=tsx src/
# Dry run to preview changes
npx jscodeshift -t https://raw.githubusercontent.com/reactjs/react-codemod/master/transforms/rename-unsafe-lifecycles.js --dry src/
Custom Migration Script
javascript
// migration-script.jsconst 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);
});
});
Testing Strategy
Unit Tests
javascript
// Ensure tests pass before and after upgrade
npm run test
// Update test utilities if needed
npm install @testing-library/react@latest
// 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"}
Add this badge to a GitHub README so readers can open the package page and install the same version.
[](https://www.aipm-registry.com/skills/wshobson/dependency-upgrade/1.0.0?utm_source=github&utm_medium=readme&utm_campaign=package_badge)
This imported publisher has not claimed its AIPM account. A connected account confirms account control, but it does not guarantee that a package is safe.
AI assistant context
What this skill is for
@wshobson/dependency-upgrade@1.0.0 is an AIPM skill package for All tools. Use it when a project needs the reusable AI behavior described as: 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.
Run aipm add @wshobson/dependency-upgrade@1.0.0 in a project that has AIPM initialized.
Supported tools
@wshobson/dependency-upgrade@1.0.0 supports All tools.
Before installing
AIPM skills can add files to your project. Review the package name, target, description, license, and publisher before installing. Use a clean branch when trying a new skill.