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..85378e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,11 @@ Formato basado en [Keep a Changelog](https://keepachangelog.com/es-ES/); version ### 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/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-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 ab14d2a..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", @@ -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", 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"