module-graph icon indicating copy to clipboard operation
module-graph copied to clipboard

Include modules that have 0 dependencies and dependants in the output graph

Open myhau opened this issue 11 months ago • 1 comments

💡 Describe the solution you'd like

Let's say that we have 3 modules:

  • moduleA - depends on moduleB
  • moduleB - depends on nothing
  • moduleC - depends on nothing

The graph generated by module-graph will only show moduleA and moduleB. moduleC won't be shown.

It might seem that moduleC is an unnecessary module, but there are situations where this a valid case and there are multiple such independent modules in the project (especially in monorepo environment).

Current behavior

%%{
  init: {
    'theme': 'neutral'
  }
}%%

graph LR
  :moduleA --> :moduleB

Desired behavior

%%{
  init: {
    'theme': 'neutral'
  }
}%%

graph LR
  :moduleA --> :moduleB
  :moduleC

🤚 Do you want to develop this feature yourself?

  • [ ] Yes
  • [ ] No

myhau avatar Feb 14 '25 10:02 myhau

Hey there. I'll look into it. Thanks for the issue.

iurysza avatar Feb 19 '25 21:02 iurysza

Hello @powlaa,

Thanks for providing this PR #66. @iurysza this looks exactly like it solves the issue described. Is there any chance to merge it in the upcoming week?

Thanks in advance

Haratsu avatar Sep 19 '25 09:09 Haratsu

@Haratsu , absolutely. Checking it out now.

iurysza avatar Sep 19 '25 09:09 iurysza