Repository navigation
chore: migrate to Effect v4 - #16
Closed
antonin-morel-spiko wants to merge 1 commit into
Closed
antonin-morel-spiko wants to merge 1 commit into
antonin-morel-spiko wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The example lockfile is stale relative to its manifest, and documentation still contains removed v3 runtime references.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
Migrates the library, tests, documentation, and example application from Effect v3 to v4.
Changes:
- Replaces runtime APIs with
Context/ManagedRuntime. - Updates cancellation and error handling.
- Migrates example HTTP APIs and dependencies.
- Adds a major-release changeset.
| File | Description |
|---|---|
test/useInfiniteEffectSuspenseQuery.test.ts |
Updates infinite suspense query tests for Effect v4. |
test/useInfiniteEffectQuery.test.ts |
Updates infinite query tests for Effect v4. |
test/useEffectSuspenseQuery.test.ts |
Updates suspense query tests. |
test/useEffectSuspenseQueries.test.ts |
Updates suspense batch query tests. |
test/useEffectQuery.test.ts |
Updates query tests. |
test/useEffectQueries.test.ts |
Updates multi-query tests. |
test/useEffectMutation.test.ts |
Updates mutation tests. |
test/toQueryOptions.test.ts |
Migrates query option test fixtures. |
test/infiniteEffectQueryOptions.test.ts |
Migrates infinite query option tests. |
test/effectQueryOptions.test.ts |
Migrates query option tests. |
src/useInfiniteEffectSuspenseQuery.ts |
Updates infinite suspense runtime types. |
src/useInfiniteEffectQuery.ts |
Updates infinite query runtime types. |
src/useEffectSuspenseQuery.ts |
Updates suspense query runtime types. |
src/useEffectSuspenseQueries.ts |
Updates suspense batch runtime types. |
src/useEffectQuery.ts |
Updates query runtime types. |
src/useEffectQueries.ts |
Updates multi-query runtime types. |
src/useEffectMutation.ts |
Migrates mutation runtime handling. |
src/types.ts |
Updates public runtime option types. |
src/internal/createEffectQueryFn.ts |
Updates runtime execution and cancellation. |
pnpm-lock.yaml |
Locks Effect v4 dependencies. |
package.json |
Updates the Effect peer dependency. |
example/src/client.ts |
Migrates HTTP client imports. |
example/src/backend.ts |
Migrates server setup. |
example/src/App.tsx |
Updates v4 error handling. |
example/src/api.ts |
Migrates HTTP API definitions. |
example/package.json |
Updates example dependencies. |
docs/index.md |
Updates dependency-injection documentation. |
bun.lock |
Updates dependency metadata. |
.changeset/effect-v4.md |
Adds the major-release changeset. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
antonin-morel-spiko
force-pushed
the
chore/effect-v4
branch
from
September 26, 2026 10:21
27a634c to
6b68c04
Compare
2 of 3 tasks
antonin-morel-spiko
force-pushed
the
chore/effect-v4
branch
from
September 26, 2026 10:23
6b68c04 to
a384a87
Compare
- runtime option accepts Context.Context<R> or ManagedRuntime (Runtime.Runtime removed in v4) - use native RunOptions signal for cancellation instead of a raceFirst/async abort race - migrate tests (Context.Service, Layer.build, Schema.Record) and docs - use test variables flagged as unused by lint
antonin-morel-spiko
force-pushed
the
chore/effect-v4
branch
from
September 28, 2026 08:41
5e8e92a to
820484e
Compare
Collaborator
Author
|
Upgrade to stable version in #18 instead of release candidate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Migrates the library, tests and docs to Effect v4 (
effect@4.0.0-rc.117), following the effect-v3-to-v4 migration reference.The example app migration is stacked in #17, to merge after 2.0.0 is published.
Breaking change
v4 removed
Runtime.Runtime<R>. Theruntimeoption now accepts aContext.Context<R>or aManagedRuntime. A major changeset is included.Library
Context.isContext→Effect.runPromiseExitWith(context), otherwiseruntime.runPromiseExit.raceFirst+Effect.asyncabort race and pass{ signal }to the run functions (v4 interrupts the fiber on abort, including an already-aborted signal).Cause.isInterruptedOnly→Cause.hasInterruptsOnly.effect@^4.0.0-rc.117.Tests / docs
Context.Tag→Context.Service,Layer.toRuntime→Layer.build,Schema.Record(key, value).