-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!(extract): makes 'real' depencency type available alongside alia…
…ses BREAKING (#856) ## Description, Motivation and Context Before this PR dependency types that came out of an alias (subpath import, webpack alias, tsconfig path) only stated that the dependency was an alias. However, these aliases point to other dependency types - local modules, third party ('npm') modules, nodejs builtin core(!) modules. This is useful information, and actually not listing those is an omission. After merging this PR dependency-cruiser will start listing the 'actual' dependency type _alongside_ the alias dependency types. Technically this is a BREAKING CHANGE because rules that triggered on these 'real' dependency types before didn't trigger because they weren't detected. ### after ```javascript { "modules": [ { "source": "bin/depcruise-baseline.mjs", "dependencies": [ { "dynamic": false, "module": "#cli/assert-node-environment-suitable.mjs", "moduleSystem": "es6", "exoticallyRequired": false, "resolved": "src/cli/assert-node-environment-suitable.mjs", "coreModule": false, "followable": true, "couldNotResolve": false, "dependencyTypes": [ "aliased", "aliased-subpath-import", "local" // <<---- Now also listed that it's a local dependency ], "matchesDoNotFollow": false, "circular": false, "valid": true }, // ... ``` > If you have a rule that e.g. forbids the `local` dependencyType from being used > it before didn't trigger on the above dependency. It now will, however ... ### before ```javascript { "modules": [ { "source": "bin/depcruise-baseline.mjs", "dependencies": [ { "dynamic": false, "module": "#cli/assert-node-environment-suitable.mjs", "moduleSystem": "es6", "exoticallyRequired": false, "resolved": "src/cli/assert-node-environment-suitable.mjs", "coreModule": false, "followable": true, "couldNotResolve": false, "dependencyTypes": [ "aliased", "aliased-subpath-import" ], "matchesDoNotFollow": false, "circular": false, "valid": true }, // ... ``` ## How Has This Been Tested? - [x] green ci - [x] additional & adapted automated non-regression tests ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] Documentation only change - [ ] Refactor (non-breaking change which fixes an issue without changing functionality) - [x] New feature (non-breaking change which adds functionality) - [x] Breaking change (fix or feature that would cause existing functionality to change)
- Loading branch information
Showing
9 changed files
with
124 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.