Skip to content

Releases: sverweij/dependency-cruiser

v1.6.0

03 Dec 22:16
Compare
Choose a tag to compare

Changes since v1.5.0:

  • Support for typescript out of the box - no pre-processing/ transpilation necessary anymore (:boom:!)
  • Other changes
    • dot reporter:
      • adds the violated rule in a tooltip
      • adds a link to the source (for modules that could be resolved to files)
    • err reporter:
      • only exit with a non-zero exit code when there's at least one error (leaving warnings and informational message)
      • small layout tweaks

v1.5.0

27 Nov 19:13
Compare
Choose a tag to compare
  • support for new rules
    • match a (to-) module against it being a coreModule or not
    • match a (to-) module against whether or not it could be resolved to an actual file on disk (couldNotResolve).
      this makes it easy to weed out
    • negative matches against paths
  • changes in the validation format to enable more elaborate rules - see below for a list
  • merged the --validate and --rules-file option: you can now just specify the (still optional) rule file with the --validate parameter
dependency-cruise -v my-dependency-rules.json -T err src

Changes to the validation config

note the utl/map-1-4-ruleset-to1-5.js script takes a pre 1.5.0 ruleset and transforms it to a post 1.5.0 one:

node url/utl/map-1-4-ruleset-to1-5.js your-pre-1-5-0-ruleset.json
  • from and to are now objects so they can contain multiple properties to match against.
    • The properties for both from and to:
      • path - a regular expression of a path to match against
      • pathNot - match against all paths except the one matching this regular expression
        -The properties useful only for to:
      • coreModule - a boolean value indicating whether to match against node.js core modules
      • couldNotResolve - a boolean value indicating whether to match against modules dependency cruiser could resolve them to something on disk (or a core module)
  • level renamed to severity
  • values for severity can now be error, warning and info

v1.3.0

26 Nov 12:24
Compare
Choose a tag to compare
  • adds 'unfollowable' module dependencies (like node core modules and included json files) as regular 'sources' so they
    • show up in the html and csv reports
    • can get processed like modules that are followable
  • html and csv reporters: color core modules grey

v1.2.3

26 Nov 07:24
Compare
Choose a tag to compare
  • Adds the 'severity' of a violation into the html and csv reporter output
  • html reporter:
    • colors the cell according to the severity of the violation
    • adds the violated rule into the title, so you can see it on hover
  • csv reporter: when the cell is the intersection of a violation it'll contain the severity of that violation
  • dot reporter:
    • colors violating dependencies according to their severity (in stead of merely red)
    • some layout tweaks to make output easier on the eye - see below for an 'after - before' comparison

after

after

before

before

v1.2.2

25 Nov 08:48
Compare
Choose a tag to compare

Changes since v1.1.0:

  • Err reporter:
    • make output better scannable (by adding spacing and coloring).
    • Makes the violated rule + the severity of the violation visible (so it's easier to track what needs fixing)
  • Nests nested packages in the dot reporter (in addition to just grouping them, which was already done in v1.1.0):

This command ...

bin/dependency-cruise -T dot -x "(node_modules|json$)" src | dot -T png > dependency-cruiser-cruised.png

... will now give you this:
dependency-cruiser-cruised

v1.1.0

22 Nov 23:06
Compare
Choose a tag to compare

Changes since 1.0.4

  • Dependency-cruiser now also runs on slightly older versions of nodejs (4 and up)
    (tested, updated package.json - included a ci target for nodejs 4, 6 and latest)
  • The dot reporter now clusters modules to improve visual grepping - see below for a simple sample.
  • Switched to github as main repository.

a simple sample, based on the fixtures folder in dependency-cruiser/test

... which is what you get when you run this:

cd test/fixtures
dependency-cruise -T dot -r rules.sub-not-allowed.json -x "(node_modules|json$)" . | dot -T png > sample-dot-output.png

v1.0.4

20 Nov 21:58
Compare
Choose a tag to compare

'release' 1.0.1 - 1.0.4 are just documentation updates - pictures mostly (first I got them from gitlab - who apparently hadn't switched the project private -> public yet. Or I didn't switch enough switches for that. Secondly I got them from github, but made the classic mistake of not linking pictures to raw.githubusercontent but to github.com. Which works ask within github, but not outside of it. Like on npmjs.com. Or on gitlab.com :-/)

v1.0.0

20 Nov 20:22
Compare
Choose a tag to compare

Initial release

Features:

  • Generates dependency information from any javascript code base:
    • in html, dot, csv
    • highlights for dependencies you have configured to be forbidden
  • Configurable dependency validation (and a special bare bones reporter) to integrate into build systems.
  • See Daphne's dependencies for a gentle introduction.

Pictures

Graphviz dot output

dot output

Build output

(only visible when there's something wrong wit your dependencies):

dependency-cruise -T err -v test/fixtures
Dependency-cruiser found the following illegal dependencies:
  test/fixtures/cjs/root_one.js => test/fixtures/cjs/sub/dir.js
  test/fixtures/cjs/sub/dir.js => test/fixtures/cjs/sub/depindir.js
  test/fixtures/cjs/two_only_one.js => test/fixtures/cjs/sub/dir.js
make: *** [dependency-cruise] Error 3

HTML

html output
rotated html output. Like a boss