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: enables matching transitive dependencies in 'required' rules #975

Conversation

sverweij
Copy link
Owner

@sverweij sverweij commented Dec 9, 2024

Description

  • adds the reachable attribute to the 'required' rules schema
  • adds reachable detection to the enrich step
  • processes reachable in validating against 'required' rules
  • update the documentation

Motivation and Context

See #973

How Has This Been Tested?

  • green ci
  • additional automated non-regression tests

Example usage

/** @type {import('dependency-cruiser').IConfiguration} */
export default {
  required: [
    {
      name: "must-reach-meta-cjs",
      comment: "all modules much reach, somehow, meta.cjs",
      module: {
        path: "^src/",
      },
      to: {
        path: "^src/meta[.]cjs$",
        reachable: true,
      }
    }
  ],
  options: {
    // ...
  }
}

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.

Copy link

codeclimate bot commented Dec 12, 2024

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

View more on Code Climate.

@sverweij sverweij marked this pull request as ready for review December 12, 2024 08:25
@sverweij sverweij merged commit dd81580 into main Dec 12, 2024
8 checks passed
@sverweij sverweij deleted the feature/adds-support-for-transitive-dependencies-in-required-rules branch December 12, 2024 08:26
@sverweij sverweij restored the feature/adds-support-for-transitive-dependencies-in-required-rules branch December 12, 2024 08:26
@sverweij sverweij deleted the feature/adds-support-for-transitive-dependencies-in-required-rules branch December 12, 2024 08:26
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.

1 participant