fallow workspaces: inspect monorepo workspace discovery
List the monorepo workspaces that fallow discovers, with diagnostics for malformed package.json files, unmatched globs, and missing tsconfig references.
fallow workspaces shows the workspace packages that fallow discovers in a monorepo. It also shows the workspace-discovery diagnostics, for example a malformed package.json, a glob that matches no package, or a missing tsconfig reference.
The command is equal to fallow list --workspaces. Use it when you need only the workspace topology. The other list sections stay hidden.
fallow workspaces
fallow workspaces --format json
Output
The human output gives one line for each workspace, with its package name and its project-relative path:
Discovered 2 workspaces
@acme/api -> packages/api
@acme/web -> packages/web
The JSON output has kind: "list-workspaces":
{
"kind": "list-workspaces",
"workspace_count": 2,
"workspaces": [
{ "name": "@acme/api", "path": "packages/api", "is_internal_dependency": false },
{ "name": "@acme/web", "path": "packages/web", "is_internal_dependency": false }
],
"workspace_diagnostics": []
}
| Field | Meaning |
|---|---|
workspace_count | The number of discovered workspace packages. |
workspaces[].name | The name field of the package.json of the workspace. |
workspaces[].path | The directory of the workspace, relative to the project root. |
workspaces[].is_internal_dependency | true when another workspace of the project lists this package as a dependency. |
workspace_diagnostics | The discovery problems. Each entry has a kind. See Workspace diagnostics for every kind. |
A malformed root package.json stops the config load, and fallow exits with code 2. For all other problems, fallow prints a warning and continues with the remaining workspaces.
Options
fallow workspaces has no flags of its own. It accepts the global flags, for example --root, --config, --format (human or json), and --quiet.
To scope an analysis to some workspaces, pass --workspace <glob> or --changed-workspaces <ref> to the analysis command. See Workspaces.