Skip to content

Commit 02ce1d0

Browse files
authored
fix: use effect 4.x matching opencode (#270)
fix: use effect 4.x matching opencode to fix cross-module Effect incompatibility Effect 3.x uses unique Symbol for TypeId; Effect 4.x uses the plain string '~effect/Effect'. Running Effect.runPromise from a bundled 3.x instance on a 4.x Effect object fails with 'Not a valid effect: {}' because isEffect() uses a Symbol lookup that cannot find the string-keyed property. Pinning effect to 4.0.0-beta.48 (matching opencode) and adding a local tsconfig.json with moduleResolution:bundler so DTS generation resolves the package exports correctly.
1 parent 0ea363c commit 02ce1d0

3 files changed

Lines changed: 198 additions & 46 deletions

File tree

packages/opencode-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"format": "prettier --write ."
2525
},
2626
"dependencies": {
27-
"effect": ">=3.0.0",
27+
"effect": "4.0.0-beta.48",
2828
"zod": "^4.1.8"
2929
},
3030
"devDependencies": {
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "../../tsconfig.json",
3+
"compilerOptions": {
4+
"moduleResolution": "bundler",
5+
"module": "ESNext"
6+
},
7+
"include": ["src/**/*"],
8+
"exclude": ["node_modules", "dist"]
9+
}

0 commit comments

Comments
 (0)