docs: add architecture page with mermaid diagrams - #321
Merged
Merged
Conversation
Upgrade VitePress within the 2.x alpha line (alpha.17 -> alpha.20) instead of downgrading to the "stable" 1.6.4: 1.6.4 pins a bundled Vite (<=6.4.2) with a high-severity path-traversal CVE that has no fix in the 1.x line, while 2.x bundles Vite 7/8. Also resolves the 5 pre-existing npm audit vulnerabilities (vitest/nanoid/postcss/ undici transitive bumps via `npm audit fix`). Add mermaid diagram rendering to the docs site. vitepress-plugin- mermaid only supports VitePress ^1.0.0 (peer dependency), so wire it up directly instead: a markdown-it fence override for ```mermaid blocks (config.mts) and a client-side renderer hook (theme/index.ts) using VitePress 2.x's router.onAfterRouteChange (renamed from onAfterRouteChanged in 1.x). Picked mermaid@11.17.2 over the just released 12.0.0, which pulls a vulnerable chevrotain/lodash-es. Move the three diagrams out of README.md into a new docs/architecture.md page (added to the sidebar under Advanced and as a homepage feature card), and replace them in the README with a Quick Links entry.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/architecture.mdpage, replacing the inline diagrams originally added to the README. Linked from the sidebar (Advanced), the homepage feature cards, and the README's Quick Links.2.0.0-alpha.17->2.0.0-alpha.20. Also evaluated downgrading to stable1.6.4, but that pins a bundled Vite (<=6.4.2) with a high-severity path-traversal CVE with no fix in the 1.x line -- staying on the 2.x alpha line and bumping is the safer option.npm auditvulnerabilities (transitive vitest/nanoid/postcss/undici bumps).vitepress-plugin-mermaidonly supports VitePress^1.0.0(its own peer dependency), so this wires it up directly instead: a markdown-it fence override for fenced mermaid code blocks plus a client-side renderer hook using VitePress 2.x'srouter.onAfterRouteChange(renamed fromonAfterRouteChangedin 1.x). Usesmermaid@11.17.2rather than the just-released12.0.0, which currently pulls a vulnerablechevrotain/lodash-es.Test plan
npm run test:js-- 232/232 passnpm run docs:build-- succeeds,architecture.htmlrenders with all 3 diagram blocksnpm audit-- 0 vulnerabilitiesnpm run docs:dev