Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/effect-v4-beta-66.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect/tsgo": patch
---

Update Effect v4 test coverage and metadata for `4.0.0-beta.66`, including direct `Context.Service` yielding and the restored `Effect.firstSuccessOf` API.
6 changes: 3 additions & 3 deletions _packages/tsgo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
"@effect/tsgo-darwin-arm64": "workspace:*"
},
"devDependencies": {
"@effect/platform-node": "^4.0.0-beta.46",
"@effect/platform-node-shared": "^4.0.0-beta.46",
"@effect/platform-node": "^4.0.0-beta.66",
"@effect/platform-node-shared": "^4.0.0-beta.66",
"@types/node": "^24.3.0",
"tsdown": "^0.20.1",
"typescript": "^5.9.2",
"effect": "^4.0.0-beta.46",
"effect": "^4.0.0-beta.66",
"vitest": "^3.2.1"
}
}
8 changes: 4 additions & 4 deletions _packages/tsgo/src/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
377004
],
"preview": {
"sourceText": "import { Effect, Context } from \"effect\"\n\nclass Db extends Context.Service\u003cDb\u003e()(\"Db\", { make: Effect.succeed({}) }) {}\n\n// @ts-expect-error\nexport const preview: Effect.Effect\u003cvoid\u003e = Db.asEffect().pipe(Effect.asVoid)\n",
"sourceText": "import { Effect, Context } from \"effect\"\n\nclass Db extends Context.Service\u003cDb\u003e()(\"Db\", { make: Effect.succeed({}) }) {}\n\n// @ts-expect-error\nexport const preview: Effect.Effect\u003cvoid\u003e = Db.pipe(Effect.asVoid)\n",
"diagnostics": [
{
"start": 154,
Expand Down Expand Up @@ -584,11 +584,11 @@
377035
],
"preview": {
"sourceText": "import { Effect, Layer, Context } from \"effect\"\n\nclass A extends Context.Service\u003cA\u003e()(\"A\", { make: Effect.succeed({}) }) {\n static Default = Layer.effect(this, this.make)\n}\nclass B extends Context.Service\u003cB\u003e()(\"B\", { make: Effect.as(A.asEffect(), {}) }) {\n static Default = Layer.effect(this, this.make)\n}\nexport const preview = Layer.mergeAll(A.Default, B.Default)\n",
"sourceText": "import { Effect, Layer, Context } from \"effect\"\n\nclass A extends Context.Service\u003cA\u003e()(\"A\", { make: Effect.succeed({}) }) {\n static Default = Layer.effect(this, this.make)\n}\nclass B extends Context.Service\u003cB\u003e()(\"B\", { make: Effect.as(A, {}) }) {\n static Default = Layer.effect(this, this.make)\n}\nexport const preview = Layer.mergeAll(A.Default, B.Default)\n",
"diagnostics": [
{
"start": 346,
"end": 355,
"start": 335,
"end": 344,
"text": "This layer provides A which is required by another layer in the same Layer.mergeAll call. Layer.mergeAll creates layers in parallel, so dependencies between layers will not be satisfied. Consider moving this layer into a Layer.provideMerge after the Layer.mergeAll. effect(layerMergeAllWithDependencies)"
}
]
Expand Down
8 changes: 4 additions & 4 deletions internal/effecttest/hover_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class Database extends Context.Service<Database>()("Database", {
}

class Cache extends Context.Service<Cache>()("Cache", {
make: Effect.as(Database.asEffect(), {})
make: Effect.as(Database, {})
}) {
static Default = Layer.effect(this, this.make)
}
Expand Down Expand Up @@ -160,7 +160,7 @@ class Database extends Context.Service<Database>()("Database", {
}

class Cache extends Context.Service<Cache>()("Cache", {
make: Effect.as(Database.asEffect(), {})
make: Effect.as(Database, {})
}) {
static Default = Layer.effect(this, this.make)
}
Expand Down Expand Up @@ -204,7 +204,7 @@ class Database extends Context.Service<Database>()("Database", {
}

class Cache extends Context.Service<Cache>()("Cache", {
make: Effect.as(Database.asEffect(), {})
make: Effect.as(Database, {})
}) {
static Default = Layer.effect(this, this.make)
}
Expand Down Expand Up @@ -291,7 +291,7 @@ class Database extends Context.Service<Database>()("Database", {
}

class Cache extends Context.Service<Cache>()("Cache", {
make: Effect.as(Database.asEffect(), {})
make: Effect.as(Database, {})
}) {
static Default = Layer.effect(this, this.make)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/rules/outdated_api_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ var EffectModuleMigrationDb = map[string]Migration{
"filterOrDieMessage": removed("Use Effect.filterOrFail and Effect.orDie instead."),
"finalizersMask": removed("Finalizer masking has been removed in Effect v4."),
"findFirst": unchanged(),
"firstSuccessOf": removed("Use Effect.raceAll instead."),
"firstSuccessOf": unchanged(),
"flipWith": removed("Use Effect.flip combined with the desired transformation instead."),
"fromFiber": removed("Use Fiber.join instead."),
"fromFiberEffect": removed("Use Effect.flatMap with Fiber.join instead."),
Expand Down
2 changes: 1 addition & 1 deletion internal/typeparser/effect_yieldable_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

// EffectYieldableType resolves both plain Effect types and yieldable wrappers
// (Option, Either, etc.) that implement the asEffect() protocol.
// that implement the asEffect() protocol.
// For v3: delegates directly to EffectType (v3 models yieldable through Effect subtyping).
// For v4: tries EffectType first; if that fails, looks for an asEffect property,
// checks if it's callable, and tries EffectType on the return type of each call signature.
Expand Down
Loading
Loading