fast-fs-hash - v0.0.2
    Preparing search index...

    Function findNearestProjectFiles

    • Walk the parent chain from startPath and locate the NEAREST occurrence of package.json, tsconfig.json, and node_modules/. The walk exits as soon as all three are found (no gitRoot boundary, no root* fields). Faster than findProjectRoot when callers only need the nearest markers.

      The walk stops at the filesystem root, at the user's home directory (or any ancestor of it), at stopPath (same rule — if provided), and at a depth cap of 128. Tolerant of missing paths and stat errors — missing fields are null rather than throwing.

      Runs asynchronously on the compute thread pool.

      Parameters

      • startPath: string

        Starting path — may be a file or a directory.

      • OptionalstopPath: string

        Optional directory — if the walker reaches this path (or any strict ancestor of it), the walk stops without probing.

      Returns Promise<NearestProjectFiles>