Function getWorkspacesAsync

  • Get an array with names, paths, and package.json contents for each package ("workspace" in npm/yarn/pnpm terms) within a monorepo. The list of included packages is based on the workspace manager's config file.

    NOTE: As of writing, this will start promises to read all package.json files in parallel, without direct concurrency control.

    Parameters

    • cwd: string

    Returns Promise<WorkspaceInfos>