dependency-cruiser

Validate and visualize dependencies. Your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.

MIT License

Downloads
1.5M
Stars
4.9K
Committers
47

Bot releases are hidden (Show)

dependency-cruiser - v10.7.0

Published by sverweij almost 3 years ago

🌟 features

  • 2c76e2c1 feature(report): makes the teamcity report ignore known errors (#521)

👷 maintenance

  • dd6f1a36 lint: ⬆️ eslint-plugin-budapestian
  • f7d0acb2 chore(ci): adds node 17
dependency-cruiser -

Published by sverweij almost 3 years ago

🌟 features

  • ed52c71d feature(extract) adds vue3 @vue/compiler-sfc template compiler support (#519)
    A huge thanks to @annamooseity for this addition!!

🧰 maintenance

  • 2f385efb build(npm): ⬆️ @swc/core, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, commander, eslint, lint-staged, svelte
dependency-cruiser -

Published by sverweij about 3 years ago

🌟 features

  • babe39a9 feature(validate): adds a dependencyTypesNot restriction (#518) - thanks @rklos for the suggestion (#516)!

🐛 fixes

  • 14d292bb bugfix(enrich/summarize): Adds knownViolations to summary (#517) thanks @radiantly for the excellent PR!

👷 maintenance

  • edd5585d build(npm) ⬆️ @swc/core, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, eslint-plugin-import, eslint-plugin-unicorn, figures, lint-staged, mocha, svelte, typescript, yarn
  • d2c20612 chore: updates lint-staged to check mjs in test folder
  • c1d47281 refactor(report/anon): simplify random string algo, add 'apps' and 'libs' to the whitelist
dependency-cruiser -

Published by sverweij about 3 years ago

🌟 features

  • a3f27ab1 feature(extract): label typescript type-only imports as such (#499)
  • 6d20f994 feature(validate): adds 'via' restrictions for cycles (#507)
  • 4b7a63c1 feature(report): makes the err-html reporter 'ignore-known' aware (#513)

📖 documentation

  • 43289cc7 doc: updates contribution documentation (#506)

👷 maintenance

  • 56d366f5 build(npm) ⬆️ @babel/core, @swc/core, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, c8, coffeescript, inquirer, lint-staged, svelte, yarn
  • 61e27b4b refactor(report): simplify the 'ignored-violations' handling of the err reporters (#510)
dependency-cruiser -

Published by sverweij about 3 years ago

🐛 bugfixes

  • 745d58e5 bugfix(known-violations|summary): compare cyclic violations by cycle, properly (#502)
  • c456d10e bugfix(summary): fix ignore count in the model's schema + add it to the schema for the summary (#504)

👷 maintenance

  • a4211e50 build(npm): ⬆️ @swc/core, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, coffeescript, enhanced-resolve, glob, mocha, svelte
  • a2dddb09 chore: adds exceptions for (some) .json orphans in dependency-cruiser config(s)
dependency-cruiser -

Published by sverweij about 3 years ago

🌟 features

  • d8079c87 feature: adds support for baselining known violations (#494)
  • af8556d8 feature(extract): adds an option to specify extra (typically non-parseable) extensions to scan (#492)

(thanks @binary64 for suggesting the both of these)

👷 maintenance

  • 201768a3 chore(resolve): adds typings
  • 391db892 build(npm): ⬆️ @babel/core, @babel/plugin-transform-modules-commonjs, @swc/core, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, acorn, acorn-loose, acorn-walk, ajv, c8, commander, eslint-plugin-unicorn, inquirer, prettier, svelte, typescript
dependency-cruiser -

Published by sverweij about 3 years ago

🌟 features

  • 9ea7401a feature(extract): makes it possible to use tsc as the primary parser (#489)

👷 maintenance

  • 14b3b214 chore(ci): on the ci temporarily down upem so the ci also runs on node 12
  • 32e2324e git ca build(npm): ⬆️ @swc/core, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, eslint-plugin-import, husky, mocha, svelte, typescript

For some production dependencies dependency-cruiser started to use version ranges in package.json. This should reduce the # of maintenance updates and it might reduce dependency-cruiser's footprint in node_modules.

dependency-cruiser -

Published by sverweij about 3 years ago

📖 Documentation

  • a989d0a4 doc: re-enables the archi graph
  • 073e8a91 doc(FAQ): adds a howto with npx + more stronlgy recommend local install - fixes #487

🐛 Bugfixes

  • dee158a7 bugfix(init): makes init template yarn pnp proof (#488)

👷 Maintenance

  • 499dbd6c/ 7d522378 build(npm): ⬆️ @swc/core, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, eslint-plugin-import, mocha, prettier, svelte
  • cd29303e chore(ci): adds a workflow for running under yarn/berry (#486)
  • 3f642c88 refactor: deep import semver functions & ⬆️ semver-try-require
dependency-cruiser -

Published by sverweij about 3 years ago

🌟 Features

  • 919f3592 feature(resolve): adds yarn virtual dependency resolution (#483)
  • ad5586cf feature(init): adds a text and a 'focus' script to the experimental-scripts default config (#482)
  • 7be91289 feature(init): write to .dependency-cruiser.cjs when package type equals module (#479)

🐛 Fixes

  • 41e0c5cf bugfix(ts-config): pass an absolute path to tsconfig.json so typescripts parsing still works under yarn 3 (#481)
  • 9f6b697d bugfix(init): makes --init work under yarn 3
  • 08e671fc bugfix(resolve): also puts triple slash directive dependencies through the resolution algorithm(s) (#484)

👷 Maintenance

  • 2e3c7e6a build(npm): ⬆️ @babel/core, @babel/plugin-transform-modules-commonjs, @babel/preset-typescript, @swc/core, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, eslint-plugin-import, eslint-plugin-unicorn, lint-staged, svelte
dependency-cruiser -

Published by sverweij about 3 years ago

👷 maintenance

  • d4801cd5 chore: removes deepcode configurations
  • 672e70d9 build(npm): ⬆️ @swc/core, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, c8, chalk, commander, eslint, mocha, svelte, yarn
dependency-cruiser -

Published by sverweij about 3 years ago

🐛 fixes

  • 286b06ff bugfix(report): minifies compiled handlebars templates
    This makes the compiled templates smaller and hence dependency-cruiser smaller to download and (a little) faster to load

👷 maintenance

  • 6fdabe7a test: converts tests to esm (#476)
  • c5b70495 chore: move configs & schemas from json to js (#475)
  • 8bee23d7 build(npm): ⬆️ @babel/core, @swc/core, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, ajv, eslint, inquirer, lint-staged, normalize-newline, svelte
dependency-cruiser -

Published by sverweij over 3 years ago

🐛 fixes

  • e82891e8 bugfix(wrap-stream-in-html): de-buffer so it can handle larger streams (#474)

👷 maintenance

  • 34bf285d chore: replaces nyc with c8
  • 2903563d build(npm): ⬆️ @swc/core, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, acorn-jsx, acorn-walk, ajv, commander, eslint, eslint-plugin-unicorn, mocha, typescript
dependency-cruiser -

Published by sverweij over 3 years ago

👷 maintenance

  • a2f5ba0b build(npm): ⬇️ commander
dependency-cruiser -

Published by sverweij over 3 years ago

👷 maintenance

  • 21c68e9e build(npm): ⬆️ @swc/core, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, acorn, commander, svelte
dependency-cruiser -

Published by sverweij over 3 years ago

🐛 bug fixes

  • 017fd51e bugfix(cli): fix --exit-code flag (#470) thanks for the PR @neelance !

👷 maintenance

  • c8a3d4d9 refactor(swc): consolidate swc call (#466)
  • d379ac6e chore(tools): convert to ESM (#464)
  • f3ce5eae build(npm): @babel/core, @babel/plugin-transform-modules-commonjs, @babel/preset-typescript, @swc/core, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, acorn, ajv, eslint, eslint-plugin-import, eslint-plugin-mocha, eslint-plugin-unicorn, inquirer, mocha, semver-try-require, typescript, vue-template-compiler
dependency-cruiser -

Published by sverweij over 3 years ago

🐛 bugfixes

  • e5e3a7d0 bugfix(init): update the doc output of --init experimental-scripts
  • 8a866898 bugfix(resolve): work around enhanced-resolve's hashmark-in-filenames problem (#461)

👷 maintenance

  • 9ffbe857 build(npm): ⬆️ enhanced-resolve, eslint-plugin-unicorn
dependency-cruiser -

Published by sverweij over 3 years ago

👷‍♀️ maintenance

91e353f3 build: drop support for node <12.20 (💥 breaking change)

What changed?

From this version on dependency-cruiser supports node ^12.20, ^14 and >=16 (which are not coincidentally the same as the ones nodejs supports).

Why?

  • Dependency-cruiser follows the support schedule of nodejs - which de-supported node 10 this month. Many of its dependencies also stopped supporting it, so it's getting less easy (and safe!) to maintain that situation.
  • Likewise nodejs doesn't support node 13 anymore, and soon won't support node 15 any longer. You can safely upgrade to node 14 and 16 respectively (see the release page on the nodejs website.
  • Node 12.20 contains some useful features earlier versions didn't have, which dependency-cruiser either is already using or will start using in the near future.

What is the impact?

None if you're on node 12.20, ^14 or >= 16 which is likely. Low in all other cases (see How to migrate below)

How to migrate

If you still are on one node 10.x, 13.x or 15.x there's two options:

  • upgrade your node version to a supported version (^12, ^14, ^16 or even ^17 when that comes out)
  • keep using [email protected]

🐛 bugfixes

3fc204d3 bugfix(validate): correctly filter out dependents from pathNot (#460) (💥 breaking change)

What changed?

This is technically a breaking change: if you had a rule with dependents in them and a pathNot attribute in the from part, the validator would treat the paths in pathNot as if they were regular paths. This is obviously wrong, but if your ruleset relies on this erroneous behaviour rules might fire that didn't before.

Thanks @davidparkagoda who both spotted the error and contributed this bugfix!

Why?

The previous implementation was (quite obviously, in hindsight) wrong.

What is the impact?

None if you're not using dependents rules with a pathNot attribute.

How to migrate

  • If you intended the new behaviour in the first place you now get the correct behaviour.
  • If you did not intend it, but instead put the restriction in a pathNot instead of a path attribute - rename pathNot to path (or merge the things in path and pathNot if a path attribute already existed).
dependency-cruiser -

Published by sverweij over 3 years ago

👷 maintenance

  • 7488a384 doc(plugins): adds an example 3d reporter plugin
  • ca2f3036/ 1fb78cf4 build(npm): ⬆️ @babel/core, @babel/plugin-transform-modules-commonjs, acorn, ajv, svelte
  • e40453eb test(transpile): adjust babel fixture to latest transpiler output
dependency-cruiser -

Published by sverweij over 3 years ago

🌟 features

  • 1d1f9b4c feature(extract): adds basic support for ESM urls (a.o. the node: protocol) (#457)

With this feature dependency-cruiser also recognises things like import * as fs from 'node:fs' (which works from node 12.20) and const { readFileSync } = require('node:fs') (which works from node 16). See this issue in the nodejs repo to see why this might be useful and why it might get more commonplace.

🐛 bugfixes

  • 201ae05e bugfix(cli): adds .cjs as a supported config format (#456)

👷‍♀️ maintenance

  • d9c485fc chore(actions): use node 16 as default, drop node 15 from build matrices
  • 3bfe6ad8 build(npm): ⬆️ @babel/core, @swc/core, acorn, acorn-loose, acorn-walk, chalk, eslint, eslint-config-prettier, eslint-plugin-unicorn, get-stream
  • cf1154e5 build(npm): ⬇️ symlink-dir (as it didn't work on node 10 anymore, while we will still support that for a few weeks)
dependency-cruiser -

Published by sverweij over 3 years ago

🐛 bugfixes

  • 3ce2a7d0 bugfix(transpile): when swc is there also cite typescript as supported extensions (#455)

👷 maintenance

  • 6a7d12c2 build(npm): ⬆️ @babel/core, @swc/core, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, acorn, ajv, eslint, symlink-dir, typescript
    ☝️ nice: acorn lost 600Kb of its weight over the last version bump because of this PR in acorn. This should make dependency-cruiser a bit faster to install 😃

  • e08391ae refactor(swc): adds typeAnnotation detection, refactors (#453)