Using with Workspaces

npm-check-updates supports monorepos that use npm, yarn, or pnpm workspaces.

Checking All Workspaces

To run ncu on all packages defined in your workspaces configuration, use the --workspaces (or -ws) flag.

By default, this also includes the root package.json.

ncu --workspaces

To exclude the root package.json and only check packages in the workspaces, combine it with --no-root.

ncu --workspaces --no-root

Checking a Specific Workspace

If you only want to check a single workspace package, use the --workspace (or -w) flag followed by the package name.

# Check the 'package-a' workspace and the root package.json
ncu --workspace package-a

# Check only the 'package-a' workspace
ncu --workspace package-a --no-root

You can specify --workspace multiple times to check a subset of workspaces.

ncu --workspace package-a --workspace package-b

This will check package-a, package-b, and the root package.json.