Skip to content

Dev#17

Merged
tmlxrd merged 3 commits into
mainfrom
dev
Jun 1, 2026
Merged

Dev#17
tmlxrd merged 3 commits into
mainfrom
dev

Conversation

@tmlxrd

@tmlxrd tmlxrd commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Changes

Screenshots / GIFs

How to test

Checklist

  • PR targets dev
  • npm run typecheck passes
  • npm run build passes
  • Updated CHANGELOG.md under [Unreleased] if user-visible
  • Updated ROADMAP.md if a planned item is now done
  • No new heavyweight dependencies (or motivated in the description)

tmlxrd and others added 3 commits June 1, 2026 10:36
Co-authored-by: Cursor <cursoragent@cursor.com>
`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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
@tmlxrd
tmlxrd merged commit e018f24 into main Jun 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant