-
Notifications
You must be signed in to change notification settings - Fork 251
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 support for workspaces explicit (#864)
## Description - adds explicit detection of modules aliased via [workspaces](https://docs.npmjs.com/cli/v10/using-npm/workspaces) - introduces the `aliased-workspace` dependency type ## Motivation and Context Imports from workspaces have been well-supported in dependency-cruiser since the stone age. Not by brilliant foresight, but because it plugs into the regular node.js module resolution - workspaces are symlinks in node_modules sorta automatically linked to local folders. Dependency-cruiser didn't explicitly name them as separate dependency-types (instead slotting them into dependency type 'local' or 'npm-no-pkg' (when `npm i` wasn't run on the folder yet)). This PR corrects that oversight. This PR also fixes a bug uncovered by @throrin19: workspace imports were erroneously classified as tsconfig aliases (see #863 for details). ## How Has This Been Tested? - [x] green ci - [x] additional unit tests - [x] additional integration test ## 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) - [ ] Breaking change (fix or feature that would cause existing functionality to change)
- Loading branch information
Showing
34 changed files
with
668 additions
and
17 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
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.