npm dependency-cruiser 4.0.0
orphanage (v4.0.0)

latest releases: 16.8.0, 16.8.0-beta-1, 16.7.0...
6 years ago
  • 🐣 introduces orphan detection. See the orphan reference for details. Thanks @adamclerk for suggesting this.
  • 🔧 the output json schema changed in a backward incompatible way. If you're using the command line interface this has no impact for you - see below for details.
  • 👷 node 4 got de-supported - see below for details.
  • 🐛 In some situations dependency-cruiser reported typescript-only dependencies while not explicitly instructed to do so.

Breaking change: json output structure slightly updated

impact classification: very low (and medium if you're using the json output or were hacking on the internal API)

On the top level of the json and bare api object output the array of modules is now called modules
in stead of dependencies. This is more correct and makes both the json and the code instantly
easier to grasp:

after

{
    "modules": [
        {
            "source": "src/extract/derive/circular/dependencyEndsUpAtFrom.js",
            "dependencies": [],
            "valid": true
        },
        {
            "source": "src/extract/derive/circular/index.js",
            "dependencies": [
                {
                    "resolved": "src/extract/derive/circular/dependencyEndsUpAtFrom.js",
                    "coreModule": false,
                    "followable": true,
                    "couldNotResolve": false,
                    "dependencyTypes": [
                        "local"
                    ],
                    "module": "./dependencyEndsUpAtFrom",
                    "moduleSystem": "cjs",
                    "matchesDoNotFollow": false,
                    "circular": false,
                    "valid": true
                }
            ],
            "valid": true
        },
        {
            "source": "src/extract/derive/orphan/isOrphan.js",
            "dependencies": [],
            "valid": true
        }
        // ... and possibly more modules
    ],
    "summary": {
        // stuff
    }
}

before

{
    "dependencies": [
        {
            "source": "src/extract/derive/circular/dependencyEndsUpAtFrom.js",
            "dependencies": []
        },
        {
            "source": "src/extract/derive/circular/index.js",
            "dependencies": [
                {
                    "resolved": "src/extract/derive/circular/dependencyEndsUpAtFrom.js",
                    "coreModule": false,
                    "followable": true,
                    "couldNotResolve": false,
                    "dependencyTypes": [
                        "local"
                    ],
                    "module": "./dependencyEndsUpAtFrom",
                    "moduleSystem": "cjs",
                    "matchesDoNotFollow": false,
                    "circular": false,
                    "valid": true
                }
            ]
        },
        {
            "source": "src/extract/derive/orphan/isOrphan.js",
            "dependencies": []
        }
        // ... and possibly more modules
    ],
    "summary": {
        // stuff
    }
}

Breaking change: node 4 de-support

impact classification: low (unless you're still on node 4)

Per May 1 node 4 is end of life. While dependency-cruiser would probably keep working under node 4 it was a hassle with all kinds of workarounds. If you want to use dependency-cruiser on node 4 you have two options

  • use dependency-cruiser@3.1.1 which is the last version supporting node 4
  • send me enough money to make the hassle worth its while.

(In most cases the best option is to move to a higher version of node)

Fix: reporting typescript-only dependencies while not instructed as such

Root cause: we let the typescript compiler decide whether it was working with .tsx or .ts. In some cases it erroneously deduced .tsx. This transformed some 'typescript-only' dependencies into real javascript ones. With this fix dependency-cruiser takes determining tsx-iness in its own hand (by looking at the extension).

Don't miss a new dependency-cruiser release

NewReleases is sending notifications on new releases.