bun-updater v0.0.9
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-updaterOnce it finishes, in the repository you want to update the dependencies:
bun-updaterThis 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 binIf 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 installThen you can run
bun run devThis 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/monorepoThen, you can invoke the CLI script from the monorepo folder:
bun ../../src/cli.tsThis will ensure that process.cwd() is in the correct place.