Skip to content

docs: add Cloudflare Workers adapter page - #1991

Merged
dinwwwh merged 1 commit into
middleapi:mainfrom
dinwwwh:claude/cloudflare-worker-adapter-27d2c0
Sep 6, 2026
Merged

docs: add Cloudflare Workers adapter page#1991
dinwwwh merged 1 commit into
middleapi:mainfrom
dinwwwh:claude/cloudflare-worker-adapter-27d2c0

Conversation

@dinwwwh

@dinwwwh dinwwwh commented Sep 6, 2026

Copy link
Copy Markdown
Member

Adds a dedicated Cloudflare Workers adapter page and moves the Workers-specific bits out of the Fetch API adapter page. The new page shows the export default { fetch } entry with env and ctx passed as context, and recommends the compatibility flags oRPC relies on: enable_request_signal, so request.signal actually aborts when the client disconnects, and unhandled_rejection_after_microtask_checkpoint on compatibility dates before 2026-03-03, so Workers stop reporting false unhandledrejection errors.

Docs

  • New /docs/adapters/cloudflare-workers page, listed in the adapters sidebar after Browser.
  • The Fetch API adapter page no longer mentions Cloudflare Workers; its runtime tabs are Bun and Deno only.
  • Requirements and Getting Started link to the new page instead of the Fetch API adapter.

Playground

  • playgrounds/cloudflare enables enable_request_signal, so its EvlogHandlerPlugin({ logAbort: true }) can observe client aborts.

Testing

  • pnpm docs:validate passes (JSDoc backlinks and blume validate --strict), eslint is clean, and every external Cloudflare and MDN link returns 200.

Dedicated page for running oRPC on Cloudflare Workers, recommending the
enable_request_signal flag (and unhandled_rejection_after_microtask_checkpoint
on compatibility dates before 2026-03-03). Removes the Workers tab and mention
from the Fetch API adapter page and points Requirements and Getting Started at
the new page. The Cloudflare playground now enables enable_request_signal.
@dinwwwh
dinwwwh force-pushed the claude/cloudflare-worker-adapter-27d2c0 branch from 585dae3 to 9818686 Compare September 6, 2026 08:50

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ Two minor follow-ups, nothing blocking — the content is accurate. I verified both compatibility flags and their anchors against developers.cloudflare.com (unhandled_rejection_after_microtask_checkpoint really does default on at 2026-03-03, and enable_request_signal is never default-on), and the request.signal forwarding claim against packages/server/src/adapters/standard/handler.ts:141.

Reviewed changes

  • New Cloudflare Workers adapter page — Workers entry (export default { fetch(request, env, ctx) }) passing env/ctx as handler context, in RPC and OpenAPI variants, plus a Compatibility Flags section recommending enable_request_signal and unhandled_rejection_after_microtask_checkpoint for compatibility dates before 2026-03-03.
  • Fetch API adapter page trimmed — Cloudflare Workers removed from the description and the runtime tabs (Bun and Deno remain).
  • Cross-page pointers updated — adapters sidebar (meta.ts), getting-started, and requirements now link the new page.
  • Playgroundplaygrounds/cloudflare/wrangler.jsonc enables enable_request_signal.

ℹ️ Home-page runtime tile still points Workers at the Fetch API adapter

apps/content/pages/_home/Runtimes.astro:12 still maps the "Cloudflare Workers" tile to /docs/adapters/fetch-api. With a dedicated page now in place, a one-line change to point it at /docs/adapters/cloudflare-workers keeps the landing strip consistent with the new links added in getting-started and requirements. blume validate --strict skips custom Astro pages, so this stays silently stale until edited by hand.

Technical details
# Repoint the home-page Cloudflare Workers runtime tile

## Affected sites
- `apps/content/pages/_home/Runtimes.astro:12``{ name: 'Cloudflare Workers', href: '/docs/adapters/fetch-api' }` should point at `/docs/adapters/cloudflare-workers`

## Required outcome
- The landing-page runtime tile for Cloudflare Workers links to its dedicated adapter page, matching the other runtime-to-adapter tiles on the strip.

## Notes
- Custom Astro pages are not covered by `blume validate --strict`, so nothing enforces this; it needs a manual edit.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Comment thread apps/content/docs/adapters/cloudflare-workers.mdx
@pkg-pr-new

pkg-pr-new Bot commented Sep 6, 2026

Copy link
Copy Markdown
More templates

@orpc/ai-sdk

npm i https://pkg.pr.new/@orpc/ai-sdk@1991

@orpc/arktype

npm i https://pkg.pr.new/@orpc/arktype@1991

@orpc/bun

npm i https://pkg.pr.new/@orpc/bun@1991

@orpc/client

npm i https://pkg.pr.new/@orpc/client@1991

@orpc/cloudflare

npm i https://pkg.pr.new/@orpc/cloudflare@1991

@orpc/contract

npm i https://pkg.pr.new/@orpc/contract@1991

@orpc/experimental-effect

npm i https://pkg.pr.new/@orpc/experimental-effect@1991

@orpc/evlog

npm i https://pkg.pr.new/@orpc/evlog@1991

@orpc/hibernation

npm i https://pkg.pr.new/@orpc/hibernation@1991

@orpc/json-schema

npm i https://pkg.pr.new/@orpc/json-schema@1991

@orpc/experimental-msw

npm i https://pkg.pr.new/@orpc/experimental-msw@1991

@orpc/nest

npm i https://pkg.pr.new/@orpc/nest@1991

@orpc/next

npm i https://pkg.pr.new/@orpc/next@1991

@orpc/node

npm i https://pkg.pr.new/@orpc/node@1991

@orpc/openapi

npm i https://pkg.pr.new/@orpc/openapi@1991

@orpc/opentelemetry

npm i https://pkg.pr.new/@orpc/opentelemetry@1991

@orpc/pinia-colada

npm i https://pkg.pr.new/@orpc/pinia-colada@1991

@orpc/pino

npm i https://pkg.pr.new/@orpc/pino@1991

@orpc/publisher

npm i https://pkg.pr.new/@orpc/publisher@1991

@orpc/ratelimit

npm i https://pkg.pr.new/@orpc/ratelimit@1991

@orpc/server

npm i https://pkg.pr.new/@orpc/server@1991

@orpc/shared

npm i https://pkg.pr.new/@orpc/shared@1991

@orpc/swr

npm i https://pkg.pr.new/@orpc/swr@1991

@orpc/tanstack-query

npm i https://pkg.pr.new/@orpc/tanstack-query@1991

@orpc/trpc

npm i https://pkg.pr.new/@orpc/trpc@1991

@orpc/valibot

npm i https://pkg.pr.new/@orpc/valibot@1991

@orpc/zod

npm i https://pkg.pr.new/@orpc/zod@1991

commit: 9818686

@codecov

codecov Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@dinwwwh
dinwwwh merged commit 43a8b33 into middleapi:main Sep 6, 2026
9 checks passed
@codspeed-hq

codspeed-hq Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 30 untouched benchmarks


Comparing dinwwwh:claude/cloudflare-worker-adapter-27d2c0 (9818686) with main (89dc90d)

Open in CodSpeed

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