Skip to content

bun

bun discovery, workspace install, and projen forwarding for the dbx-tools CLI.

bun honors a --registry <url> flag on bun install/bun add and a project .npmrc, but (like pnpm) ignores the npm_config_registry env var for its own resolution. So a custom registry is forced through TWO channels, each where it applies:

  • bunRegistryArgs passes --registry to the package-resolving subcommands (install/add/update), never to bun run/bunx, whose trailing args belong to the script.
  • childEnv keeps .npmrc-style env aliases set for any nested npm-based tool, and (critically) puts the bun/node executable dir on PATH so a lifecycle script can invoke the runtime by bare name.

@dbx-tools/core’s npmRegistry({ overrideOnly: true }) returns nothing when the effective registry IS npmjs, so none of this touches a default install.