extractPackageUsage
extractPackageUsage(
graph,storyFiles,packages):PackageUsage[]
Defined in: usage.ts:103
Find which tracked dependency packages each story reaches through its import graph. Traversal stops at a package boundary (its internals are not walked) and records only the shallowest module per package, so a story yields at most one row per package.
Parameters
Section titled “Parameters”Bidirectional module graph from the build’s stats file.
storyFiles
Section titled “storyFiles”readonly string[]
Story import paths from the Storybook index.
packages
Section titled “packages”Record<string, TrackedPackage>
Packages to track (e.g. the project’s declared dependencies).