From ca11436bb73a38d4b0db8da1b5318c7b0bd7da72 Mon Sep 17 00:00:00 2001 From: Daniel McCoy Stephenson Date: Tue, 1 Sep 2026 05:00:31 +0000 Subject: [PATCH] chore: build on install so a git dependency resolves npm runs `prepare` when a package is installed from a git URL, and `main` points into `dist/`, which is not committed. Without this, a git-URL install resolves to a package with no build output and every import from it fails. `prepublishOnly` does not cover that case: it only runs on `npm publish`. Until the first release lands on npm, a git dependency is the only way to consume this package, and this is what makes that work. --- js/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/js/package.json b/js/package.json index c472cd6..bb3b8a2 100644 --- a/js/package.json +++ b/js/package.json @@ -27,6 +27,7 @@ "build": "tsc -p tsconfig.build.json", "typecheck": "tsc -p tsconfig.json --noEmit", "test": "vitest run", + "prepare": "npm run build", "prepublishOnly": "npm run build" }, "devDependencies": {