Skip to content

Commit 0b1b3ef

Browse files
committed
fix(reviewer): require the TUI peer dependencies
src/tui.tsx imports solid-js and uses @opentui/solid as its JSX runtime, but peerDependenciesMeta marked all three peers optional, so npm and OpenCode's installer both skipped them. Loading the plugin from npm failed with 'Cannot find package @opentui/solid'. The workspace hid this because its dev dependencies are hoisted, and bun.lock is regenerated so a --frozen-lockfile install no longer carries the stale optionalPeers entries. Verified by importing the TUI entry from a clean install: it reproduces the failure on 0.1.0 and resolves with required peers, and OpenCode's installer now places @opentui/core, @opentui/solid and solid-js in the plugin's node_modules. bun install --frozen-lockfile and make test both pass. Releases 0.1.1.
1 parent fd04ef9 commit 0b1b3ef

3 files changed

Lines changed: 7 additions & 18 deletions

File tree

‎bun.lock‎

Lines changed: 1 addition & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/reviewer/README.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@ make test-load # loads the plugin in a throwaway OpenCode config and asserts it
143143
make test-security # optional live classifier checks using synthetic adversarial history
144144
```
145145

146+
The status line needs `@opentui/core`, `@opentui/solid`, and `solid-js`. They are declared as peer dependencies to
147+
state the versions the plugin is compatible with, rather than pinning a second copy of the host's runtimes, and they
148+
must not be marked optional: `src/tui.tsx` imports `solid-js` and uses `@opentui/solid` as its JSX runtime, so an
149+
installer that skips them leaves the TUI entry unresolvable.
150+
146151
`test-security` uses the configured server's `openai/gpt-5.6-terra-fast` model with the
147152
`medium` variant through `opencode api`. It requires existing provider authentication and
148153
incurs model usage. Only synthetic prompts are sent; proposed commands are never executed.

‎packages/reviewer/package.json‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@joonix/opencode-reviewer",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"type": "module",
55
"license": "MIT",
66
"description": "Reviews OpenCode V2 ask permissions with an LLM before a prompt is shown",
@@ -28,17 +28,6 @@
2828
"@opentui/solid": ">=0.5.10",
2929
"solid-js": ">=1.9.0"
3030
},
31-
"peerDependenciesMeta": {
32-
"@opentui/core": {
33-
"optional": true
34-
},
35-
"@opentui/solid": {
36-
"optional": true
37-
},
38-
"solid-js": {
39-
"optional": true
40-
}
41-
},
4231
"devDependencies": {
4332
"@opentui/core": "0.5.10",
4433
"@opentui/solid": "0.5.10",

0 commit comments

Comments
 (0)