A circular dependency detection tool for Deno projects
- 🔍 Detects circular dependencies in your Deno module graph
- 🚀 Fast analysis using
deno infounder the hood - ⚡ Can be used in CI/CD pipelines and pre-commit hooks
This tool is designed for terminal use.
deno run -A jsr:@cunarist/deno-circular-deps somefile.tsThe process exits with code 0 on success, and 1 on failure. This means you can easily use this in CI such as GitHub Actions.
✅ No circular dependencies:
📦 2 modules
📁 2 local modules
✅ No circular dependencies found
❌ Circular dependencies found:
📦 2 modules
📁 2 local modules
🚨 1 circular dependencies detected
■ ./examples/mod-b.ts ▶ ./examples/mod-d.ts ▶ ./examples/mod-b.ts
- Analysis: Uses
deno info --jsonto get the complete module dependency graph - Detection: Implements a depth-first search algorithm to detect cycles
- Reporting: Provides clear, actionable feedback about circular dependencies
- Integration: Exits with error code 1 if circular dependencies are found, making it perfect for CI/CD
MIT