pub fn trace_dependency(
graph: &ModuleGraph,
root: &Path,
package_name: &str,
script_used_packages: &FxHashSet<String>,
) -> DependencyTraceExpand description
Trace where a dependency is used.
script_used_packages carries the package names recorded as binary invocations
in package.json scripts (build: microbundle ...) and CI configs
(.github/workflows/*.yml, .gitlab-ci.yml). The same set the unused-deps
detector consults; passing it in lets the trace output match the detector’s
view of “used” instead of reporting is_used=false for tools invoked only
through scripts.