Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dependency-cruiser

Package Overview
Dependencies
Maintainers
1
Versions
536
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dependency-cruiser - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

12

package.json
{
"name": "dependency-cruiser",
"version": "2.0.1",
"version": "2.0.2",
"description": "Validate and visualize dependencies. With your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.",

@@ -38,10 +38,10 @@ "bin": {

"coffee-script": "1.12.4",
"eslint": "3.16.1",
"eslint": "3.17.1",
"eslint-plugin-security": "1.3.0",
"intercept-stdout": "0.1.2",
"istanbul": "0.4.5",
"js-makedepend": "2.2.1",
"js-makedepend": "2.2.2",
"mocha": "3.2.0",
"npm-check-updates": "2.10.3",
"nsp": "2.6.2",
"nsp": "2.6.3",
"typescript": "2.2.1"

@@ -59,3 +59,3 @@ },

"acorn": "4.0.11",
"ajv": "4.11.3",
"ajv": "4.11.4",
"chalk": "1.1.3",

@@ -66,3 +66,3 @@ "commander": "2.9.0",

"lodash": "4.17.4",
"resolve": "1.3.1",
"resolve": "1.3.2",
"safe-regex": "1.1.0",

@@ -69,0 +69,0 @@ "semver": "5.3.0"

@@ -22,3 +22,3 @@ # Dependency cruiser ![Dependency cruiser](https://raw.githubusercontent.com/sverweij/dependency-cruiser/master/doc/assets/ZKH-Dependency-recolored-160.png)

- `npm install --save-dev dependency-cruiser` to use it as a validator in your project or...
- `npm install --global depdendency-cruiser` if you just want to to inspect multiple projects.
- `npm install --global dependency-cruiser` if you just want to to inspect multiple projects.

@@ -34,5 +34,2 @@ ### Show stuff to your grandma

The `--exclude "^node_modules"` makes sure dependency-cruiser does not scan
paths starting with *node_modules*.
- You can read more about what you can do with `--exclude` and other command line

@@ -45,7 +42,15 @@ options in the

### Validate stuff
### Validate things
#### Declare some rules
To have dependency-cruiser report on dependencies going _into_ the test folder
(which is totally weird, right?) create a rules file (e.g. `my-rules.json`)
and put this in there:
The easy way to get you started:
```shell
depcruise --init-rules
```
This will create a `.dependency-cruiser.json` with some rules that make sense
in most projects. Start adding your rules by tweaking that file.
Sample rule:
```json

@@ -70,19 +75,14 @@ {

#### Report them
Pass the `--validate` parameter, to the command line followed by the rules
file.
```sh
depcruise --validate .dependency-cruiser.json src
```
Most output-types will show violations of your rules in one way or another.
The `dot` reporter, for instance, will color edges representing violated
dependencies in a signaling color (red for errors, orange for warnings) - the
picture on top of this README is a sample of that.
This will validate your rules and shows any violations in an eslint-like format:
The `err` reporter only emits (text) output when there's something wrong.
This is useful when you want to check the rules in your build process:
```sh
depcruise --validate my-rules.json --output-type err src
```
![sample err output](https://raw.githubusercontent.com/sverweij/dependency-cruiser/master/doc/assets/sample-err-output.png)
- Read more about the err, dot, but also the csv and html reporters in the
There's more ways to report validations; in a graph (like the one on top of this
readme) or in a table.
- Read more about the err, dot, csv and html reporters in the
[command line interface](./doc/cli.md)

@@ -89,0 +89,0 @@ documentation.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc