Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(extract): makes support for workspaces explicit #864

Merged
merged 4 commits into from
Nov 12, 2023

Conversation

sverweij
Copy link
Owner

@sverweij sverweij commented Nov 11, 2023

Description

  • adds explicit detection of modules aliased via 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 briliant 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?

  • green ci
  • additional unit tests
  • 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)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • 📖

    • My change doesn't require a documentation update, or ...
    • it does and I have updated it
  • ⚖️

    • The contribution will be subject to The MIT license, and I'm OK with that.
    • The contribution is my own original work.
    • I am ok with the stuff in CONTRIBUTING.md.

@sverweij sverweij force-pushed the feature/make-support-for-workspaces-explicit branch from 5484883 to 3c6e23d Compare November 12, 2023 16:08
Copy link

codeclimate bot commented Nov 12, 2023

Code Climate has analyzed commit aa2860f and detected 0 issues on this pull request.

View more on Code Climate.

@sverweij sverweij merged commit fce008d into main Nov 12, 2023
8 checks passed
@sverweij sverweij deleted the feature/make-support-for-workspaces-explicit branch November 12, 2023 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant