Skip to content

[11.0][A3] Remove deprecated HttpDispatcher class (staged; use createDispatcherPlugin) #2380

Description

@os-zhuang

Part of 11.0 breaking-change batch (#2364). Largest A-item — do in stages.

Remove the deprecated HttpDispatcher class (packages/runtime/src/http-dispatcher.ts, annotated "removed in v2"), superseded by createDispatcherPlugin().

Keep (do NOT remove)

The other exports in that file are NOT deprecated: HttpProtocolContext, HttpDispatcherResult, KernelResolver, HttpDispatcherOptions. (Also note: packages/services/service-messaging/src/http-dispatcher.ts is a different class — unrelated.)

Blast radius (~245 refs, 7 adapters)

  • runtime/src/index.ts public export of HttpDispatcher
  • 7 framework adapters import it: express, fastify, nextjs, nestjs, nuxt, sveltekit, hono (src/index.ts + each __mocks__/runtime.ts)
  • 5–6 runtime/src/http-dispatcher*.test.ts that new HttpDispatcher(...) directly

Staged plan

  1. Migrate the 7 adapters to import only the surviving types; route through createDispatcherPlugin()
  2. Confirm dispatcher-plugin.ts (createDispatcherPlugin) is the canonical entry
  3. Remove the public HttpDispatcher export (mark class @internal or delete); keep the 4 types exported
  4. Rewrite/relocate the http-dispatcher tests to exercise the plugin
  5. gen:api-surface + major changeset

Risk: high — own PR, staged, verify each adapter builds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions