Skip to content

Pin Node 22 with strict engines, harden mermaid subgraph IDs#2

Merged
aliasunder merged 2 commits into
mainfrom
claude/fix-diagram-node-version-BBJ1R
May 6, 2026
Merged

Pin Node 22 with strict engines, harden mermaid subgraph IDs#2
aliasunder merged 2 commits into
mainfrom
claude/fix-diagram-node-version-BBJ1R

Conversation

@aliasunder

@aliasunder aliasunder commented May 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Pin Node 22 (strict): added .nvmrc (22, matches node:22-alpine in the Dockerfile), engines.node range >=22.0.0 <23.0.0 in package.json, and .npmrc with engine-strict=true so npm install refuses on a mismatched runtime.
  • Defensive mermaid IDs: gave each subgraph an explicit ID (devices, cloud, apigw_grp, lightsail, compose, phase2, clients) so the parser never has to derive an ID from a quoted title containing em-dashes, $, or spaces. Display labels (em-dashes, $12/mo, port spacing) are unchanged.

Note: the original diagram does render on github.com web — GitHub mobile just doesn't render mermaid at all, which is what made it look broken. No content fix was needed for the diagram itself.

Test plan

  • Pull the branch, run nvm use and confirm Node 22 is selected from .nvmrc.
  • Run npm install on Node 22 and confirm it succeeds; on a non-22 Node, confirm it fails with an engine error (engine-strict=true).
  • Open ARCHITECTURE.md on github.com web and confirm the Component Diagram still renders identically.

https://claude.ai/code/session_01AwruPBZ3J96q7AMtvKKa82


Generated by Claude Code

claude added 2 commits May 5, 2026 23:54
Mermaid subgraphs used em-dashes and "$" in implicit IDs, which broke
GitHub's parser and showed the diagram as raw code. Rewrote subgraphs
with explicit IDs and ASCII-only display labels.

Pinned Node to 22 via .nvmrc (matching the Dockerfile) and added a
strict engines range with engine-strict=true so npm refuses installs
on mismatched versions.
The diagram was rendering correctly on github.com web all along —
GitHub mobile just doesn't render mermaid. Keeping the explicit
subgraph IDs (defensive, no visual impact) but restoring em-dashes,
$12/mo, and the original port spacing.
@aliasunder
aliasunder merged commit 7fe44b2 into main May 6, 2026
@aliasunder
aliasunder deleted the claude/fix-diagram-node-version-BBJ1R branch May 6, 2026 17:12
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.

2 participants