Skip to main content

Crate chainsaw

Crate chainsaw 

Source
Expand description

Build and query dependency graphs for TypeScript/JavaScript and Python codebases.

Chainsaw parses import statements, resolves them against the filesystem, and constructs a full transitive dependency graph from any entry file. The graph can then be queried for total import weight, heaviest packages, shortest import chains, optimal cut points, and before/after diffs.

This library backs the chainsaw CLI. The public API is internal and unstable – it exists so benchmarks and tests can access internals.

Modules§

cache
Three-tier disk cache for dependency graphs.
error
Error types for the chainsaw CLI.
git
Git integration for ref-based diffs.
graph
Dependency graph data structures.
lang
Language-specific parsing and resolution behind a common trait.
loader
Entry point for building or loading a cached dependency graph.
query
Graph queries: trace weight, import chains, cut points, and diffs.
report
Human-readable output formatting for trace results, diffs, and package lists.
walker
Concurrent dependency graph construction.