endo
endo copied to clipboard
mermaid dep graph script improvements
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