WS-3 session 1a Task 1.
Lefthook installed as root dev-dependency with postinstall = lefthook
install. The two hand-rolled scripts in .githooks/ (post-commit,
pre-push) are dispatched 1:1 from lefthook.yml: each lefthook command
shells out to the existing .githooks/<hook> script. The script bodies
are kept as the source of truth because the bash logic (merge-commit
detection, .claude-sync.conf parsing, non-blocking pre-push warning)
would be lossy to translate into a YAML run: | block.
Active hook path moved from .githooks/ to .git/hooks/ via lefthook
install (core.hooksPath unset, git falls back to its default). The
.githooks/ directory is preserved and now documented as the
implementation invoked by lefthook plus an emergency rollback target
(README added).
Smoke-tested locally: the post-commit hook fires on every commit
(verified by reverted test commit). The pre-push hook fires on every
real push with new commits — manual `lefthook run pre-push` requires
`--force` because lefthook v2 skips when {push_files} is empty (see
lefthook.yml comment).
115 lines
3.1 KiB
YAML
115 lines
3.1 KiB
YAML
lockfileVersion: '9.0'
|
|
|
|
settings:
|
|
autoInstallPeers: true
|
|
excludeLinksFromLockfile: false
|
|
|
|
importers:
|
|
|
|
.:
|
|
devDependencies:
|
|
lefthook:
|
|
specifier: ^2.1.6
|
|
version: 2.1.6
|
|
|
|
packages:
|
|
|
|
lefthook-darwin-arm64@2.1.6:
|
|
resolution: {integrity: sha512-hyB7eeiX78BS66f70byTJacDLC/xV1vgMv9n+idFUsrM7J3Udd/ag9Ag5NP3t0eN0EqQqAtrNnt35EH01lxnRQ==}
|
|
cpu: [arm64]
|
|
os: [darwin]
|
|
|
|
lefthook-darwin-x64@2.1.6:
|
|
resolution: {integrity: sha512-5Ka6cFxiH83krt+OMRQtmS6zqoZR5SLXSudLjTbZA1c3ZqF0+dqkeb4XcB6plx6WR0GFizabuc6Bi3iXPIe1eQ==}
|
|
cpu: [x64]
|
|
os: [darwin]
|
|
|
|
lefthook-freebsd-arm64@2.1.6:
|
|
resolution: {integrity: sha512-VswyOg5CVN3rMaOJ2HtnkltiMKgFHW/wouWxXsV8RxSa4tgWOKxM0EmSXi8qc2jX+LRga6B0uOY6toXS01zWxA==}
|
|
cpu: [arm64]
|
|
os: [freebsd]
|
|
|
|
lefthook-freebsd-x64@2.1.6:
|
|
resolution: {integrity: sha512-vXsCUFYuVwrVWwcypB7Zt2Hf+5pl1V1la7ZfvGYZaTRURu0zF/XUnMF/nOz/PebGv0f4x/iOWXWwP7E42xRWsg==}
|
|
cpu: [x64]
|
|
os: [freebsd]
|
|
|
|
lefthook-linux-arm64@2.1.6:
|
|
resolution: {integrity: sha512-WDJiQhJdZOvKORZd+kF/ms2l6NSsXzdA9ahflyr65V90AC4jES223W8VtEMbGPUtHuGWMEZ/v/XvwlWv0Ioz9g==}
|
|
cpu: [arm64]
|
|
os: [linux]
|
|
|
|
lefthook-linux-x64@2.1.6:
|
|
resolution: {integrity: sha512-C18nCd7nTX1AVL4TcvwMmLAO1VI1OuGluIOTjiPkBQ746Ls1HhL5rl//jMPACmT28YmxIQJ2ZcLPNmhvEVBZvw==}
|
|
cpu: [x64]
|
|
os: [linux]
|
|
|
|
lefthook-openbsd-arm64@2.1.6:
|
|
resolution: {integrity: sha512-mZOMxM8HiPxVFXDO3PtCUbH4GB8rkveXhsgXF27oAZTYVzQ3gO9vT6r/pxit6msqRXz3fvcwimLVJgb8eRsa8A==}
|
|
cpu: [arm64]
|
|
os: [openbsd]
|
|
|
|
lefthook-openbsd-x64@2.1.6:
|
|
resolution: {integrity: sha512-sG9ALLZSnnMOfXu+B7SmxFhJhuoAh4bqi5En5aaHJET48TqrLOcWWZuH+7ArFM6gr/U5KfSUvdmHFmY8WqCcIg==}
|
|
cpu: [x64]
|
|
os: [openbsd]
|
|
|
|
lefthook-windows-arm64@2.1.6:
|
|
resolution: {integrity: sha512-lD8yFWY4Csuljd0Rqs7EQaySC0VvDf7V3rN1FhRMUISTRDHutebIom1Loc8ckQPvKYGC6mftT9k0GvipsS+Brw==}
|
|
cpu: [arm64]
|
|
os: [win32]
|
|
|
|
lefthook-windows-x64@2.1.6:
|
|
resolution: {integrity: sha512-q4z2n3xucLscoWiyMwFViEj3N8MDSkPulMwcJYuCYFHoPhP1h+icqNu7QRLGYj6AnVrCQweiUJY3Tb2X+GbD/A==}
|
|
cpu: [x64]
|
|
os: [win32]
|
|
|
|
lefthook@2.1.6:
|
|
resolution: {integrity: sha512-w9sBoR0mdN+kJc3SB85VzpiAAl451/rxdCRcZlwW71QLjkeH3EBQFgc4VMj5apePychYDHAlqEWTB8J8JK/j1Q==}
|
|
hasBin: true
|
|
|
|
snapshots:
|
|
|
|
lefthook-darwin-arm64@2.1.6:
|
|
optional: true
|
|
|
|
lefthook-darwin-x64@2.1.6:
|
|
optional: true
|
|
|
|
lefthook-freebsd-arm64@2.1.6:
|
|
optional: true
|
|
|
|
lefthook-freebsd-x64@2.1.6:
|
|
optional: true
|
|
|
|
lefthook-linux-arm64@2.1.6:
|
|
optional: true
|
|
|
|
lefthook-linux-x64@2.1.6:
|
|
optional: true
|
|
|
|
lefthook-openbsd-arm64@2.1.6:
|
|
optional: true
|
|
|
|
lefthook-openbsd-x64@2.1.6:
|
|
optional: true
|
|
|
|
lefthook-windows-arm64@2.1.6:
|
|
optional: true
|
|
|
|
lefthook-windows-x64@2.1.6:
|
|
optional: true
|
|
|
|
lefthook@2.1.6:
|
|
optionalDependencies:
|
|
lefthook-darwin-arm64: 2.1.6
|
|
lefthook-darwin-x64: 2.1.6
|
|
lefthook-freebsd-arm64: 2.1.6
|
|
lefthook-freebsd-x64: 2.1.6
|
|
lefthook-linux-arm64: 2.1.6
|
|
lefthook-linux-x64: 2.1.6
|
|
lefthook-openbsd-arm64: 2.1.6
|
|
lefthook-openbsd-x64: 2.1.6
|
|
lefthook-windows-arm64: 2.1.6
|
|
lefthook-windows-x64: 2.1.6
|