๐ peer-dependency-checker
*Smart dependency compatibility checking before you upgrade*
๐ peer-dependency-checker
Smart dependency compatibility checking before you upgrade
Stop breaking your builds. Check compatibility first.
๐ Quick Setup
Add peer dependency checking to any project in one command:
# One command setup - works with npm, yarn, pnpm, or bun
npx peer-dependency-checker setup
# Or install globally first
npm install -g peer-dependency-checker
pdc setup
What this does:
- โ Detects your package manager automatically
- โ
Adds pre/post-install hooks to your
package.json - โ Sets up automatic checking on installs
- โ Works immediately with zero configuration
โก Installation
# Global install (recommended)
npm install -g peer-dependency-checker
# Or use directly with npx
npx peer-dependency-checker scan
๐ฏ Usage
# Analyze your project for upgrade opportunities
pdc scan
# Quick scan with minimal output
pdc scan --quick
# Check specific packages before upgrading
pdc check react@19 react-dom@19
# Deep peer dependency analysis
pdc analyze
# Pre-installation compatibility check
pdc precheck
๐ Examples
Project Health Check
$ pdc scan
๐ Scanning your project...
๐ฆ Project: my-app
๐ง Package Manager: npm
๐ Dependencies: 15 production, 8 development
๐ OUTDATED PACKAGES
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
react: 18.3.1 โ 19.1.0
@types/node: 22.15.21 โ 24.0.3
๐ PEER DEPENDENCY STATUS
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
No peer dependency warnings detected
๐ก RECOMMENDATIONS
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
All packages are up to date!
Test Specific Upgrades
$ pdc check react@19 react-dom@19
๐งช Testing 2 package(s)...
โ
react@19
โโโ No peer dependencies required
โ
react-dom@19
โโโ Peer deps: { react: '^19.1.0' }
๐ ๏ธ Commands
| Command | Description |
|---------|-------------|
| pdc scan | Analyze current project for upgrade opportunities |
| pdc scan --quick | Quick scan with minimal output |
| pdc check <packages> | Test specific package upgrades |
| pdc analyze | Deep peer dependency analysis |
| pdc analyze --brief | Brief analysis with key findings |
| pdc precheck | Pre-installation compatibility check |
| pdc setup | One-command setup for external projects |
๐ง Configuration
Works out-of-the-box with smart defaults. For custom settings, create .pdcrc.json:
{
"packageManager": "npm",
"riskTolerance": "medium",
"excludePackages": [],
"outputFormat": "colored"
}
๐ค Contributing
We welcome contributions!
git clone https://github.com/hyperdrift-io/peer-dependency-checker
cd peer-dependency-checker
npm install
npm test
๐ License
MIT ยฉ Hyperdrift
Built with โค๏ธ by the hyperdrift team