Skip to content

fix: replace abandoned graphviz-react with direct d3-graphviz wrapper#107

Open
wrigjl wants to merge 1 commit into
ReduxISU:ReduxAPI_GUIfrom
wrigjl:fix/replace-graphviz-react
Open

fix: replace abandoned graphviz-react with direct d3-graphviz wrapper#107
wrigjl wants to merge 1 commit into
ReduxISU:ReduxAPI_GUIfrom
wrigjl:fix/replace-graphviz-react

Conversation

@wrigjl

@wrigjl wrigjl commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Closes #92

Summary

  • Adds a thin GraphvizWrapper component (~15 lines) using useEffect + a div ref against d3-graphviz directly
  • Replaces the graphviz-react dynamic import in Graphvisualization.js with the new wrapper — same dot + options prop API, no call-site changes
  • Removes graphviz-react from package.json, dropping 15 packages and eliminating all 6 high-severity CVEs (ReDoS in d3-color and related transitive deps)

Before: 8 vulnerabilities (6 high, 2 moderate)
After: 2 moderate (unfixable postcss issue inside Next.js itself)

Test plan

  • Verify build passes on merge to ReduxAPI_GUI
  • Verify graphviz visualization renders correctly at runtime

🤖 Generated with Claude Code

graphviz-react has been unmaintained since Oct 2022 and vendors its own
ancient d3-graphviz@^2.6.1, causing 6 high-severity CVEs (ReDoS in
d3-color and related transitive deps). We already had d3-graphviz@^5.6.0
in package.json, so this replaces it with a thin useEffect/ref wrapper
and drops graphviz-react entirely. Resolves ReduxISU#92.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

Replace graphviz-react with a direct d3-graphviz wrapper (abandoned package, vulnerable deps)

1 participant