Closed long-woo closed 4 days ago
This feature is really nice if you have a big monorepo with lots of separate projects, installing only a subset of dependencies can help with making builds faster and artifacts smaller
Related to #5207
We can support both.
If you don't have a need to wildcard package names, you can first use bun run --cwd packages/abc build
If you don't have a need to wildcard package names, you can first use
bun run --cwd packages/abc build
Life saver thanks! 🔥🐰🍞☺️🤝
If you don't have a need to wildcard package names, you can first use
bun run --cwd packages/abc build
Thanks! I also encountered the same error if I needed to run multiple packages at once and this is how I modified it
example with yarn: yarn run build --filter=packages/**
with bun: bun run --cwd packages build
I have three http servers in separate subdirectories and when I want to run the dev
script (bun run index.ts
) on all of them with bun --filter './src/*' dev
it hangs as follows. Any idea what is wrong here?
Reproduce this as follows:
test/a/index.ts
with the simple web server from https://bun.sh/guides/http/simpletest/b/index.ts
with the simple web server from https://bun.sh/guides/http/simple and change the port to 3001test/a/package.json
with {"scripts":{"dev":"bun run index.ts"}}
test/b/package.json
with {"scripts":{"dev":"bun run index.ts"}}
cd test && bun --filter './*' dev
Result:
it would be cool to have this also for the install
command, like in pnpm
Anybody else get this?
> bun --filter './app/*' dev
error: Module not found "./app/*"
> bun --filter '*' build
error: Script not found "*"
Anybody else get this?
> bun --filter './app/*' dev error: Module not found "./app/*" > bun --filter '*' build error: Script not found "*"
Same here, always got Script not found error
Anybody else get this?
> bun --filter './app/*' dev error: Module not found "./app/*" > bun --filter '*' build error: Script not found "*"
Make sure you are using the latest Bun version v1.1.10. I was on v1.0.36 and had the same issue. $ bun upgrade
Support for bun run --filter
was added in Bun v1.1.10. The current version of Bun is Bun v1.1.26.
If you run into issues with bun run --filter
, please file an issue and we will fix it
What is the problem this feature would solve?
This is a cool project, I’m about to try it out in my project, thanks!
I hope to support
--filter
similar topnpm
, which is quite practical inworkspace
type projects.https://pnpm.io/filtering
What is the feature you are proposing to solve the problem?
Select the package through it, such as:
What alternatives have you considered?
No response