cuihua-dependency-updater 📦
Keep dependencies fresh, keep your app safe
AI-powered dependency management that updates packages intelligently:
- - 🔒 Security-first - Prioritize security patches
- 🛡️ Safe updates - Detect breaking changes before updating
- 🤖 Smart batching - Group compatible updates
- 📝 Auto changelog - Generate update summaries
- ⏮️ Easy rollback - Undo problematic updates
🎯 Why cuihua-dependency-updater?
The problem:
- - ❌
npm outdated shows 50+ packages to update - ❌ No idea which ones are safe to update
- ❌ Breaking changes break your app
- ❌ Security patches mixed with feature updates
- ❌ Manual updates take hours
cuihua-dependency-updater solves this.
🚀 Quick Start
Check for updates
"Check outdated dependencies"
Output:
CODEBLOCK0
Update by priority
"Update security vulnerabilities"
Generated:
CODEBLOCK1
Smart batch update
"Update all safe dependencies"
Automatically:
- 1. Groups compatible updates
- Tests each batch
- Rolls back if tests fail
- Generates changelog
🎨 Features
1. Intelligent Prioritization 🎯
Updates are categorized by risk and impact:
CODEBLOCK2
2. Breaking Change Detection 🔍
AI analyzes changelogs and API changes:
CODEBLOCK3
3. Security Scanning 🔒
Integrates with npm audit and vulnerability databases:
CODEBLOCK4
4. Automated Testing 🧪
Run tests after each update batch:
CODEBLOCK5
5. Changelog Generation 📝
Auto-generate human-readable update summaries:
CODEBLOCK6
📋 Usage Examples
Example 1: Security Audit
User: "Audit dependencies for security issues"
Agent:
CODEBLOCK7
Example 2: Major Version Update
User: "Can I safely update React to v18?"
Agent:
CODEBLOCK8
Example 3: Batch Update
User: "Update all safe dependencies"
Agent:
📦 Preparing batch update...
Grouped into 3 batches:
Batch 1 (Testing tools - 5 packages):
- jest: 29.5.0 → 29.7.0
- @testing-library/react: 14.0.0 → 14.1.2
- ...
Batch 2 (Build tools - 4 packages):
- vite: 5.0.0 → 5.0.10
- esbuild: 0.19.0 → 0.19.11
- ...
Batch 3 (Utils - 8 packages):
- date-fns: 2.30.0 → 3.0.6
- lodash: 4.17.19 → 4.17.21
- ...
Process:
1. Update Batch 1 → Run tests → ✅
2. Update Batch 2 → Run tests → ✅
3. Update Batch 3 → Run tests → ✅
✅ All updates successful!
📝 Changelog: UPDATES.md
⚙️ Configuration
Create .dependencyrc.json:
CODEBLOCK10
🔧 Update Strategies
Conservative (Default)
- - Security: Auto-update
- Patch: Auto-update
- Minor: Manual review
- Major: Manual review
Aggressive
- - Security: Auto-update
- Patch: Auto-update
- Minor: Auto-update
- Major: Manual review
Custom
Define your own rules per package:
CODEBLOCK11
💰 Pricing
Free
- - ✅ Dependency analysis
- ✅ Security scanning
- ✅ Up to 100 packages
Pro ($10/month)
- - ✅ Unlimited packages
- ✅ Automated updates
- ✅ CI/CD integration
- ✅ Custom strategies
Enterprise ($79/month)
- - ✅ Team policies
- ✅ Monorepo support
- ✅ Advanced rollback
- ✅ Compliance reports
📚 Resources
📜 License
MIT
🙏 Acknowledgments
Built with 🌸 by 翠花 (Cuihua)
Made with 🌸 | Cuihua Series | ClawHub Pioneer
Keep dependencies fresh, keep your app safe.
cuihua-dependency-updater 📦
保持依赖最新,守护应用安全
基于AI的依赖管理,智能更新包:
- - 🔒 安全优先 - 优先处理安全补丁
- 🛡️ 安全更新 - 更新前检测破坏性变更
- 🤖 智能分组 - 合并兼容性更新
- 📝 自动更新日志 - 生成更新摘要
- ⏮️ 轻松回滚 - 撤销有问题的更新
🎯 为什么选择cuihua-dependency-updater?
问题:
- - ❌ npm outdated 显示50+个包需要更新
- ❌ 不知道哪些可以安全更新
- ❌ 破坏性变更导致应用崩溃
- ❌ 安全补丁与功能更新混杂
- ❌ 手动更新耗时数小时
cuihua-dependency-updater 解决了这些问题。
🚀 快速开始
检查更新
检查过时的依赖
输出:
📦 依赖更新报告
━━━━━━━━━━━━━━━━━━━━━━━━
🔴 安全更新 (3个):
- lodash: 4.17.19 → 4.17.21 (CVE-2020-8203)
- minimist: 1.2.5 → 1.2.6 (CVE-2021-44906)
- axios: 0.21.1 → 1.6.0 (CVE-2023-45857)
🟡 破坏性变更 (2个):
- webpack: 4.46.0 → 5.89.0 (主版本)
- react: 17.0.2 → 18.2.0 (主版本)
🟢 安全更新 (12个):
- typescript: 4.9.5 → 5.3.3 (次版本)
- eslint: 8.50.0 → 8.56.0 (补丁)
...
💡 建议:优先更新安全补丁
按优先级更新
更新安全漏洞
生成命令:
bash
npm update lodash minimist axios
npm audit fix
智能批量更新
更新所有安全依赖
自动:
- 1. 分组兼容性更新
- 测试每组更新
- 测试失败则回滚
- 生成更新日志
🎨 功能特性
1. 智能优先级排序 🎯
按风险和影响分类更新:
javascript
{
security: [
{ package: lodash, severity: high, cve: CVE-2020-8203 }
],
breaking: [
{ package: webpack, from: 4.x, to: 5.x, impact: high }
],
safe: [
{ package: typescript, from: 4.9, to: 5.3, impact: low }
]
}
2. 破坏性变更检测 🔍
AI分析更新日志和API变更:
⚠️ 检测到 react@18 的破坏性变更:
- 1. ReactDOM.render → createRoot
影响:所有入口点需要更新
- 2. 自动批处理
影响:状态更新可能以不同方式批处理
- 3. 更严格的注水
影响:SSR应用可能崩溃
建议:单独安排主版本更新
预计工作量:2-4小时
3. 安全扫描 🔒
集成npm审计和漏洞数据库:
🔴 高危漏洞
━━━━━━━━━━━━━━━━━━━━━━━━━━━
包:lodash@4.17.19
CVE:CVE-2020-8203
严重程度:高
影响:原型污染
受影响路径:
- app → lodash (直接)
- webpack → lodash (间接)
修复版本:lodash@4.17.21
风险:低 (补丁版本)
🚀 可立即安全更新
4. 自动化测试 🧪
每次更新后运行测试:
javascript
async function safeUpdate(packages) {
// 备份当前状态
const backup = await saveState();
try {
// 更新包
await npm.update(packages);
// 运行测试
const testsPassed = await runTests();
if (!testsPassed) {
throw new Error(测试失败);
}
console.log(✅ 更新成功);
} catch (error) {
// 失败时回滚
await restore(backup);
console.log(⏮️ 已回滚,原因:, error.message);
}
}
5. 更新日志生成 📝
自动生成人类可读的更新摘要:
markdown
依赖更新 - 2026-03-24
安全修复 (3个)
- - lodash: 4.17.19 → 4.17.21
- 修复:原型污染漏洞
- CVE:CVE-2020-8203
- 修复:SSRF漏洞
- CVE:CVE-2023-45857
功能更新 (5个)
- - typescript: 4.9.5 → 5.3.3
- 新增:更好的类型推断
- 新增:装饰器支持
- - eslint: 8.50.0 → 8.56.0
- 修复:多个bug
- 新增:新规则
破坏性变更 (已推迟)
- - webpack: 4.46.0 → 5.89.0
- 原因:需要配置迁移
- 预计工作量:4小时
- 计划:下一个迭代
📋 使用示例
示例1:安全审计
用户:审计依赖的安全问题
代理:
🔍 安全审计报告
━━━━━━━━━━━━━━━━━━━━━━
总包数:1,234
漏洞数:8
🔴 严重 (1个)
- express-fileupload@1.1.7
CVE-2020-7699 (远程代码执行)
修复:更新到1.4.0
🟠 高 (3个)
- lodash@4.17.19 → 4.17.21
- minimist@1.2.5 → 1.2.6
- axios@0.21.1 → 1.6.0
🟡 中 (4个)
- qs@6.5.2 → 6.11.0
- ...
💡 操作:npm audit fix --force
风险:所有修复均为补丁/次版本
示例2:主版本更新
用户:我可以安全地将React更新到v18吗?
代理:
🔍 分析 React 17 → 18 迁移...
✅ 兼容性检查:
- react-dom:兼容
- react-router:需要更新到v6
- redux:兼容
- typescript:兼容
⚠️ 破坏性变更:
1. ReactDOM.render API已移除
受影响文件:2个 (src/index.js, src/test-utils.js)
2. 自动批处理变更
潜在影响:状态更新时机
3. 更严格的TypeScript类型
受影响文件:15个
📊 迁移复杂度:中等
预计时间:2-3小时
建议:在单独的PR中更新
🔧 迁移步骤:
1. 更新包
2. 替换ReactDOM.render
3. 修复TypeScript错误
4. 全面测试
需要我生成迁移指南吗?
示例3:批量更新
用户:更新所有安全依赖
代理:
📦 准备批量更新...
分为3组:
第1组 (测试工具 - 5个包):
- jest: 29.5.0 → 29.7.0
- @testing-library/react: 14.0.0 → 14.1.2
- ...
第2组 (构建工具 - 4个包):
- vite: 5.0.0 → 5.0.10
- esbuild: 0.19.0 → 0.19.11
- ...
第3组 (工具库 - 8个包):
- date-fns: 2.30.0 → 3.0.6
- lodash: 4.17.19 → 4.17.21
- ...
处理流程:
- 1. 更新第1组 → 运行测试 → ✅
- 更新第2组 → 运行测试 → ✅
- 更新第3组 → 运行测试 → ✅
✅