A Node.js CLI tool to detect dependency compatibility issues in your Node.js projects
- Peer Dependency Conflict Detection - Identifies mismatches between peer dependencies across your dependency tree
- Node.js Engine Compatibility - Validates that all dependencies are compatible with your Node.js version
- Known Incompatibility Detection - Checks against a curated database of known incompatible package combinations
- ESM/CommonJS Conflict Detection - Identifies potential issues with mixed module systems
- Deprecated Package Warnings - Alerts you to deprecated packages in your dependency tree
- Clear, Actionable Reports - Provides detailed reports with severity levels and suggested fixes
- Multiple Output Formats - Supports human-readable table output and JSON for CI/CD integration
npm install -g compatifynpm install --save-dev compatifycompatify checkcompatify scan /path/to/projectcompatify remote https://github.com/owner/repoSupports various GitHub URL formats:
https://github.com/owner/repohttps://github.com/owner/repo/tree/branch-namehttps://github.com/owner/repo.git
compatify check --jsoncompatify check --verbose๐ Analyzing dependencies in: /Users/dev/my-project
โ Found 3 compatibility issues:
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Package โ Severityโ Issue โ
โโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ react / react-domโ error โ [email protected] requires react-dom@^18.0.0 โ
โ โ โ but found [email protected] โ
โโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ typescript โ warning โ Node.js 14.x is deprecated, upgrade to โ
โ โ โ Node.js 18+ for TypeScript 5.0+ โ
โโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ node-sass โ warning โ node-sass is deprecated, use 'sass' โ
โโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ก Suggested fixes:
โข npm install react-dom@^18.0.0
โข npm install sass && npm uninstall node-sass
Create a .compatifyrc.json file in your project root:
{
"ignore": ["some-package"],
"severity": {
"deprecated": "warning",
"peerDependency": "error"
},
"cache": true,
"cacheTTL": 86400
}Contributions are welcome! Here's how you can help:
- Report Bugs - Open an issue if you find a bug
- Suggest Features - Have an idea? Let us know!
- Submit Compatibility Rules - Know of a compatibility issue? Add it to our rules database
- Improve Documentation - Help make our docs better
To contribute a new compatibility rule, add it to data/rules.json:
{
"package": "react",
"version": "^18.0.0",
"incompatibleWith": [
{
"package": "react-dom",
"versionRange": "<18.0.0",
"reason": "React 18 requires react-dom 18+",
"severity": "error"
}
]
}MIT ยฉ hash-chandra
Built with:
- Commander.js - CLI framework
- semver - Semantic versioning
- pacote - npm package fetcher
- chalk - Terminal styling
- ๐ Report a bug
- ๐ฌ Ask a question
- โญ Star this project on GitHub!