feat: name every type the public signatures use, before the freeze (CARD-22, D19)
CI / dco (pull_request) Successful in 5s
CI / runtimes (bun) (pull_request) Successful in 20s
CI / build (pull_request) Successful in 29s
CI / runtimes (edge) (pull_request) Successful in 19s
CI / runtimes (deno) (pull_request) Successful in 32s

D19 as amended 2026-10-24: nothing that shipped in 26.9.0-beta.2 is
removed. Every symbol D19 had listed for removal or review is in that
release, so this change only adds exports and marks scope.

- Export `AppOptions`, `ExplainNode`, `WsRequest` and `WsSocket`. Each
  appears in a public signature (`createApp`, `Explain.chain`,
  `app.upgrade`) but could not be imported. `AppOptions` is the former
  inline options type of `createApp`, moved verbatim into an interface.
- Add `RequestHeaders`. `Headers` shadows the Fetch global wherever it
  is imported, so it stays only as a `@deprecated` alias of the same type.
- Mark the mesh exports and `MeshConfig` `@experimental`. They stay
  exported and unchanged, but sit outside the freeze, like the
  `experimental: true` flag the mesh already needs.
- The seven review candidates (`withConsoleFallback`, `UNMATCHED_ROUTE`,
  `HTTP_ERROR`, `VALIDATION_ERROR`, `TransportMismatchError`,
  `isAsyncIterable`, `buildOpenApi`) stay as they are.

CHANGELOG: `### Added` for the types, `### Changed` for the mesh tag, and
a new `### Deprecated` for `Headers`. No `### Breaking`.

test/types/public-surface.test.ts fails to compile if any of the new
names stops being exported. `deno publish --dry-run` passes.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
chrnx committed 2026-10-24 14:48:26 -05:00
1 parent b1392db7af
commit 92d54dcc45
10 files changed
+113 -16

No files matched your search

+18
View File
@@ -182,8 +182,20 @@ npm treats versions as semver and semver forbids leading zeros.
high-water mark, or the socket has closed, and at once when it already is. The built-in adapters
all provide it. A socket built without it is never waited on, as before.
- **Types you could see but not name are now exported** (D19): `AppOptions` (the options object of
`createApp`, until now an inline type, so `const opts: AppOptions = …` works), `ExplainNode`
(one entry of `Explain.chain`), and `WsRequest` / `WsSocket` (the arguments of `app.upgrade`).
- **`RequestHeaders`** (D19): the type of the incoming request headers, under a name that does not
shadow the Fetch `Headers` global. `Headers` remains as a deprecated alias.
### Changed
- **The mesh's exports are marked `@experimental`** (D19): `connectLink`, `buildRemote`,
`envelopeFrom`, `buildManifest`, `createMeshControl`, `MESH_CONTROL_PATH`, `Manifest`,
`RequestEnvelope`, `Frame` and `MeshConfig`. They stay exported, unchanged. The mesh already needs
`createApp({ experimental: true })`; the tag says the same thing in the types: these are outside
the API freeze and may change in a minor release.
- **Every `304` is bodiless** (#114). A `304` has no body and no `content-*` headers on any adapter,
including one from `throw new NotModified()`, which used to go out with the default JSON
envelope's `content-type`.
@@ -231,6 +243,12 @@ npm treats versions as semver and semver forbids leading zeros.
introspection routes (`devGraph`, `devOpenapi`) now sit before remote routes in that table, so
in the one case where a teapot exports the same path at the same specificity, the dev route wins.
### Deprecated
- **The `Headers` type** (D19). Import `RequestHeaders` instead: same type, a name that does not
shadow the Fetch `Headers` global in the files that import it. `Headers` stays as an alias, so
nothing breaks.
### Fixed
- **`listen()` rejects when the port is taken** (#138). A bind failure such as `EADDRINUSE` or