From cda9a0b5331a9e0d2a80932aebe6efb75ddc54ab Mon Sep 17 00:00:00 2001 From: Vlad Date: Mon, 1 Jun 2026 10:36:09 +0200 Subject: [PATCH 1/3] docs: add npm monthly downloads badge; release 0.2.1 Co-authored-by: Cursor --- README.md | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9913125..5a87464 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@

CI npm + npm downloads MIT

diff --git a/package.json b/package.json index 4fc5ba9..86733c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@iclawapp/iclaw", - "version": "0.2.0", + "version": "0.2.1", "description": "Local web UI for OpenClaw Gateway", "license": "MIT", "homepage": "https://github.com/iClawApp/iClaw", From e37b2c676b6579f13791bb0f1ddaadf115c2fa23 Mon Sep 17 00:00:00 2001 From: Vlad Date: Mon, 1 Jun 2026 10:50:34 +0200 Subject: [PATCH 2/3] fix(npm): drop broken postinstall that crashed npx/install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `npm i` / `npx @iclawapp/iclaw` failed with MODULE_NOT_FOUND: the postinstall hook ran `node scripts/copy-opaque-vendor.mjs`, but `scripts/` is not in the `files` whitelist, so the script isn't in the published tarball — npm tried to run a file that doesn't exist on the user's machine. This broke 0.2.0 (current npm `latest`). The hook was also unnecessary at install time: it only copies the browser vendor bundles (opaque + noble) into public/js/vendor/, which `prepack` already does before publish, and the result ships via the `public` whitelist. The server imports @serenity-kit/opaque from node_modules (a runtime dependency), not from scripts/. So removing postinstall fully fixes install with no loss of behaviour. Verified: packing the tree and installing the tarball into a clean project now succeeds (was MODULE_NOT_FOUND); vendor/opaque + vendor/noble are present in the tarball, bin/iclaw links, @serenity-kit/opaque resolves. Co-Authored-By: Claude Opus 4.8 --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 86733c2..c250076 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,6 @@ "test:ra-integration": "npm run build && node scripts/ra-e2e-integration.mjs", "smoke:ra-manual": "node scripts/ra-e2e-smoke.mjs", "scan:relay-capture": "node scripts/ra-relay-capture-scan.mjs", - "postinstall": "node scripts/copy-opaque-vendor.mjs", "prepack": "node scripts/copy-opaque-vendor.mjs && node scripts/verify-vendor-assets.mjs && npm run build", "verify:vendor": "node scripts/verify-vendor-assets.mjs" }, From 8f7be56e76428f321ff2c01738922dcb8653d635 Mon Sep 17 00:00:00 2001 From: Vlad Date: Mon, 1 Jun 2026 11:03:40 +0200 Subject: [PATCH 3/3] build: generate vendor via prebuild/pretest, not postinstall MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removing postinstall (prev commit) fixed install but broke CI: `npm ci` no longer copies the browser vendor bundles, and the test job runs `npm test` directly — so remoteAccessVendorAssets / E2eBrowserInterop tests hit missing public/js/vendor/** (those files are gitignored, generated). Make the dependency explicit instead of relying on an install-time side effect: add `prebuild` and `pretest` hooks (and a manual `vendor` script) that run copy-opaque-vendor.mjs. Now every path is self-sufficient: - CI test → pretest generates vendor - CI/local build → prebuild generates vendor - publish → prepack generates vendor (unchanged) - end-user install → nothing runs; vendor already ships in the tarball Verified locally by deleting public/js/vendor/** (mimics a fresh CI checkout): npm test → 366 pass, npm run build → ok, typecheck → ok, and a clean tarball install still succeeds with vendor present. Co-Authored-By: Claude Opus 4.8 --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index c250076..6fed699 100644 --- a/package.json +++ b/package.json @@ -25,9 +25,12 @@ ], "scripts": { "dev": "tsx watch src/index.ts", + "vendor": "node scripts/copy-opaque-vendor.mjs", + "prebuild": "node scripts/copy-opaque-vendor.mjs", "build": "tsc", "start": "node dist/index.js", "typecheck": "tsc --noEmit", + "pretest": "node scripts/copy-opaque-vendor.mjs", "test": "vitest run", "test:watch": "vitest", "test:coverage": "vitest run --coverage",