listWorkspacePackagesSync
listWorkspacePackagesSync(
repoRoot,options?):WorkspacePackageEntry[]
Defined in: list-workspace-packages.ts:55
Every package directly under the workspace roots of repoRoot that has a
readable package.json holding a JSON object — roots in the order given,
packages within a root sorted by directory name. A missing root, and a
directory without a usable manifest, contribute nothing.
Nothing is filtered by name, version or private: that is the caller’s
call (publishing wants public packages, version bumping wants all of them).
repoRoot is resolved against the working directory, so dir is always
absolute. A root that is absolute or climbs out of repoRoot throws a
TypeError, and so does any listing error other than “not there”
(ENOENT/ENOTDIR). A single-package repo has no roots; read its root manifest with
readPackageJson instead.
Parameters
Section titled “Parameters”repoRoot
Section titled “repoRoot”string
options?
Section titled “options?”ListWorkspacePackagesOptions = {}
Returns
Section titled “Returns”Example
Section titled “Example”import { listWorkspacePackagesSync } from "@theholocron/pkg-utils";
const publishable = listWorkspacePackagesSync(repoRoot).filter((p) => !p.manifest.private && p.name);