From d678cef5c157cd0d3fc72657c828e7534cbfb221 Mon Sep 17 00:00:00 2001 From: Bryan Date: Mon, 2 Nov 2026 07:56:19 -0600 Subject: [PATCH 1/2] fix: cablear los git hooks con prepare en vez de postinstall MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit npm ejecuta el postinstall de las dependencias, así que instalar @acertijosapps/android-viewer dentro de otro repo git le fijaba core.hooksPath=.githooks y desactivaba sus hooks (husky, etc.). prepare solo corre en el npm install del propio repo, no al instalar el paquete desde el registro. Actualiza .githooks/README.md, CONTRIBUTING.md y el CHANGELOG. Co-Authored-By: Claude Opus 5.5 --- .githooks/README.md | 8 ++++++-- CHANGELOG.md | 1 + CONTRIBUTING.md | 2 +- package.json | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.githooks/README.md b/.githooks/README.md index ad26b93..24a42f4 100644 --- a/.githooks/README.md +++ b/.githooks/README.md @@ -15,10 +15,14 @@ persona o por un agente. Alinean el manual de versionado del equipo. El proyecto lo automatiza con un script `prepare` en `package.json`: ```json -"scripts": { "prepare": "git config core.hooksPath .githooks || true" } +"scripts": { "prepare": "git config core.hooksPath .githooks || exit 0" } ``` -Así, en cada `yarn install` queda cableado. Manual, si hiciera falta: +Así, en cada `npm install` del propio repo queda cableado. Se usa `prepare` y no `postinstall` +a propósito: npm ejecuta el `postinstall` de las dependencias, así que instalar el paquete en otro +repo le cambiaría su `core.hooksPath`; `prepare` no corre al instalar desde el registro. + +Manual, si hiciera falta: ```bash git config core.hooksPath .githooks diff --git a/CHANGELOG.md b/CHANGELOG.md index 41f0a65..110336a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Formato basado en [Keep a Changelog](https://keepachangelog.com/es-ES/); version ### Cambiado ### Corregido +- El cableado de los git hooks (`git config core.hooksPath .githooks`) pasa de `postinstall` a `prepare`: npm ejecuta el `postinstall` de las dependencias, así que `npm install @acertijosapps/android-viewer` dentro de otro repo git le cambiaba su `core.hooksPath` y desactivaba sus hooks (husky, etc.). `prepare` solo corre en el `npm install` del propio repo. ### Eliminado diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0483807..d9ff6c6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ Use the Node.js version in [`.nvmrc`](./.nvmrc). Install dependencies from the r npm install ``` -`npm install` also wires the repository git hooks (`core.hooksPath` → `.githooks/`). +`npm install` also wires the repository git hooks (`core.hooksPath` → `.githooks/`) through the `prepare` script, which does not run when the package is installed as a dependency. You need the Android SDK (`adb` and `emulator`). The tools are looked up in `ANDROID_HOME`, `ANDROID_SDK_ROOT` or the default SDK location; override them with `ADB` and `EMULATOR`. diff --git a/package.json b/package.json index ab14d2a..51f91bb 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "start": "node bin/android-viewer.js", "mcp": "node bin/android-viewer.js mcp", "check": "node --check bin/android-viewer.js && node --check server.js && node --check lib/device.js && node --check mcp/server.js && node --check public/viewer.js", - "postinstall": "git config core.hooksPath .githooks || exit 0" + "prepare": "git config core.hooksPath .githooks || exit 0" }, "keywords": [ "android", From 46a81aa4632730c44d8dd820624746f5177d337f Mon Sep 17 00:00:00 2001 From: Bryan Date: Mon, 2 Nov 2026 08:08:46 -0600 Subject: [PATCH 2/2] chore(release): 1.0.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Versión 1.0.2 en package.json, package-lock.json y server.json; la sección [Sin liberar] del CHANGELOG pasa a [1.0.2] - 2026-11-02. Corrige que instalar el paquete en otro repo git le cambiara su core.hooksPath. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 6 +++++- package-lock.json | 4 ++-- package.json | 2 +- server.json | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 110336a..85378e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,10 +10,14 @@ Formato basado en [Keep a Changelog](https://keepachangelog.com/es-ES/); version ### Cambiado ### Corregido -- El cableado de los git hooks (`git config core.hooksPath .githooks`) pasa de `postinstall` a `prepare`: npm ejecuta el `postinstall` de las dependencias, así que `npm install @acertijosapps/android-viewer` dentro de otro repo git le cambiaba su `core.hooksPath` y desactivaba sus hooks (husky, etc.). `prepare` solo corre en el `npm install` del propio repo. ### Eliminado +## [1.0.2] - 2026-11-02 + +### Corregido +- El cableado de los git hooks (`git config core.hooksPath .githooks`) pasa de `postinstall` a `prepare`: npm ejecuta el `postinstall` de las dependencias, así que `npm install @acertijosapps/android-viewer` dentro de otro repo git le cambiaba su `core.hooksPath` y desactivaba sus hooks (husky, etc.). `prepare` solo corre en el `npm install` del propio repo. + ## [1.0.1] - 2026-11-01 ### Añadido diff --git a/package-lock.json b/package-lock.json index 36ed69b..149a450 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@acertijosapps/android-viewer", - "version": "1.0.1", + "version": "1.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@acertijosapps/android-viewer", - "version": "1.0.1", + "version": "1.0.2", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 51f91bb..b1764d6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@acertijosapps/android-viewer", "mcpName": "io.github.acertijosapps/android-viewer", - "version": "1.0.1", + "version": "1.0.2", "description": "Visor web del emulador de Android (screenrecord H.264 + WebCodecs, input por adb, posturas de plegable) y MCP para que un agente lo maneje.", "type": "module", "main": "server.js", diff --git a/server.json b/server.json index fb3f37a..c7f66d8 100644 --- a/server.json +++ b/server.json @@ -8,12 +8,12 @@ "source": "github" }, "websiteUrl": "https://github.com/acertijosapps/android-viewer#readme", - "version": "1.0.1", + "version": "1.0.2", "packages": [ { "registryType": "npm", "identifier": "@acertijosapps/android-viewer", - "version": "1.0.1", + "version": "1.0.2", "runtimeHint": "npx", "transport": { "type": "stdio"