Repository navigation
refactor(bun): replace npm role with bun for global packages - #50
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the
npmAnsible role with abunrole for installing global Node CLIs.roles/npm→roles/bun:bun add --global --trustper package, idempotent viacreates: ~/.bun/install/global/node_modules/<pkg>(same pattern as theuvrole), plus abun update --globalupgrade tasknpm_packages→bun_packages; droppedbower,giracli,init.js, addedopencode-aiandplaywrightbunadded tobrew_packages(replaces the curl installer)zshenv: exportBUN_INSTALLand add$BUN_INSTALL/bintoPATHWhy not pnpm
community.general.pnpmcan't detect global installs on pnpm >= 11 (no globalpnpm-lock.yamlanymore), so it reinstalls on every run. Without the module, bun is simpler: a stable global path makescreates:work, so no list/parse task is needed.Notes
nodejsin brew) is still required: the CLIs use#!/usr/bin/env nodeshebangs.--trustlets packages with postinstall scripts (e.g.opencode-ai) run them; bun records them in the globaltrustedDependencies.Test plan
yamllint .andansible-lintpassansible-playbook dotfiles.yml --tags buninstalls all packages; second run reportschanged=0opencode,json,playwrightrun from~/.bun/bin