Skip to content

feat(lefthook): pick bun or pnpm from the lockfile in the shared site hooks - #119

Open
taraxvoid wants to merge 3 commits into
mainfrom
worktree-lefthook-pm-aware
Open

taraxvoid wants to merge 3 commits into
mainfrom
worktree-lefthook-pm-aware

Conversation

@taraxvoid

Copy link
Copy Markdown
Owner

The shared site hooks hardcoded bun run --if-present, which blocks the pnpm sites (rvnflt, voidsite) from adopting them. A top-level lefthook templates: entry pm resolves to pnpm when the repo has a pnpm-lock.yaml, else bun, and every command uses {pm} run --if-present. The install hints use {pm} install too.

Also fixes the header comment (ref is a tag or branch, not a SHA).

Tested as a file:// remote in throwaway repos: the bun repo runs bun run for each step, the pnpm repo (with a stub pnpm on PATH) runs pnpm run --if-present for each step. lefthook validate passes and the unit test now asserts the lockfile detection and that no bun run remains.

Note: bun run --if-present audit falls through to macOS's /usr/sbin/audit when a site defines no audit script. Pre-existing and harmless for sites that define one.

🤖 Generated with Claude Code

taraxvoid and others added 3 commits October 2, 2026 14:19
… hooks

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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