endo icon indicating copy to clipboard operation
endo copied to clipboard

mermaid dep graph script improvements

Open boneskull opened this issue 6 months ago • 0 comments

This updates the mermaid-deptree script to include the state of a package as a production, development, optional, peer, or optional-peer dependency via link styling and text.

The output now also:

  • wraps the output in a Markdown fenced code block
  • includes front-matter config for appropriate styling
  • includes a word-wrapping fix

Example output:

---
config:
  themeVariables:
    fontFamily: "Fira Mono,Menlo,Consolas,Liberation Mono,monospace"
---
graph TD
  webpackish-app--> |"`_dev_`"| jorts-folder
  webpackish-app--> |"`_dev_`"| pantspack
  jorts-folder--- |"`_peer_`"| pantspack
  pantspack==> pantspack-folder-runner
classDef default white-space:nowrap

Also updates the README.md for the fixtures-dynamic-ancestor in @endo/compartment-mapper with a generated graph.

I guess there's no example of "optional peer" in that example. oops

boneskull avatar Aug 01 '25 22:08 boneskull