Skip to content

Quality of life: Auto-run bun install when git pull or git merge is run locally#129

Merged
laurynas-karvelis-guardian merged 2 commits into
mainfrom
chore/add-bun-install-post-merge-hook
Jul 23, 2026
Merged

Quality of life: Auto-run bun install when git pull or git merge is run locally#129
laurynas-karvelis-guardian merged 2 commits into
mainfrom
chore/add-bun-install-post-merge-hook

Conversation

@laurynas-karvelis-guardian

@laurynas-karvelis-guardian laurynas-karvelis-guardian commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

What does this change?

This PR adds a quality-of-life post-merge hook that informs user if there are any changes on bun.lock or **/package.json from git pull or git merge so developer is reminded to run bun install if they choose so.

How has this change been tested?

How can we measure success?

Better overall DevX.

Have we considered potential risks?

Images

Accessibility

@laurynas-karvelis-guardian
laurynas-karvelis-guardian requested a review from a team as a code owner July 23, 2026 13:26
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

@laurynas-karvelis-guardian laurynas-karvelis-guardian changed the title Quality of life: Auto-run bun install when git pull or git merge Quality of life: Auto-run bun install when git pull or git merge is run locally Jul 23, 2026
Comment thread lefthook.yml Outdated
commands:
install:
glob: '{bun.lock,**/package.json}'
run: bun install

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having considered this, I would actually prefer a little prompt in the terminal, something like:

Suggested change
run: bun install
run: echo "Dependencies have changed, please run \"bun install\""

I think this would strike a nice balance between developers not being caught out by errors caused by old dependencies, but it would also avoid being annoying if a developer is switching between a couple of branches on the fly but not actually running anything.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting suggestion. My question is: are we going to read this message though?

Going with bun install and switching between branches will guarantee all deps will be present before running any workspace app tho.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I take the point that it could be easily ignored. Could use colours to make it more noticeable?

e.g.

echo  "\033[0;31mDependencies have changed, please run \"bun install\""

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated via printf so it works across various shells.

@laurynas-karvelis-guardian
laurynas-karvelis-guardian merged commit 82a977b into main Jul 23, 2026
4 checks passed
@laurynas-karvelis-guardian
laurynas-karvelis-guardian deleted the chore/add-bun-install-post-merge-hook branch July 23, 2026 14:24
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.

3 participants