turbo-ncu
v0.1.2
Published
Fast npm-check-updates clone powered by Rust
Readme
turbo-ncu
Fast npm-check-updates clone powered by Rust. Check your npm dependencies for updates quickly and efficiently.
Features
- Lightning fast ⚡ - Built with Rust for maximum performance
- Multiple target versions - Support for
latest,minor,patch, and semver updates - Workspace support - Check dependencies across monorepo workspaces
- Flexible filtering - Include/exclude packages by pattern
- Global packages - Check globally installed packages
- JSON output - Easy integration with other tools
- Caching - Built-in caching for faster repeated checks
- Config file support - Save your preferences in a config file
Installation
npm install -g turbo-ncuOr use directly with npx:
npx turbo-ncuUsage
Basic Usage
Check for outdated dependencies in the current directory:
turbo-ncuUpdate Package.json
Automatically upgrade to latest versions:
turbo-ncu --upgradeTarget Specific Version Types
# Latest versions (default)
turbo-ncu --target latest
# Minor updates only
turbo-ncu --target minor
# Patch updates only
turbo-ncu --target patch
# Semver-compatible updates
turbo-ncu --target semverInclude Prerelease Versions
turbo-ncu --preFilter Dependencies
# Check only specific packages
turbo-ncu --filter "react*"
# Exclude specific packages
turbo-ncu --reject "typescript"
# Combine both
turbo-ncu --filter "next*" --reject "next-env"Select Dependency Types
# Check production dependencies only
turbo-ncu --dep prod
# Check multiple types
turbo-ncu --dep prod dev
# Available types: prod, dev, peer, optional
turbo-ncu --dep prod dev peer optionalWorkspace Support
# Check all packages in a monorepo
turbo-ncu --workspaces
# Check a specific workspace
turbo-ncu --workspace packages/core
# Include root package when checking workspaces
turbo-ncu --workspaces --rootGlobal Packages
turbo-ncu --globalPerformance Options
# Adjust concurrency (default: 24)
turbo-ncu --concurrency 10
# Set request timeout in ms (default: 30000)
turbo-ncu --timeout 60000
# Use custom cache file and TTL
turbo-ncu --cacheFile ./cache.json --cacheTtl 3600Output Formats
# Output as JSON
turbo-ncu --json
# Output full update details as JSON
turbo-ncu --jsonAllCustom Registry
turbo-ncu --registry https://custom-registry.example.comCustom Package File
turbo-ncu --packageFile ./custom-package.jsonError Handling
# Exit codes:
# 0 = always exit successfully
turbo-ncu --errorLevel 0
# 1 = exit with error if no updates found
turbo-ncu --errorLevel 1
# 2 = exit with error if updates are found (default)
turbo-ncu --errorLevel 2Configuration File
Create a .turbo-ncu.json config file in your project root:
{
"target": "minor",
"upgrade": false,
"concurrency": 24,
"cacheTtl": 3600,
"filter": "!(devDep|test)",
"reject": "webpack",
"dep": ["prod", "dev"]
}Then use it:
turbo-ncu --configFile .turbo-ncu.jsonCLI Options Reference
Options:
-V, --version output the version number
-u, --upgrade Overwrite package file with upgraded versions
-t, --target <target> Target version: latest, minor, patch, semver (default: "latest")
--filter <pattern> Include only matching package names
--reject <pattern> Exclude matching package names
--dep <types...> Dependency types: prod, dev, peer, optional (default: all)
--cacheFile <path> Path to cache file
--cacheTtl <seconds> Cache TTL in seconds (default: 600)
--concurrency <n> Number of concurrent requests (default: 24)
--registry <url> Custom npm registry URL
--pre Include prerelease versions
-w, --workspaces Check all workspaces
--workspace <name> Check a specific workspace
--root Include root package in workspace mode
-g, --global Check global packages
--json Output as JSON
--jsonAll Output full update details as JSON
--configFile <path> Path to config file
--timeout <ms> Request timeout in milliseconds (default: 30000)
--errorLevel <level> Error exit code behavior: 0, 1, or 2 (default: 2)
-p, --packageFile <path> Path to package.json file
-h, --help display help for commandExamples
Check for updates in a monorepo
turbo-ncu --workspaces --root --target minorCheck and upgrade only production dependencies
turbo-ncu --upgrade --dep prodCheck with custom concurrency and timeout
turbo-ncu --concurrency 8 --timeout 45000CI/CD Integration
# Check for updates and fail if any are found
turbo-ncu --errorLevel 2
# Check for updates but don't fail
turbo-ncu --errorLevel 0
# Output JSON for further processing
turbo-ncu --json > updates.jsonPerformance Tips
- Use
--concurrencyto control API request parallelism (default is 24) - Enable caching with
--cacheFileand--cacheTtlfor repeated checks - Use
--filterto limit checks to relevant packages - Adjust
--timeoutif you're behind a slow network
Development
See CONTRIBUTING.md for development setup, project structure, and contribution guidelines.
