Builds and analyzes dependency relationships between markdown files.
The DependencyGraph tracks file relationships through links, references, and imports to enable
intelligent file operations. It supports cycle detection, topological sorting, impact analysis,
and dependency-aware ordering for operations like joining and splitting.
Example
Building a dependency graph
constgraph = newDependencyGraph();
// Add files to the graph awaitgraph.addFile('intro.md'); awaitgraph.addFile('setup.md'); awaitgraph.addFile('usage.md');
// Check for circular dependencies constcycles = graph.detectCycles(); if (cycles.length > 0) { console.warn('Circular dependencies detected'); }
Example
Impact analysis
constgraph = newDependencyGraph(parsedFiles);
// Find all files affected by changing api.md constimpacted = graph.getImpactedFiles('api.md'); console.log(`${impacted.length} files will be affected`);
Builds and analyzes dependency relationships between markdown files.
The DependencyGraph tracks file relationships through links, references, and imports to enable intelligent file operations. It supports cycle detection, topological sorting, impact analysis, and dependency-aware ordering for operations like joining and splitting.
Example
Building a dependency graph
Example
Impact analysis