| name | update-deps |
| description | Safely update project dependencies with testing verification |
| user-invocable | true |
/update-deps - Dependency Updates
Safely update project dependencies.
Usage
/update-deps # Check and update all dependencies
/update-deps --minor # Only minor/patch updates
/update-deps --security # Security updates only
Process
1. Check Current Status
npm outdated
pnpm outdated
pip list --outdated
uv pip list --outdated
cargo outdated
go list -m -u all
2. Check for Security Issues
npm audit
pnpm audit
pip-audit
safety check
cargo audit
govulncheck ./...
3. Categorize Updates
| Category | Risk Level | Action |
|---|
| Security patches | Critical | Update immediately |
| Patch versions (x.x.X) | Low | Usually safe |
| Minor versions (x.X.0) | Medium | Review changelog |
| Major versions (X.0.0) | High | Check breaking changes |
4. Update Strategy
Safe Updates First
npm update
npm update lodash express
pip install --upgrade package==x.x.x
Minor Updates
npx npm-check-updates -u --target minor
npm install
pip install 'package>=1.0,<2.0'
Major Updates (Careful!)
npm info package changelog
npm install package@latest
npm test
5. Verify Updates
After each update batch:
npm test
npm run typecheck
npm run build
npm run dev
Update Report Template
## Dependency Update Report
**Date**: [Date]
**Updated By**: [Name]
### Security Updates (Critical)
| Package | From | To | CVE |
|---------|------|-----|-----|
| lodash | 4.17.19 | 4.17.21 | CVE-2021-23337 |
### Patch Updates (Low Risk)
| Package | From | To |
|---------|------|-----|
| express | 4.18.1 | 4.18.2 |
### Minor Updates (Medium Risk)
| Package | From | To | Notes |
|---------|------|-----|-------|
| react | 18.2.0 | 18.3.0 | New hooks |
### Major Updates (Review Required)
| Package | From | To | Breaking Changes |
|---------|------|-----|------------------|
| typescript | 4.9.5 | 5.3.0 | See migration guide |
### Skipped Updates
| Package | Current | Latest | Reason |
|---------|---------|--------|--------|
| webpack | 4.46.0 | 5.89.0 | Major refactor needed |
### Testing
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Build succeeds
- [ ] Manual smoke test
Handling Breaking Changes
Before Major Update
- Read the changelog/migration guide
- Check if project uses affected features
- Estimate effort to update
- Create a separate branch
Migration Process
## Migration: [Package] v[Old] → v[New]
### Breaking Changes That Affect Us
1. [Change 1] - Used in: [files]
2. [Change 2] - Used in: [files]
### Migration Steps
- [ ] Update package
- [ ] Fix [breaking change 1]
- [ ] Fix [breaking change 2]
- [ ] Update tests
- [ ] Update documentation
### Files Modified
- src/utils/helper.ts
- src/components/Button.tsx
Lock File Management
Keep lock files in sync:
rm -rf node_modules package-lock.json
npm install
pip freeze > requirements.txt
pip-compile requirements.in
Automated Updates
Consider automation tools:
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
groups:
development-dependencies:
dependency-type: "development"
production-dependencies:
dependency-type: "production"
Tips
- Update dependencies regularly (weekly/monthly)
- Don't let them get too far behind
- Pin exact versions in production
- Test thoroughly after updates
- Keep a changelog of dependency updates
- Consider using Renovate or Dependabot