Quality of life: Auto-run bun install when git pull or git merge is run locally#129
Conversation
| commands: | ||
| install: | ||
| glob: '{bun.lock,**/package.json}' | ||
| run: bun install |
There was a problem hiding this comment.
Having considered this, I would actually prefer a little prompt in the terminal, something like:
| 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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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\""There was a problem hiding this comment.
Updated via printf so it works across various shells.
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 pullorgit mergeso developer is reminded to runbun installif they choose so.How has this change been tested?
How can we measure success?
Better overall DevX.
Have we considered potential risks?
Images
Accessibility