Skip to content

refactor(bun): replace npm role with bun for global packages - #50

Merged
frdmn merged 1 commit into
masterfrom
feature/replace-npm-with-bun
Oct 9, 2026
Merged

frdmn merged 1 commit into
masterfrom
feature/replace-npm-with-bun

Conversation

@frdmn

@frdmn frdmn commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Summary

Replaces the npm Ansible role with a bun role for installing global Node CLIs.

  • roles/npm → roles/bun: bun add --global --trust per package, idempotent via creates: ~/.bun/install/global/node_modules/<pkg> (same pattern as the uv role), plus a bun update --global upgrade task
  • npm_packages → bun_packages; dropped bower, giracli, init.js, added opencode-ai and playwright
  • bun added to brew_packages (replaces the curl installer)
  • zshenv: export BUN_INSTALL and add $BUN_INSTALL/bin to PATH
  • README updated

Why not pnpm

community.general.pnpm can't detect global installs on pnpm >= 11 (no global pnpm-lock.yaml anymore), so it reinstalls on every run. Without the module, bun is simpler: a stable global path makes creates: work, so no list/parse task is needed.

Notes

  • Node (nodejs in brew) is still required: the CLIs use #!/usr/bin/env node shebangs.
  • --trust lets packages with postinstall scripts (e.g. opencode-ai) run them; bun records them in the global trustedDependencies.

Test plan

  • yamllint . and ansible-lint pass
  • ansible-playbook dotfiles.yml --tags bun installs all packages; second run reports changed=0
  • opencode, json, playwright run from ~/.bun/bin

@frdmn
frdmn merged commit 3017501 into master Oct 9, 2026
3 checks passed
@frdmn
frdmn deleted the feature/replace-npm-with-bun branch October 9, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant