Skip to content

hash-chandra/compatify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

20 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Compatify ๐Ÿ”

A Node.js CLI tool to detect dependency compatibility issues in your Node.js projects

npm version License: MIT Node.js Version Tests Coverage Security Production Ready

๐Ÿš€ Features

  • 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

๐Ÿ“ฆ Installation

Global Installation (Recommended)

npm install -g compatify

Local Installation

npm install --save-dev compatify

๐Ÿ› ๏ธ Usage

Check Current Directory

compatify check

Check Specific Project

compatify scan /path/to/project

Check Remote GitHub Repository (New!)

compatify remote https://github.com/owner/repo

Supports various GitHub URL formats:

  • https://github.com/owner/repo
  • https://github.com/owner/repo/tree/branch-name
  • https://github.com/owner/repo.git

Output as JSON

compatify check --json

Verbose Output

compatify check --verbose

๐Ÿ“Š Example Output

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

๐Ÿ”ง Configuration

Create a .compatifyrc.json file in your project root:

{
  "ignore": ["some-package"],
  "severity": {
    "deprecated": "warning",
    "peerDependency": "error"
  },
  "cache": true,
  "cacheTTL": 86400
}

๐Ÿค Contributing

Contributions are welcome! Here's how you can help:

  1. Report Bugs - Open an issue if you find a bug
  2. Suggest Features - Have an idea? Let us know!
  3. Submit Compatibility Rules - Know of a compatibility issue? Add it to our rules database
  4. Improve Documentation - Help make our docs better

Adding Compatibility Rules

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"
    }
  ]
}

๐Ÿ“ License

MIT ยฉ hash-chandra

๐Ÿ™ Acknowledgments

Built with:

๐Ÿ“ฎ Support

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors