Repository navigation
chore: let pnpm run lefthook's install script - #23
Merged
Merged
Conversation
pnpm 10 blocks dependency build scripts by default, so a fresh clone got no git hooks from `pnpm install`. Allow lefthook's with `allowBuilds`, the setting pnpm 10.26+ prefers and the one pnpm 11 keeps, and turn off the side-effects cache so a lefthook already built for another project still runs its postinstall. The development guide drops the manual `lefthook install` step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VFY4xrjKujVz6rsni1MJPm
|
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
pnpm 10 blocks dependency build scripts by default, so
pnpm installskipped lefthook's postinstall and a fresh clone had no git hooks.allowBuildsrather than the vland templates'onlyBuiltDependencies: the repo pins pnpm 10.30.3,allowBuildsis the preferred setting from 10.26, and pnpm 11 ignoresonlyBuiltDependencies.sideEffectsCache: falsefollows the templates. Without it, a second clone on the same machine reuses the build from the store and skips the postinstall (see the control run below).docs/development.mddrops the manuallefthook installstep.No changeset: the published package is unchanged.
Evidence
Each run is a fresh
git clonefollowed bypnpm install --frozen-lockfilewith pnpm 10.30.3 and Node 24.main):allowBuildsonly, cache on, isolated store):Merge Danger
Door: two-way
Revert the commit to go back to installing the hooks by hand.
Blast Radius: contributors
pnpm installnow runslefthook install -f, which overwrites any hand-madepre-commitorpre-pushhook in.git/hooks.CIis set.sideEffectsCache: false, pnpm rebuilds dependencies that have build scripts on every install instead of reusing them from the store. lefthook is the only one that is allowed to build.🤖 Generated with Claude Code
https://claude.ai/code/session_01VFY4xrjKujVz6rsni1MJPm