-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: restructures the via* sub-restrictions to also accept & valida…
…te against dependency types (BREAKING for API users) (#894) ## Description - restructures the via* sub restrictions to also accept & validate against dependency types - deprecates the viaNot and viaSomeNot restrictions in favor of viaOnly.pathNot and via.pathNot restrictions respectively. You could still have them in dependency-cruiser configs, but internally they're rewritten into `viaOnly` and `via` rules when possible. This is a breaking change for the API only - in the input/ rules instead of a string | string[] the via and viaOnly restrictions can now also be an object with `path`, `pathNot`, `dependencyTypes` and `dependencyTypesNot` attributes - in the cruise result via and viaOnly are _only_ available as that object (in stead of string | string[]) - in the cruise result the `viaNot` and `viaSomeNot` have disappeared (rules in the input will have been rewritten as via or viaOnly rules). ## Motivation and Context There's a long outstanding and much upvoted request (#695) to be able to exclude e.g. type-only over a whole cycle instead to just the first dependency of the cycle. This PR enables that. ## How Has This Been Tested? - [x] green ci - [x] additional 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) => for API only
- Loading branch information
Showing
24 changed files
with
1,077 additions
and
564 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.