Skip to content

chore(example): migrate example to Effect v4 - #17

Closed
antonin-morel-spiko wants to merge 1 commit into
chore/effect-v4from
chore/effect-v4-example
Closed

antonin-morel-spiko wants to merge 1 commit into
chore/effect-v4from
chore/effect-v4-example

Conversation

@antonin-morel-spiko

Copy link
Copy Markdown
Collaborator

Summary

Stacked on #16. Migrates the example app to Effect v4. Merge after #16 is merged and @spiko-tech/effect-react-query@2.0.0 is published.

  • @effect/platform → effect/unstable/http + effect/unstable/httpapi; @effect/platform-bun on v4 (4.0.0-rc.117).
  • Endpoints declared with the v4 options object (payload, success, error), Schema.Literals.
  • Server wired with HttpApiBuilder.layer + HttpRouter.serve + HttpRouter.cors (serve logs the listen address, so withLogAddress is dropped).
  • onError handlers updated for v4 error types (SchemaError, HttpClientError).
  • Depends on @spiko-tech/effect-react-query@^2.0.0.

Before merging

  • Publish 2.0.0, then run bun install in example/ and commit the updated example/bun.lock.

Test plan

  • Type-checks and builds against the local lib
  • Backend smoke-tested: 200 success / 400 BadRequest / 500 die, CORS headers present

Notes

  • rc.117 exposes http modules under effect/unstable/*; Effect main has since moved them to effect/http and effect/http-api, so these imports will change again at a later v4 release.

🤖 Generated with Claude Code

- @effect/platform -> effect/unstable/http + effect/unstable/httpapi
- @effect/platform-bun on v4, server via HttpApiBuilder.layer + HttpRouter.serve + HttpRouter.cors
- onError handlers updated for v4 error types (SchemaError, HttpClientError)
- depend on @spiko-tech/effect-react-query ^2.0.0
@antonin-morel-spiko

Copy link
Copy Markdown
Collaborator Author

Upgrade to stable version in #18 instead of release candidate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant