bun Verified current stable Not installed? Package Management

Bun / Show Outdated Dependencies Workspace

Show Outdated Dependencies Workspace

Show outdated dependencies specifically for a workspace based on pattern.

$
Terminal
bun outdated -F "<workspace_pattern>"

When To Use

When managing multi-package repositories and needing to assess specific workspaces.

Pro Tip

Leverage the `--ignore-lockfile` for situations where the workspace needs unblocked updates.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
bun outdated -F "<workspace_pattern>"

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
┌─────────┬───────────┬─────────┐
│ Package │ Current   │ Latest  │
├─────────┼───────────┼─────────┤
│ react   │ 17.0.2   │ 18.0.0 │
│ cors    │ 2.8.5    │ 2.9.0  │
└─────────┴───────────┴─────────┘
   2 outdated dependencies found in workspace.

Anatomy of Output

Understanding the result

Checking outdated packages in workspaces: workspace/* Workspace Check

Indicates the basename of the workspaces being scanned.

Outdated dependencies found: 2. Result Count

Indicates the total number of outdated packages across specified workspaces.

Details: Package: react, Current: 17.0.0, Latest: 17.0.2 Detailed Output

Displays information on the outdated package found.

Power User Variants

Optimized versions

bun outdated -F 'workspace/*'

Forces updates even amidst conflicts.

bun outdated --json 'workspace/*'

Output results in JSON format for automation.

bun outdated 'packages/react'

Check a specific package within the workspace.

Troubleshooting

Common pitfalls

Error: No directories match the workspace pattern

Solution: Double-check the workspace pattern for correctness.

Error: Permission denied to access workspace

Solution: Ensure your user has adequate permissions to the workspace directories.

Error: Multiple versions of dependency found

Solution: Run 'bun bun install' to clean up and resolve versioning issues.

Command Breakdown

What each part is doing

bun
Base Command
The executable that performs this operation. Here it runs Bun before the shell applies any redirect operators.
-F
F| filter
The value supplied for F| filter.
<workspace_pattern>
workspace pattern
The value supplied for workspace pattern.
-F
Command Option
Tool-specific option used by this command invocation.

How To Run

Execution path

  1. Step 1

    Run the command: bun outdated --filter "my-workspace"

  2. Step 2

    Check the output for outdated dependencies listed along with their versions.

Alternative Approaches

Comparable commands in other tools

Alternative package management tools for the same job.