
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
dependency-cruiser-fork
Advanced tools
Validate and visualize dependencies. With your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.

Validate and visualise dependencies. With your rules. JavaScript. TypeScript. CoffeeScript. ES6, CommonJS, AMD.

This runs through the dependencies in any JavaScript, TypeScript, LiveScript or CoffeeScript project and ...
As a side effect it can generate cool dependency graphs you can stick on the wall to impress your grandma.
npm install --save-dev dependency-cruiser to use it as a validator in your project (recommended) or...npm install --global dependency-cruiser if you just want to to inspect multiple projects.To create a graph of the dependencies in your src folder, you'd run dependency
cruiser with output type dot and run GraphViz dot on the result. In
a one liner:
depcruise --include-only "^src" --output-type dot src | dot -T svg > dependencygraph.svg
--include-only and other command line
options in the command line interface documentation.The easy way to get you started:
depcruise --init
This will ask you some questions and create a .dependency-cruiser.js with some
rules that make sense in most projects (detecting circular dependencies,
dependencies missing in package.json, orphans, production code relying on
dev- or optionalDependencies, ...).
Start adding your rules by tweaking that file.
Sample rule:
{
"forbidden": [
{
"name": "not-to-test",
"comment": "don't allow dependencies from outside the test folder to test",
"severity": "error",
"from": { "pathNot": "^test" },
"to": { "path": "^test" }
}
]
}
--init-rules set heredepcruise --config .dependency-cruiser.json src
This will validate against your rules and shows any violations in an eslint-like format:

There's more ways to report validations; in a graph (like the one on top of this readme) or in a table.
decpruise script in the
package.jsonYou've come to the right place :-) :
Made with :metal: in Holland.
FAQs
Validate and visualize dependencies. With your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.
We found that dependency-cruiser-fork demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.