bun-updater
v0.0.9
Published
> A simple and interactive way to update bun dependencies
Downloads
4
Readme
bun-updater
A simple and interactive way to update bun dependencies
Goal
The goal of this package is to provide an interactive way to update dependencies (mono or single repo) using bun.
Both pnpm and yarn already have this command (pnpm up -i
or yarn update-interactive
) but unfortunately, bun doesn't (yet). So, this CLI aims to temporarily solve this problem until it becomes native in Bun CLI.
See https://github.com/oven-sh/bun/issues/4895.
Usage
In my tests, it works better if you install it as a global dependency over bunx
. I've encountered some terminal UI bugs with bunx
.
So,
bun add --global bun-updater
Once it finishes, in the repository you want to update the dependencies:
bun-updater
This will trigger the CLI, and you just need to follow the prompts.
FAQ
This is probably because you don't have bun bin folder listed in your PATH.
To check if you do, run:
bun pm -g bin
If it gives a warn saying not in $PATH
, you have to add it into your terminal config file (.zshrc
, .bash_profile
, .bashrc
,etc.):
# rest of your config
export BUN_INSTALL=$(bun pm -g bin)
export PATH="$BUN_INSTALL:$PATH"
Contributing
Install the dependencies:
bun install
Then you can run
bun run dev
This will trigger the CLI to scan the current repository.
To test in the "examples" folder, you can navigate inside either the monorepo
or the singlerepo
folders:
cd examples/monorepo
Then, you can invoke the CLI script from the monorepo folder:
bun ../../src/cli.ts
This will ensure that process.cwd()
is in the correct place.