Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support bun install --filter <pattern> #16093

Merged
merged 12 commits into from
Jan 4, 2025
Merged

Conversation

dylan-conway
Copy link
Member

@dylan-conway dylan-conway commented Jan 1, 2025

What does this PR do?

This allows bun install to install packages only for the matching patterns provided to --filter.

# Install dependencies for all workspaces with names starting with `frontend-`
$ bun install --filter "frontend-*"

closes #15948

How did you verify your code works?

tests:

  • patterns with !
  • no matching workspaces
  • only root package, no workspaces
  • matched workspace pulling in filtered workspace
  • workspace path filters

@robobun
Copy link

robobun commented Jan 1, 2025

Updated 6:14 PM PT - Jan 3rd, 2025

@dylan-conway, your commit cb860d2 has 1 failures in #8912:


🧪   try this PR locally:

bunx bun-pr 16093

@ghiscoding
Copy link

ghiscoding commented Jan 1, 2025

Not sure about this flag name. In the future bun add <package> --filter will add the package to each matching workspace, making bun install <package> --filter confusing.

seems like an ok flag since that is exactly what pnpm offers via their pnpm install --filter. I would think that offering the same kind of filters as to what pnpm already provides today seems like a good fit for most use cases

@dylan-conway dylan-conway marked this pull request as ready for review January 3, 2025 17:00
@dylan-conway dylan-conway marked this pull request as draft January 3, 2025 17:08
@kravetsone
Copy link

Looks related with #15735
Cool

@dylan-conway dylan-conway marked this pull request as ready for review January 3, 2025 21:14
@Jarred-Sumner Jarred-Sumner merged commit 2043613 into main Jan 4, 2025
64 of 67 checks passed
@Jarred-Sumner Jarred-Sumner deleted the dylan/filter-install branch January 4, 2025 02:39
probably-neb pushed a commit to probably-neb/bun that referenced this pull request Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow restricting bun install to specific packages in a workspace
5 participants