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

load local bunfig.toml for bun run earlier (for run.bun option) #16664

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

RiskyMH
Copy link
Member

@RiskyMH RiskyMH commented Jan 23, 2025

Alternative to #15596 where it now only impacts bun run for the same cwd dir. This does not effect bunx (even though according to code it should load it), and isnt as fancy as bun install where it ensures to check the bunfig in package.json dir.

This shouldn't have any performance issues because its already loading the file, but now its loading earlier so it can use run.bun option.

Fixes #11445, (as well as fixes #15484, fixes #15483)

@robobun
Copy link

robobun commented Jan 23, 2025

Updated 11:07 PM PT - Jan 23rd, 2025

@RiskyMH, your commit 13fe91c has 2 failures in #10441:


🧪   try this PR locally:

bunx bun-pr 16664

@RiskyMH RiskyMH changed the title load local bunfig.toml for bun run load local bunfig.toml for bun run (for run.bun option) Jan 23, 2025
@RiskyMH RiskyMH changed the title load local bunfig.toml for bun run (for run.bun option) load local bunfig.toml for bun run earlier (for run.bun option) Jan 23, 2025
@pfgithub
Copy link
Contributor

Should add a test that shows what this affects and makes sure it doesn't regress

@RiskyMH
Copy link
Member Author

RiskyMH commented Jan 24, 2025

Should add a test that shows what this affects and makes sure it doesn't regress

Done, I think my 3 cases should be appropriate:

  • loads the config on same cwd
  • doesn't load it in sub dir, even though its next to package.json
  • doesn't load global

The second one could in theory be changed, but I am trying not have any perf change this time (and be minimal changes). bun install is an example of command that does read on same dir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants