Skip to content

Releases: sverweij/dependency-cruiser

v1.15.1

07 Jan 13:10
Compare
Choose a tag to compare
  • 🐥 expands the group matching introduced in v1.15.0 to more than one group (e.g. in "([^\\.])/(.+)$" stuff before the slash is available in $1, after the slash in $2 - and the whole match is available in $0.
  • 📖 splits the rules documentation in a tutorial and a reference.
  • 📖 expands documentation on group matching with the expansion to > 1 group.
  • ⬆️ upgrades ajv (json schema validator) and eslint

v1.15.0

03 Jan 20:31
Compare
Choose a tag to compare
  • 🐣 include support for matching groups:
    • Sometimes you'll want to use a part of the path the 'from' part of your rule matched and use it in the 'to' part. E.g. when you want to prevent stuff in the same folder to be matched.
    • To achieve this you'll need to do two things:
      • In the to of your rule:
        Make sure the part of the path you want to be matched is between brackets.
        Like so: "^src/([^/]+)/.+"
      • In the from part of your rule:
        You can reference the part matched between brackets by using $1 in path
        and pathNot rules. Like so: "pathNot": "^src/$1/.+".
    • See group matching in the rules guide for a little more information.
  • 🔧 with the introduction of 'matching groups', the ownFolder attribute is deprecated. 'matching groups' offer more flexibility and more straightforward semantics, while they can achieve the same.
  • 🐛 pathNot attributes with scary regular expressions now get flagged as well (path attributes already had this)

v1.14.0

31 Dec 12:42
Compare
Choose a tag to compare
  • 🐣 Adds a --init-rules option. This creates a .dependency-cruiser.json with some useful rules in it to the current folder and exits. See below for the 'starter kit' rules.
  • 📖 improves the intro text of the --info option a bit
  • 👷 tell bithound it's ok that we do have typescript and coffee-script in our dependencies, but nowhere in a direct require or import - as we're using a different construct there

The rules:

Rule Description
not-to-test Don't allow dependencies from outside the test folder to test
not-to-spec Don't allow dependencies to (typescript/ javascript/ coffeescript) spec files
no-deprecated-core Warn about dependencies on deprecated core modules.
not-to-unresolvable Don't allow dependencies on modules dependency-cruiser can't resolve to files on disk (which probably means they don't exist)
not-to-dev-dep Don't allow dependencies from src/app/lib to a development only package
no-non-package-json Don't allow dependencies to packages not in package.json (except from within node_modules)
optional-deps-used Inform about the use of dependencies labeled as 'optional' (so you can ensure their imports a are sufficiently managed)
peer-deps-used Warn about the use of a peer dependency (peer dependencies are deprecated with the advent of npm 3 - and probably gone with version 4).
no-duplicate-dep-types Warn if a dependency occurs in your package.json more than once (technically: has more than one dependency type)

v1.13.0

27 Dec 20:02
Compare
Choose a tag to compare
  • 🐣 adds a moreThanOneDependencyType property to the validation rule format so it is possible to check on "multiple inclusions" (e.g. both in dependencies and in devDependencies) see rules.md#more-than-one-dependencytype-per-dependency for an example.
  • 🐣 modules that can't be followed any further grow a dependencyTypes when they're on a 'from' side in the output object
  • ⬆️ js-makedepend

v1.12.0

26 Dec 13:11
Compare
Choose a tag to compare

🐣 check against dependencies in package.json

  • Adds a 'dependencyTypes' array to the extraction output format that
    describes whether the dependency is e.g. a dependency or devDependency
    in package.json, a core module, local one, could not be determined,
    ...
  • Adds a 'dependencyTypes' array to the validation rules definition. The
    associated rule checks if there is an intersection between the
    dependencyTypes array defined in the rules file and the one in the 'to'
    of the output object.
  • Deprecates the 'coreModule' attribute - the dependencyTypes contains
    the same information and the format is more elegant and flexible.

    Deprecated means: will definitely be gone in version v2.0.0 and higher.

🔧 Other stuff

  • When displaying transpiler info (depcruise --info) dependency-cruiser
    now takes the current version of the transpiler into account in determining availability
  • Adds the checks against package.json to dependency-cruisers own dependency-cruiser
    rules.
  • ⬆️ ajv

v1.11.0

24 Dec 21:10
Compare
Choose a tag to compare
  • 🔧 make adding new (alt-js) languages easier; sorta pluggable.
  • 🐣 adds support for LiveScript in this fashion. Works if livescript is available - but if it isn't dependency-cruiser will happily chug along on the other supported languages (currently javascript, typescript and coffee script)
  • 🐣 add a --info command line option that shows what alt-js/ transpilers dependency-cruiser thinks are supported.
  • ⬆️ ajv, lodash and some dev dependencies

v1.8.0

10 Dec 17:48
Compare
Choose a tag to compare
  • Enables multiple files/ directories to be passed on the command line (and scanned in one go)
  • Adds a first version of a javascript API. Working well, but subject to change.
  • The json output (/ the json schema describing it) now include a meta data section

v1.7.1

07 Dec 22:26
Compare
Choose a tag to compare
  • adds support for literate CoffeeScript (.litcoffee, .coffee.md)
  • ⬆️ TypeScript 2.0.10 -> v2.1.4
  • 📖 small copy tweaks

v1.7.0

06 Dec 21:45
Compare
Choose a tag to compare
  • adds support for CoffeeScript (:boom:)
  • simplifies the README and reorganizes the documentation so it's easier to learn and find things
  • dot output now also colors unresolvable modules that appear to be in folders red.
  • cosmetic changes to error messages

v1.6.1

04 Dec 12:04
Compare
Choose a tag to compare
  • There's now a json schema for the (json) output - and there's automated tests in place to make sure dependency-cruiser keeps adhering to it.
  • There's a json schema for the rules file format as well. In stead of silently ignoring unexpected content, dependency-cruiser will now stop with an error.
  • The package published at npm lost some weight (~0.5Mb) because the .npmignore now contains more files that are not strictly necessary for using dependency-cruiser.