@ts-graphviz/common
Graphviz Types and Utilities
This package has a good security score with no known vulnerabilities.
Community Reviews
Solid type foundation for Graphviz work with excellent TypeScript support
The package is deliberately minimalist, focusing on shared types and utilities rather than being a full-featured library. This means you'll likely use it alongside other @ts-graphviz packages. Error messages are straightforward TypeScript errors, nothing custom, which is actually fine since the types are self-explanatory. Documentation could be more extensive with real-world examples, but the type definitions themselves are readable enough to understand usage.
One gotcha: versioning across the @ts-graphviz ecosystem matters. Make sure your related packages are compatible versions to avoid type mismatches. Overall, it does what it promises without surprises—a solid foundation for TypeScript Graphviz projects.
Best for: Projects needing type-safe Graphviz attribute handling in TypeScript, especially when building graph visualization tools or DSLs.
Avoid if: You need a complete graph rendering solution rather than just type definitions, or you're working in plain JavaScript without TypeScript.
Solid TypeScript types for Graphviz with minimal security surface
The library doesn't handle user input directly or make network calls, so the attack surface is minimal. Since it's primarily type definitions and simple utilities, there's limited room for injection vulnerabilities. However, when building Graphviz DOT strings with user input in consuming code, you're responsible for sanitization - the library provides no built-in escaping or validation helpers. Error handling is basic but predictable; TypeScript catches most issues at compile time.
Dependency footprint is lean with no transitive dependencies beyond TypeScript dev dependencies. The MIT license is permissive and straightforward. For what it does - providing type safety for Graphviz operations - it accomplishes the goal without introducing unnecessary complexity or security concerns.
Best for: Projects needing type-safe Graphviz DOT generation where you control input sources or handle sanitization separately.
Avoid if: You need built-in input validation and sanitization for untrusted user data in DOT string generation.
Solid type-safe foundation for Graphviz work with minimal security surface
The package follows secure-by-default principles well because it has such a limited scope. Input validation is straightforward - it deals with string manipulation for DOT language constructs, and the type system catches most misuse at compile time. Error handling is minimal but appropriate for a utility library; TypeScript's type guards do most of the heavy lifting. No sensitive information leakage in errors because there's no sensitive data being processed.
Dependency-wise, it's extremely light with minimal transitive dependencies, which significantly reduces supply chain risk. The maintainer has been responsive to issues and the codebase is small enough to audit yourself in an afternoon. For a package dealing with graph structure representations, it does exactly what it needs to without overreaching.
Best for: Projects needing type-safe Graphviz DOT language manipulation with minimal dependencies and clear security boundaries.
Avoid if: You need extensive runtime validation or are working in a pure JavaScript environment without TypeScript compilation.
Sign in to write a review
Sign In