npm dependency-cruiser 1.5.0

latest releases: 16.3.5, 16.3.4, 16.3.3...
7 years ago
  • 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

Don't miss a new dependency-cruiser release

NewReleases is sending notifications on new releases.