From 55488fdfcd994c6f8a6918059e18e6155f3390b7 Mon Sep 17 00:00:00 2001 From: jreakin Date: Mon, 23 Mar 2026 04:18:02 -0500 Subject: [PATCH] chore: simplify prepare script, remove scripts/prepare.cjs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit .husky/pre-commit is committed to the repo — developers get the hook by cloning, not by running npm install. prepare only needs to build TypeScript for npm publish/pack. Co-Authored-By: Claude Opus 4.6 (1M context) --- gitnexus/package.json | 2 +- gitnexus/scripts/prepare.cjs | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 gitnexus/scripts/prepare.cjs diff --git a/gitnexus/package.json b/gitnexus/package.json index 76f6a368f1..53bf1f5ceb 100644 --- a/gitnexus/package.json +++ b/gitnexus/package.json @@ -45,7 +45,7 @@ "test:integration": "vitest run test/integration", "test:watch": "vitest", "test:coverage": "vitest run --coverage", - "prepare": "node scripts/prepare.cjs", + "prepare": "npm run build", "postinstall": "node scripts/patch-tree-sitter-swift.cjs", "prepack": "npm run build && chmod +x dist/cli/index.js" }, diff --git a/gitnexus/scripts/prepare.cjs b/gitnexus/scripts/prepare.cjs deleted file mode 100644 index 73c3568d4b..0000000000 --- a/gitnexus/scripts/prepare.cjs +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Prepare script: build TypeScript and install husky hooks. - * Uses Node child_process so it works on Windows (cmd.exe) and POSIX. - */ -const { execSync } = require('child_process'); -const path = require('path'); - -// 1. Build -execSync('npm run build', { stdio: 'inherit', cwd: __dirname + '/..' }); - -// 2. Install husky (from repo root — one level up from gitnexus/) -try { - execSync('npx husky', { stdio: 'inherit', cwd: path.resolve(__dirname, '../..') }); -} catch { - // Husky install is optional — may fail in CI or tarball installs -}