Skip to content

@saflib/imports


Function: findPath()

findPath(entryPath, target, options): FindPathResult

BFS for the shortest import path from entryPath to target.

target may be a workspace file path, workspace package name, or external package root (e.g. stripe).

Parameters

ParameterType
entryPathstring
targetstring
optionsMeasureGraphOptions

Returns

FindPathResult