A comprehensive, enterprise-grade module updater with advanced features including backup/restore, security audits, selective updates, and intelligent update strategies. Keep your projects up-to-date effortlessly with fine-grained control over the update process.
- π Smart Update Strategies - Patch, minor, or major update strategies
- π― Selective Updates - Update only specific modules or exclude certain ones
- πΎ Backup & Restore - Automatic backup of package-lock.json with restore capability
- π Security Audits - Built-in npm audit integration for vulnerability checks
- π Detailed Reports - Generate update reports in JSON or text format
- ποΈ Interactive Mode - Choose which modules to update individually
- βοΈ Configuration File - Project-specific settings via .updaterc.json
- π€ CI/CD Ready - Silent mode perfect for automated environments
- π§Ή Cache Management - Advanced cleanup options for node_modules and lock files
- π Dry Run Mode - See what would be updated without making changes
npm install update-modules@latestnpm install -g update-modules@latest{
"scripts": {
"update-modules": "update-modules"
}
}# Check and update all modules
update-modules
# Dry run - see what would be updated
update-modules --dry-run
# Interactive mode - choose modules individually
update-modules --interactive
# Silent mode for CI/CD
update-modules --ci# Only patch updates (1.0.0 β 1.0.1)
update-modules --strategy=patch
# Patch and minor updates (1.0.0 β 1.1.0)
update-modules --strategy=minor
# All updates including major (1.0.0 β 2.0.0) - default
update-modules --strategy=major# Update only specific modules
update-modules --only=express,lodash,moment
# Exclude specific modules
update-modules --exclude=react,vue,angular
# Update only development dependencies
update-modules --dev-only
# Update only production dependencies
update-modules --prod-only# Create backup of package-lock.json
update-modules --backup
# Restore from backup (interactive selection)
update-modules --restore
# List available backups
update-modules --list-backups# Run security vulnerability check
update-modules --security
# Run npm audit
update-modules --audit
# Combine with updates
update-modules --security --strategy=patch# Generate update report
update-modules --report
# Export report in specific format
update-modules --export=json
update-modules --export=txt
# Combine with dry run for planning
update-modules --dry-run --export=json# Clear both node_modules and package-lock.json
update-modules -clear
# Clear only node_modules
update-modules -clear node_modules
# Clear only package-lock.json
update-modules -clear package-lock.json# Combined operations
update-modules --strategy=minor --backup --interactive --report
# CI/CD pipeline
update-modules --ci --strategy=patch --export=json
# Development workflow
update-modules --dev-only --interactive --backupCreate a .updaterc.json file in your project root for custom settings:
{
"ignore": ["update-modules", "legacy-module"],
"autoUpdate": false,
"updateStrategy": "minor",
"clearBeforeUpdate": false,
"backupPackageLock": true,
"maxBackups": 10
}| Option | Type | Default | Description |
|---|---|---|---|
ignore |
Array | [] |
Modules to ignore during updates |
autoUpdate |
Boolean | false |
Skip confirmation prompts |
updateStrategy |
String | "major" |
Default update strategy (patch, minor, major) |
clearBeforeUpdate |
Boolean | false |
Clear cache before updating |
backupPackageLock |
Boolean | true |
Automatically backup package-lock.json |
maxBackups |
Number | 10 |
Maximum number of backups to keep |
update-modules [options]--help, -h- Show help message--debug- Enable debug mode with verbose output--dry-run- Show what would be updated without making changes--interactive- Interactive mode for selecting modules--ci- Silent mode for CI/CD environments
--strategy=patch- Only patch updates--strategy=minor- Patch and minor updates--strategy=major- All updates (default)
--only=module1,module2- Update only specified modules--exclude=module1,module2- Exclude specified modules from updates--dev-only- Update only devDependencies--prod-only- Update only dependencies
--backup- Create backup of package-lock.json--restore- Restore from backup interactively--list-backups- List all available backups
--security- Run security vulnerability check--audit- Run npm audit--report- Generate update report--export=format- Export report (json, txt)
-clear- Clear node_modules and package-lock.json-clear node_modules- Clear only node_modules-clear package-lock.json- Clear only package-lock.json
# 1. Check for updates with backup
update-modules --backup --dry-run --report
# 2. Update only patch versions interactively
update-modules --strategy=patch --interactive
# 3. Update dev dependencies only
update-modules --dev-only --strategy=minor# 1. Security audit before update
update-modules --security --audit
# 2. Safe production update
update-modules --strategy=patch --backup --ci
# 3. Generate deployment report
update-modules --dry-run --export=json# 1. List available backups
update-modules --list-backups
# 2. Restore from backup
update-modules --restore
# 3. Clear corrupted cache
update-modules -clear- β¨ Added intelligent update strategies (patch, minor, major)
- β¨ Implemented backup and restore functionality
- β¨ Added selective update options (--only, --exclude, --dev-only, --prod-only)
- β¨ Integrated security audit capabilities
- β¨ Added comprehensive reporting system
- β¨ Implemented interactive mode for granular control
- β¨ Added configuration file support (.updaterc.json)
- β¨ Enhanced CI/CD integration with silent mode
- β¨ Added dry-run mode for safe testing
- π Improved error handling and user feedback
- π Comprehensive documentation and examples
View previous changes from commits.
If you have any feedback, contribution, bug report or suggestion, please feel free to contact me@cihatksm.com.
Made with β€οΈ by cihatksm
This project was developed with assistance from GitHub Copilot AI