Skip to content

chore: update effect dependencies#1274

Open
juliusmarminge wants to merge 4 commits intomainfrom
cursor/effect-dependencies-latest-e6dd
Open

chore: update effect dependencies#1274
juliusmarminge wants to merge 4 commits intomainfrom
cursor/effect-dependencies-latest-e6dd

Conversation

@juliusmarminge
Copy link
Copy Markdown
Member

@juliusmarminge juliusmarminge commented Apr 3, 2026

Summary

  • update effect and all @effect/* dependencies used in the workspace to the latest published versions
  • refresh pnpm-lock.yaml after the recursive dependency update
  • align the uploadthing/effect-platform adapter typing with the upgraded Effect platform APIs and update the backend adapter example to mount it as an app

Testing

  • pnpm --filter @uploadthing/shared test
  • pnpm --filter uploadthing build
  • pnpm --filter uploadthing typecheck
  • pnpm --filter @example/backend-adapters-server build
  • pnpm exec playwright install chromium
  • pnpm --filter uploadthing test
Open in Web Open in Cursor 

Summary by CodeRabbit

  • Chores

    • Updated Effect ecosystem dependencies across packages and examples to newer versions (effect, @effect/platform, @effect/platform-node, @effect/vitest, @effect/language-service) and added a changeset entry reflecting the bumps.
  • Refactor

    • Adjusted router/mounting and route handler typing to improve integration and type clarity for the upload handling pipeline.

Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-uploadthing Ready Ready Preview, Comment Apr 3, 2026 5:49am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
legacy-docs-uploadthing Ignored Ignored Apr 3, 2026 5:49am

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 3, 2026

🦋 Changeset detected

Latest commit: eb2349d

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 3, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 43cdcf94-11a1-4cc5-aa57-d142ad60d120

📥 Commits

Reviewing files that changed from the base of the PR and between 658463b and eb2349d.

📒 Files selected for processing (1)
  • .changeset/fifty-jars-turn.md
✅ Files skipped from review due to trivial changes (1)
  • .changeset/fifty-jars-turn.md

Walkthrough

Updates Effect-related library versions across the project and adapts two TypeScript files to API changes in the updated libraries.

Changes

Cohort / File(s) Summary
Effect Dependency Updates
examples/backend-adapters/server/package.json, packages/shared/package.json, packages/uploadthing/package.json, playground-v6/package.json, playground/package.json, tooling/tsconfig/package.json
Bumped Effect-related dependencies: effect -> 3.21.0, @effect/platform -> 0.96.0, @effect/platform-node -> 0.106.0, @effect/vitest -> 0.29.0, @effect/language-service -> 0.84.3 across manifests.
Router API Migration
examples/backend-adapters/server/src/effect-platform.ts
Replaced HttpRouter.mount("/api/uploadthing", ...) (with @ts-expect-error) with HttpRouter.mountApp("/api/uploadthing", ...), removing the TS suppression.
Type Annotation Refinement
packages/uploadthing/src/effect-platform.ts
Added type-only imports for HttpApp and HttpClient; added explicit return type HttpApp.Default<unknown, HttpClient.HttpClient> to createRouteHandler.
Changeset
.changeset/fifty-jars-turn.md
Added a changeset declaring patch bumps and noting the chore: update effect dependencies.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: update effect dependencies' directly and clearly summarizes the main change—updating Effect library dependencies across the workspace.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/effect-dependencies-latest-e6dd

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 3, 2026

More templates

npm i https://pkg.pr.new/@uploadthing/shared@1274
npm i https://pkg.pr.new/uploadthing@1274

commit: eb2349d

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

📦 Bundle size comparison

Bundle Size (gzip) Visualization
Main 31.17KB See Treemap 📊
PR (9b17582) 31.21KB See Treemap 📊
Diff ↑46.00B

Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Apr 3, 2026

Greptile Summary

This PR updates effect (3.17.7→3.21.0) and all @effect/* workspace dependencies to their latest versions, refreshes pnpm-lock.yaml, and aligns the uploadthing/effect-platform adapter with the upgraded platform APIs. The @ts-expect-error workaround on HttpRouter.mount is correctly resolved by switching to the new HttpRouter.mountApp API, and createRouteHandler gains an explicit return type annotation.

Confidence Score: 5/5

Safe to merge — changes are a straightforward dependency bump with a small, targeted API fix and one minor type annotation concern.

All remaining findings are P2 style suggestions. The unknown error channel is a non-blocking annotation preference; the PR description confirms build, typecheck, and test commands all pass. The @ts-expect-error removal is a clear improvement.

packages/uploadthing/src/effect-platform.ts — the unknown error channel in the return type annotation is worth a second look.

Important Files Changed

Filename Overview
packages/uploadthing/src/effect-platform.ts Adds explicit return type HttpApp.Default<unknown, HttpClient.HttpClient> to createRouteHandler; uses unknown for the error channel which may be overly permissive compared to never.
examples/backend-adapters/server/src/effect-platform.ts Replaces HttpRouter.mount (with @ts-expect-error workaround) with HttpRouter.mountApp, aligning with the updated @effect/platform API.
packages/uploadthing/package.json Bumps effect 3.17.7→3.21.0, @effect/platform 0.90.3→0.96.0, @effect/vitest 0.25.1→0.29.0.
tooling/tsconfig/package.json Bumps @effect/language-service 0.35.2→0.84.3 and effect 3.17.7→3.21.0.
pnpm-lock.yaml Lockfile refresh reflecting all updated Effect packages and incidental @types/node bump from 22.x to 25.x.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["createRouteHandler(opts)"] --> B["createRequestHandler (Effect.runSync)"]
    B --> C["HttpRouter.provideServiceEffect\n(binds AdapterArguments → HttpServerRequest)"]
    C --> D["Effect.provide(Layer.setConfigProvider)"]
    D --> E["HttpApp.Default<unknown, HttpClient.HttpClient>"]
    E --> F["HttpRouter.mountApp('/api/uploadthing', uploadthingRouter)"]
    F --> G["HttpRouter with CORS middleware"]
    G --> H["HttpServer.serve → NodeRuntime.runMain"]
Loading

Reviews (1): Last reviewed commit: "chore: remove unused effect import" | Re-trigger Greptile

*/
config?: Omit<RouteHandlerConfig, "fetch" | "logLevel">;
}) => {
}): HttpApp.Default<unknown, HttpClient.HttpClient> => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 unknown error channel may be too permissive

HttpApp.Default<unknown, HttpClient.HttpClient> uses unknown for the error channel (E). In Effect, HttpApp.Default is typically Effect<ServerResponse, E, R | HttpServerRequest>, and handlers that have fully dealt with their errors conventionally use never for E. Leaving it as unknown means consumers of this function cannot rely on the type system to tell them the error channel is handled, and composition with other Effect combinators may produce unexpected widened error types.

Suggested change
}): HttpApp.Default<unknown, HttpClient.HttpClient> => {
}): HttpApp.Default<never, HttpClient.HttpClient> => {

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants