Skip to content

add catalog support to bun (outdated|update -i) and --filter to bun update -i - #21482

Merged
Jarred-Sumner merged 17 commits into
mainfrom
riskymh/update-outdated-updates
Aug 5, 2025
Merged

Jarred-Sumner merged 17 commits into
mainfrom
riskymh/update-outdated-updates

Conversation

@RiskyMH

@RiskyMH RiskyMH commented Jul 30, 2025 •

Copy link
Copy Markdown
Contributor

What does this PR do?

  • bun update --filter="*" : Filtering support like outdated
  • bun update -r or bun outdated -r : All workspaces like pnpm
  • bun update --interactive --filter=*: A "Workspace" column shows which workspace each dependency belongs to
  • bun update -r or bun outdated -r (many workspaces selected): Uses the workspace column to group catalog dependencies to reduce noise

note: needs more testing + code needs to be looked more over as potentially breaking other things

How did you verify your code works?

manual testing as hard to make tests for the --interactive. but needs more testing

@RiskyMH RiskyMH changed the title add catalog support to bun (update|outdated) and --filter to bun ipdate add catalog support to bun (update|outdated) and --filter to bun update Jul 30, 2025
@robobun

robobun commented Jul 30, 2025 •

Copy link
Copy Markdown
Collaborator
Updated 5:31 AM PT - Aug 5th, 2025

❌ @RiskyMH, your commit cccb037 has 4 failures in Build #22233:


🧪   To try this PR locally:

bunx bun-pr 21482

That installs a local version of the PR into your bun-21482 executable, so you can run:

bun-21482 --bun

@RiskyMH
RiskyMH marked this pull request as draft July 30, 2025 08:12
@RiskyMH RiskyMH changed the title add catalog support to bun (update|outdated) and --filter to bun update add catalog support to bun (update|outdated) and --filter to bun update -i Aug 2, 2025
@RiskyMH RiskyMH changed the title add catalog support to bun (update|outdated) and --filter to bun update -i add catalog support to bun (outdated|update -i) and --filter to bun update -i Aug 2, 2025
@Zamiell

Zamiell commented Aug 4, 2025

Copy link
Copy Markdown

Amazing PR, thanks so much Risky!

@RiskyMH
RiskyMH requested a review from dylan-conway August 5, 2025 11:48
@RiskyMH
RiskyMH marked this pull request as ready for review August 5, 2025 11:48
@RiskyMH

RiskyMH commented Aug 5, 2025 •

Copy link
Copy Markdown
Contributor Author

This is still a little weird code that I personally dont like too much, but its the simplest way that I could find to integrate with bun still (the dealing with many workspaces and catalogs isn't very simple with current structs and didn't want to do a major refactor rn)

Also I believe lots of the tests are duplicates.

@Jarred-Sumner
Jarred-Sumner merged commit 806d6c1 into main Aug 5, 2025
@Jarred-Sumner
Jarred-Sumner deleted the riskymh/update-outdated-updates branch August 5, 2025 12:12
charpeni added a commit to charpeni/bun that referenced this pull request May 20, 2026
`-r, --recursive` is already advertised on `bun update` (from oven-sh#21482) with
the meaning "Update packages in all workspaces" — the workspace-iteration
semantics tracked as oven-sh#23507. Although no consumer reads it on `bun update`
today, repurposing the same flag for transitive recursion would conflict
with that intent and with `bun outdated --recursive` / `bun remove
--recursive` which already implement workspace iteration.

Introduce a dedicated `-t, --transitive` flag for the transitive
CVE-remediation behavior. Restore the original `--recursive` help text on
`bun update` so it remains aligned with the rest of Bun's CLI vocabulary
and with oven-sh#23507's eventual implementation.

This means Bun's `--transitive` corresponds to Yarn's `yarn up --recursive`
(transitive recursion), while Bun's `--recursive` corresponds to pnpm's
`pnpm update --recursive` (workspace iteration). Documented in docs/pm/cli/
update.mdx.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants