Skip to content

Commit a6894d8

Browse files
authored
fix(opencode-plugin): bundle effect into dist instead of peer dependency (#269)
The plugin is installed in an isolated cache directory by opencode, so peer dependencies are not resolved. Move effect to a regular dependency and add it to noExternal in tsup so it is bundled into dist/index.js.
1 parent fa127e0 commit a6894d8

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

packages/opencode-plugin/package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,22 @@
2424
"format": "prettier --write ."
2525
},
2626
"dependencies": {
27+
"effect": ">=3.0.0",
2728
"zod": "^4.1.8"
2829
},
2930
"devDependencies": {
3031
"@codemcp/workflows-core": "workspace:*",
3132
"@codemcp/workflows-server": "workspace:*",
32-
"effect": "3.21.1",
3333
"rimraf": "^6.0.1",
3434
"tsup": "^8.0.0",
3535
"vitest": "4.0.18"
3636
},
3737
"peerDependencies": {
38-
"@anthropic-ai/sdk": "*",
39-
"effect": ">=3.0.0"
38+
"@anthropic-ai/sdk": "*"
4039
},
4140
"peerDependenciesMeta": {
4241
"@anthropic-ai/sdk": {
4342
"optional": true
44-
},
45-
"effect": {
46-
"optional": true
4743
}
4844
},
4945
"keywords": [

packages/opencode-plugin/tsup.config.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ export default defineConfig({
1414
bundle: true,
1515
// Zod is external (it's a true peer dependency)
1616
external: ['zod'],
17-
// Bundle core and server packages (they're private, not published)
18-
noExternal: ['@codemcp/workflows-core', '@codemcp/workflows-server'],
17+
// Bundle core, server, and effect — not guaranteed to be available in standalone plugin installs
18+
noExternal: [
19+
'@codemcp/workflows-core',
20+
'@codemcp/workflows-server',
21+
'effect',
22+
],
1923
target: 'node20',
2024
sourcemap: false,
2125
});

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)