An open API service indexing awesome lists of open source software.

https://github.com/hyperdrift-io/peer-dependency-checker

Smart dependency compatibility checker that prevents peer dependency conflicts before you upgrade. Stop breaking builds - check compatibility first!
https://github.com/hyperdrift-io/peer-dependency-checker

automation build-tools ci-cd cli-tool compatibility-checker dependencies dependency-management dev-experience developer-tools devtools hyperdrift javascript next-js nodejs npm package-manager peer-dependencies react typescript upgrade-helper

Last synced: 9 months ago
JSON representation

Smart dependency compatibility checker that prevents peer dependency conflicts before you upgrade. Stop breaking builds - check compatibility first!

Awesome Lists containing this project

README

          

# ๐Ÿ” 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:

```bash
# 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

```bash
# Global install (recommended)
npm install -g peer-dependency-checker

# Or use directly with npx
npx peer-dependency-checker scan
```

## ๐ŸŽฏ Usage

```bash
# 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
```bash
$ 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
```bash
$ 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 ` | 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`:

```json
{
"packageManager": "npm",
"riskTolerance": "medium",
"excludePackages": [],
"outputFormat": "colored"
}
```

๐Ÿ“– **[Configuration Guide โ†’](./docs/CONFIG.md)**

## ๐Ÿค Contributing

We welcome contributions!

```bash
git clone https://github.com/hyperdrift-io/peer-dependency-checker
cd peer-dependency-checker
npm install
npm test
```

## ๐Ÿ“„ License

MIT ยฉ [Hyperdrift](https://hyperdrift.io)

---

**Built with โค๏ธ by the hyperdrift team**