diff --git a/docs/development.md b/docs/development.md index 08d4d93..a51b7dc 100644 --- a/docs/development.md +++ b/docs/development.md @@ -10,10 +10,9 @@ How to work on theme-toggle in a clone. The [contributing guide](contributing.md mise install pnpm install playwright install chromium # the browser the tests run in -lefthook install # the git hooks in lefthook.yml ``` -pnpm doesn't run lefthook's own install script, so the hooks need `lefthook install` once. After changing a version in `mise.toml`, run `mise lock` and commit both files. +`pnpm install` also installs the git hooks in `lefthook.yml`, because `pnpm-workspace.yaml` allows lefthook's install script. After changing a version in `mise.toml`, run `mise lock` and commit both files. ## Tasks diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 8e6e557..882cd32 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,3 +1,10 @@ +allowBuilds: + lefthook: true + +# lefthook's postinstall installs the git hooks, so it has to run on every install: +# with the side-effects cache on, a lefthook already built for another project skips it. +sideEffectsCache: false + # Supply-chain cooldown: malicious releases are usually pulled within 24h; pattern excludes need pnpm >= 10.17. minimumReleaseAge: 1440 minimumReleaseAgeExclude: