npm dependency-cruiser 3.0.0-beta-6

latest releases: 16.7.0-beta-1, 16.6.0, 16.6.0-beta-1...
6 years ago
  • 🐣 return all found violations on a dependency instead of only one (issue #40 thanks @ajafff again for reporting!, PR #41)
    This goes for both the internal API and the err and json reporters. To accommodate this each 'invalid' dependency's rule (with only one rule) was replaced with a rules section with an array of violated rules.

API change

before

{
    "source": "node_modules/somemodule/src/somemodule.js",
    "dependencies": [
        {
            "module": "./moar-javascript",
            "resolved": "node_modules/somemodule/src/moar-javascript.js",
            "moduleSystem": "cjs",
            "coreModule": false,
            "followable": true,
            "valid": false,
            "rule": {
                "severity": "warn",
                "name": "my-cool-rule"
            }
        },
...
    ]
},
...

after

{
    "source": "node_modules/somemodule/src/somemodule.js",
    "dependencies": [
        {
            "module": "./moar-javascript",
            "resolved": "node_modules/somemodule/src/moar-javascript.js",
            "moduleSystem": "cjs",
            "coreModule": false,
            "followable": true,
            "valid": false,
            "rules": [{
                "severity": "warn",
                "name": "my-cool-rule"
            },
            {
                "severity": "error",
                "name": "not-in-allowed"
            }]
        },
...
    ]
},
...

Don't miss a new dependency-cruiser release

NewReleases is sending notifications on new releases.