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 -

Published by sverweij almost 4 years ago

🌟 Features

  • feature(extract): adds support for webpack inline loaders and require.js plugins (#390)
    Thanks to @tvolodimir for requesting this feature.

🚀 Refactoring/ speed improvements

  • refactor(extract): call path-to-posix less often (#389)
    When you happen to run on an MS-DOS derivative operating system , this tends to improve performance of reading files a bit (on an i5 laptop with windows 10 & a corporate virus scanner it saves ~4 of the 32s it took to cruise dependency-cruiser on itself. For comparison: on a similar machine with linux it takes ~9s regardless of the refactoring). Thanks to @tvolodimir for identifying the issue and doing detailed research that led to this improvement. More improvements for running on ms-dos derivative OS's might be following later.

⚒️ maintenance

  • build(npm): ⬆️ @typescript-eslint/eslint-plugin, @typescript-eslint/parser, eslint, mocha
  • test(istanbul): output json instead of lcov
  • ci(github): yarn integration -= node 12, regular workflow += node 15
  • ci(travis): 👞
dependency-cruiser -

Published by sverweij almost 4 years ago

🌟 features

  • feature(init): updates deprecated core modules to match node 14 (#380) (thanks @Winner95 !)
  • feature(init): updates pattern for matching test files in initial config (#381) (thanks @dignite !)

📖 documentation

  • bugfix(doc): consistently use .dependency-cruiser.js as config file name (#384)

🛠️ maintenance

  • build(npm): ⬆️ commander, enhanced-resolve, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, eslint, eslint-config-prettier, lint-staged, shx, typescript
dependency-cruiser -

Published by sverweij about 4 years ago

🔧 maintenance

  • build(npm): ⬆️ @babel/core, @babel/plugin-transform-modules-commonjs, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, acorn, acorn-loose, ajv, eslint, eslint-config-moving-meadow, eslint-config-prettier, eslint-plugin-budapestian, eslint-plugin-unicorn, lint-staged, mocha, upem
  • chore: use relative paths instead of ~
dependency-cruiser -

Published by sverweij about 4 years ago

🌟 features

  • feature(cli): adds a --progress option to the cli (#376)

🐛 bugfixes

  • bugfix(wrap-stream-in-html): also highlight in graphs that have only folders (ddot) (#375)
  • bugfix(report): make the err-long reporter print comments again (#377)

📖 documentation

  • doc(real-world-samples): updates the react and yarn/berry graphs (#374) (thanks to @Guzzler)
  • doc(options-reference): add the 'collapse' option to the index
  • doc(README): adds options reference link to the Usage section

🔧 maintenance

  • build(npm): ⬆️ @typescript-eslint/eslint-plugin, @typescript-eslint/parser, acorn, enhanced-resolve, eslint, eslint-config-prettier, eslint-plugin-import, yarn
dependency-cruiser -

Published by sverweij about 4 years ago

🐛 bugfixes

  • bugfix(resolve): don't count regular and @types in package.json as two separate things (#369)
    => this fixes a bug that caused false positives on the default packaged rules no-duplicate-dep-types and not-to-dev-dep in some typescript based projects that separately installed @types as development dependencies.

🔧 maintenance

  • build(npm): ⬆️ enhanced-resolve, eslint-plugin-unicorn, typescript
  • refactor(resolve): consolidate resolution classifiers (#368)
dependency-cruiser -

Published by sverweij about 4 years ago

🌟 features

  • feature(depcruise): adds a --collapse command line option (#366) which works the same as the option of the same name in depcruise-fmt.

🐛 bug fixes

  • bugfix(resolve): when not resolvable retry with .ts(x) even when importing with explicit .js(x) extension (#365), which fixes #364 raised by @jackfranklin (thanks!)

📖 documentation

  • doc: re-generate graphs

🔧 maintenance

  • build(npm): ⬆️ enhanced-resolve, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, acorn, acorn-loose, acorn-walk, ajv,husky, eslint, lint-staged, prettier
  • chore(site): meta tag tweaks
dependency-cruiser -

Published by sverweij about 4 years ago

🌟 features

  • feature(depcruise-fmt): adds a --collapse command line option (#360)
    This continues the theme set in 9.12.0. Documentation: cli.md#collapse-summarise

🔧 maintenance

  • build(npm): ⬆️ @babel/core, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, commander, eslint, lint-staged, mocha, yarn
  • refactor: replaces Object.property.hasOwnProperty.call with _.has (#361)
  • chore(stalebot): add 'PR welcome' as exempt label
  • refactor(package.json): sanitize manifest depcruise scripts (#359)
  • style: fixes various not-as-of-yet linted things

🐛 bugfixes

  • bugfix(dot): better default for presenting dependencies to node_modules (#358)
  • bugfix(cli): error normaly when even when emitting progress feedback (#356)
  • bugfix(wrap-stream-in-html): allow highlighting to work after formatting the html (#362) (thanks to @forivall)

📖 documentation

  • doc: split options from rules reference (#355)
  • doc: update code of conduct to contributor covenant 2.0 (#357)
  • doc: correct-a-typo
dependency-cruiser -

Published by sverweij about 4 years ago

📖 documentation

  • doc(docs): correct-a-typo

🐛 bugfixes

  • bugfix(depcruise-fmt): only override dot collapse when it's provided (#363)
dependency-cruiser -

Published by sverweij about 4 years ago

🌟 Features

  • feature(depcruise-fmt): add filter options (#354)

☝️ If you have a largish code base and want to make loads of overview pictures of parts of your repo fast this is the feature for you.

save the dependency-graph as a json. You probably know that if your repo is big (let's say > 5000 modules, > 20000 dependencies) this can take a minute as dependency-cruiser has to read each file from disk & parse it:

depcruise "^packages|lib" --config --output-type json -f result.json # might take some time

From the saved result generate a bunch of overview graphs. As the heavy lifting is done already, each will take typically < 1s (depending on the size of your graph):

depcruise-fmt result.json --output-type dot --include-only ^packages/search |\
   dot -T svg | depcruise-wrap-stream-in-html > search-graph.html

depcruise-fmt result.json --output-type dot --include-only ^packages/checkin |\
   dot -T svg | depcruise-wrap-stream-in-html > checkin-graph.html

depcruise-fmt result.json --output-type dot --include-only ^packages/trip |\
   dot -T svg | depcruise-wrap-stream-in-html > trip-graph.html

depcruise-fmt result.json --output-type dot --include-only ^packages/ancillaries --exclude "\\.spec.ts$|mocks" |\
   dot -T svg | depcruise-wrap-stream-in-html > ancillaries-graph-without-test-stuffs.html

The compressed architecture view will be fast as well:

depcruise-fmt result.json --output-type archi  |\
   dot -T svg | depcruise-wrap-stream-in-html > high-level-graph.html

It works on all reporters, so if you want to generate separate violation reports for parts of your repo you can do this:

# The focus filter only includes modules matching the regex + their direct neighbours, which is exactly
# what we want for violation reports:
depcruise-fmt result.json --output-type err-html --focus ^packages/ancillaries -f ancillary-violations.html
depcruise-fmt result.json --output-type err-html --focus ^packages/trip -f trip-violations.html
# ... etc

Enjoy! Bug reports (and ⭐ 's if you like it :-) ) welcome

🔧 Maintenance

  • build(npm): ⬆️ @typescript-eslint/eslint-plugin, @typescript-eslint/parser, lint-staged, mocha, prettier
  • ci(deepcode): adds .dcignore

📖 Documentation

  • doc: typo's & copy updates

912 is apparently the designation of another porsche
Porsche 912. Targa

dependency-cruiser -

Published by sverweij about 4 years ago

🐛 bugfixes

  • bugfix(resolve): also recognize @types/yadda in package.json if only 'yadda' is imported (#352)
  • bugfix(init-config): use -f instead of redirect for html report

🛠️ maintentance

  • refactor(progress-feedback): incremental improvements (#351)
  • build(npm): ⬆️ @babel/core, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, ajv, eslint, lodash, typescript, vue-template-compiler

📖 documentation

  • doc(schema): more correct & concise description how to generate the schema
  • doc(changelog): adds a CHANGELOG.md file (#350)
dependency-cruiser - v9.11.0

Published by sverweij about 4 years ago

911R

🐛 fixes

  • 🚀 bugfix(enrich): improve performance of cycle and reachable detection (#348)

Will speed up the cycle and reachability detection code between 2x and 10x - which can improve performance on certain larger repos (> 2000 modules) with seconds.

🌟 features

  • feature(cli|api): adds progress feedback (#347)

📖 documentation

  • doc(real-world-samples): regenerate the yarn & react graphs with the new highlighting in place

🔧 maintenance

  • build(npm): ⬆️ @typescript-eslint/eslint-plugin, @typescript-eslint/parser, get-stream
dependency-cruiser -

Published by sverweij about 4 years ago

🌟 features

  • feature(enrich): de-duplicate cyclic violations in the summary (#341)
  • feature(wrap-stream-in-html): highlight connected edges (#346)<- thanks @forivall for writing this feature!

📖 documentation

  • bugfix(doc): set the prefix for the schema graph to the correct base path
  • doc(cli): mention wrap-stream-in-html earlier (#345) (@forivall)
  • doc(validate): improve jsdoc

🔧 maintenance

  • build(npm): ⬆️ @babel/core, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, acorn, eslint-plugin-mocha, mochag
dependency-cruiser -

Published by sverweij about 4 years ago

🔧 maintenance

  • refactor(resolve): ensures reading package manifests keeps working in a package.json-with-exports world
  • build(npm): replaces tslint (used for linting stuff in /types) with eslint
  • ⬆️ @babel/core, eslint, eslint-config-moving-meadow, mocha, tsconfig-paths-webpack-plugin
  • refactor(*): replaces some => includes where possible
  • refactor(resolve): use named functions where possible
dependency-cruiser -

Published by sverweij about 4 years ago

🐛 bugfixes

  • bugfix(resolve): by default don't let enhanced-resolve look at 'exports' fields in package.json manifests just yet (#339)

Thanks to @hckhanh for finding this bug!

dependency-cruiser -

Published by sverweij about 4 years ago

🐛 bugfixes & 🌟 features

  • bugfix(extract): reduces memory usage by using a new version of enhanced-resolve (#335)

This also introduces a feature to tweak the cache duration enhanced resolve uses. For larger repos (above ~5000 modules, 20000 dependencies) it might be worthwhile to play with this to find a trade off between memory usage and time spent running.

Thanks to @jomi-se who not only found the bug in enhanced-resolve but also helped validate the fix (in detail!) and rolled an alternate and promising cache implementation for enhanced resolve

🔧 maintenance

  • refactor(enrich|validate): sanitize validate interface (#337)
  • build(npm): ⬆️ enhanced-resolve, @babel/core, commander, eslint, eslint-plugin-unicorn, inquirer, typescript
  • ci(travis): don't run hyperfine on the ci
dependency-cruiser -

Published by sverweij over 4 years ago

🔧 maintenance

  • build(npm): ⬆️ inquirer, lodash
dependency-cruiser -

Published by sverweij over 4 years ago

🔧 maintenance

  • build(npm): ⬆️ lodash
dependency-cruiser -

Published by sverweij over 4 years ago

🌟 features

  • feature(validate): enables using 'required' rules (#329) - thanks @hzaun for raising the issue and helping with validating the PR!

🔧 maintenance

  • build(npm): ⬆️ ajv

📖 documentation

  • doc(security): adds a security policy
dependency-cruiser -

Published by sverweij over 4 years ago

🔧 maintenance

  • build(npm): ⬆️ @babel/core, @babel/plugin-transform-modules-commonjs, eslint, eslint-config-moving-meadow, eslint-plugin-import, inquirer, typescript
  • style(*): use destructuring with requires where possible
  • doc(schema): betterizes copy
  • chore(make): makes 'build' the default task
  • chore(typescript): make running against TypeScript beta 4 possible
  • refactor(test): use an alias (~) for the repo instead of relative paths

🐛 bug fixes

  • bugfix(wrap-stream-in-html): also color circular markers on hover
dependency-cruiser -

Published by sverweij over 4 years ago

🌟 features

  • feature(init): tweaks to one-shot configs (#325)

🐛 bugfixes

  • bugfix(schema|types): add the preCompilationOnly attribute of dependencies to the json schema and TypeScript types (#323)

📖 documentation

  • doc(cli): re-write the copy for depcruise and depcruise-fmt (#326)
  • doc(*): various copy tweaks

🔧 maintenance

  • build(npm): ⬆️ @babel/core, acorn-walk, enhanced-resolve, eslint, inquirer, lint-staged