Function findWorkspacePath

  • Find the path for a particular package name from an array of info about packages ("workspaces" in npm/yarn/pnpm terms) within a monorepo.

    Parameters

    • workspaces: WorkspaceInfos

      Array of info about packages within a monorepo

    • packageName: string

      Package name to find

    Returns string | undefined

    Package path if found, or undefined