From 570e25811828b74156d3cafe875e7f7b58d14999 Mon Sep 17 00:00:00 2001 From: Theo Ephraim Date: Wed, 29 Jul 2026 21:04:59 -0700 Subject: [PATCH] fix: move lefthook install from postinstall to prepare MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `postinstall: lefthook install` ran on end-user installs, but lefthook is a devDependency and so isn't present. The script exited 127, npm aborted the install before ever running the bin, and npm swallows script output at the default loglevel — so `npx fledgling@latest` produced zero output and no error. Broke every consumer install of 1.2.0. `prepare` runs on local install and before publish, but not for consumers installing from a registry tarball. Guarded with `|| true` so a git-hook install can never fail a release. --- .bumpy/fix-postinstall-breaking-installs.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .bumpy/fix-postinstall-breaking-installs.md diff --git a/.bumpy/fix-postinstall-breaking-installs.md b/.bumpy/fix-postinstall-breaking-installs.md new file mode 100644 index 0000000..79d53ee --- /dev/null +++ b/.bumpy/fix-postinstall-breaking-installs.md @@ -0,0 +1,5 @@ +--- +fledgling: patch +--- + +Fix `npx fledgling` (and every other install) doing nothing at all. The `postinstall: lefthook install` script ran on end-user installs, but `lefthook` is a devDependency and isn't there — so the script exited 127, npm aborted the install before ever reaching the `bin`, and since npm swallows script output at the default loglevel you got zero output and no error. Moved git-hook installation to `prepare`, which runs in the repo and before publish but not for consumers installing from the registry. diff --git a/package.json b/package.json index ab7c056..03ff2c7 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "dev": "tsdown --watch", "typecheck": "tsc --noEmit", "start": "node dist/cli.mjs", - "postinstall": "lefthook install" + "prepare": "lefthook install || true" }, "dependencies": { "@clack/prompts": "^1.5.1",