Validate and visualize dependencies. Your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.
MIT License
Bot releases are hidden (Show)
Published by sverweij almost 3 years ago
(thanks @binary64 for suggesting the both of these)
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.
From this version on dependency-cruiser supports node ^12.20, ^14 and >=16 (which are not coincidentally the same as the ones nodejs supports).
None if you're on node 12.20, ^14 or >= 16 which is likely. Low in all other cases (see How to migrate below)
If you still are on one node 10.x, 13.x or 15.x there's two options:
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!
The previous implementation was (quite obviously, in hindsight) wrong.
None if you're not using dependents rules with a pathNot attribute.
path
attribute - rename pathNot to path (or merge the things in path and pathNot if a path
attribute already existed).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.
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)