dependency-cruiser VS madge

Compare dependency-cruiser vs madge and see what are their differences.

madge

Create graphs from your CommonJS, AMD or ES6 module dependencies (by pahen)
Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
dependency-cruiser madge
8 8
4,955 8,515
- -
9.3 6.3
14 days ago 11 days ago
JavaScript JavaScript
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

dependency-cruiser

Posts with mentions or reviews of dependency-cruiser. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-09-25.
  • Taking Frontend Architecture Serious with dependency-cruiser
    2 projects | dev.to | 25 Sep 2023
    With dependency-cruiser, you can enforce which imports are allowed. This enables you to create an architecture fitness function that ensures your code continues to adhere to the initial design. You can also visualize your dependencies to gain a clearer understanding of your code's actual structure, allowing you to compare it with your mental model and make improvements where necessary.
  • Visualisation tool
    3 projects | /r/reactjs | 28 Jun 2023
    something like https://github.com/sverweij/dependency-cruiser maybe https://github.com/pahen/madge or https://github.com/antoine-coulon/skott
  • [AskJS] What ESLint rules do you use to achieve better isolation of components?
    3 projects | /r/javascript | 7 Feb 2023
    I've personally fallen in love with Dependency Cruiser, which lets you set any arbitrary import rules you want on your repository. With it, you can enforce common things, like, "You can only import through the index file, if one exists", but you can also make custom-tailored rules for your specific project. For example, maybe your project is divided into three large folders - folder1 is allowed to import from folder2 and folder3, folder2 can import from folder3, and folder3 can not import from anyone else. Well, you can enforce that too, or whatever you need.
  • Best Practices for TypeScript Monorepo
    11 projects | news.ycombinator.com | 25 Aug 2022
    Dependency Cruiser works great, can even render visuals:

    https://github.com/sverweij/dependency-cruiser

    NX[0] also has logic for handling this issue

    [0]: https://nx.dev/

  • how to automatically run a script / yarn command before each dev hot-reload build
    1 project | /r/nextjs | 2 Jul 2022
    I have a dependency-cruiser script that enforces codebase import rules, which I want checked on each dev hot-reload build and prod build.
  • Deprank: Use PageRank to find the most important files in your codebase
    3 projects | news.ycombinator.com | 1 Jul 2022
    Great project!

    One feature request: Running the npx command searched only for the js files, not for the ts files. When I built deprank locally with yarn, it also showed the ts files. After looking at dependency-cruiser figure it has to do with what typescript compilers are available where.

    It would be great if the npx command you provide in your readme would work regardless of my local setup - dependency-cruiser has documentation and one example of a suitable npx command here: https://github.com/sverweij/dependency-cruiser/blob/develop/...

    My suggestion would be to check if any ts file is part of the extension option (i.e. --ext=".js,.jsx, .ts, .tsx") and only then do the magic needed to also show ts files.

  • How We Migrated from Javascript and Flow to TypeScript at Osome
    4 projects | dev.to | 23 Apr 2022
    The first step is to install dependency-cruiser.
  • Is it possible to generate a flow diagram from Javascript code?
    3 projects | /r/vscode | 6 Sep 2021
    You may have a look at dependency cruiser.

madge

Posts with mentions or reviews of madge. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-06-28.

What are some alternatives?

When comparing dependency-cruiser and madge you can also consider the following projects:

emerge - Emerge is a browser-based interactive codebase and dependency visualization tool for many different programming languages. It supports some basic code quality and graph metrics and provides a simple and intuitive way to explore and analyze a codebase by using graph structures.

vue-component-analyzer - Analyze dependency tree for Vue.js SFC (Single File Component)

flow-to-ts - Convert flow code to typescript

eslint-plugin-import - ESLint plugin with rules that help validate proper imports.

react-border-wrapper - A wrapper for placing elements along div borders.

parcel - The zero configuration build tool for the web. 📦🚀

ts-migrate - A tool to help migrate JavaScript code quickly and conveniently to TypeScript

stylelint - A mighty CSS linter that helps you avoid errors and enforce conventions.

vue-tsx-support - TSX (JSX for TypeScript) support library for Vue

style-resources - Style Resources for Nuxt 3

prettier-plugin-organize-imports - Make Prettier organize your imports using the TypeScript language service API.