From bb75cabeeabeaffc292eff9e0c49d3983ded2fe7 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Mon, 17 Aug 2026 12:50:37 -0500 Subject: [PATCH] docs(changelog): record the release's largest feature, which was missing entirely MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unreleased carried two entries for the 81 commits since v26.8.0-beta.0, and the observability contract was not one of them — the feature four independent reviews named as the project's biggest gap, and the reason issue #10 existed, had no changelog presence in any version. Someone deciding whether to upgrade would have read the release as a shutdown fix. Also added, in the order a reader needs them rather than the order they landed: Changed: `.` and `..` in a request path now resolve instead of 404ing. This is a behaviour change and belongs under Changed rather than buried in Fixed — it is Node-only, it ends a divergence where the same bytes reached different routes per runtime, and it is worth telling anyone whose proxy matches on the literal path that the proxy and the application no longer agree. Fixed: the BodyInit narrowing on the app.fetch path, which is the path Deno, Bun and the edge all use, and the shutdown timer ordering that left a ReferenceError waiting for whoever touched it next. Found by diffing the public surface at the tag against HEAD rather than rereading the file. `createApp` gained five options and the package eleven exports since the beta; the entries above are what had no home. Signed-off-by: Diego Resendez --- CHANGELOG.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cddd15..9c99d86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,26 @@ npm treats versions as semver and semver forbids leading zeros. ### Added +- **Observability: a correlated lifecycle event stream and an injectable logger.** Every request is + given an id — an incoming `x-request-id` is adopted rather than replaced — and every event of that + request carries it, alongside the matched route *pattern* (never the concrete URL, which would give + a metrics backend one label per distinct path). Each step reports its own duration. `createApp({ + logger })` accepts any object with `debug`/`info`/`warn`/`error`; the default writes structured JSON, + or a readable line on a TTY, decided once at boot. Nothing in core writes to `console`, enforced by a + lint rule rather than by intention. `createApp({ logRequests: true })` logs one line per request, off + by default. New exports: `Logger`, `LogLevel`, `LogFields`, `createDefaultLogger`, + `withConsoleFallback`, `logRequests`, `LifecycleEvent`, `EventPayload`, `Correlation`. + + No metrics registry and no OpenTelemetry exporter in core — those live outside it, because core + keeps one runtime dependency. A `traceparent` header is carried through untouched for an exporter to + interpret; core implements no propagation spec. Closes [#10](https://github.com/Expressive-Tea/green-tea/issues/10). + +- **A bounded `close()` on the Deno and Bun adapters**, and `createApp({ shutdownTimeoutMs })` for the + Node one. `app.close()` returns at its no-server guard on Deno and Bun, so the deadline lives on the + server `serveDeno()`/`serveBun()` returns. One difference the deadline cannot hide: Node and Bun + force the remainder shut, while Deno cannot — aborting a server that is already draining throws from + Deno's own listener, so there the deadline bounds how long `close()` waits, not when connections die. + - Shutdown is now an extension point. A `@Provider` may declare `dispose()`, a plugin may call `api.onShutdown(fn)`, and an application may pass `createApp({ hooks: [{ onShutdown }] })` — three doors into one registry, so an app closing a connection no longer writes `process.on('SIGTERM')` @@ -33,6 +53,28 @@ npm treats versions as semver and semver forbids leading zeros. default cap of `1000`; values `<= 0` leave Node unlimited. Deno and Bun have no equivalent runtime setting and require a platform or reverse-proxy connection cap. +### Changed + +- **`.` and `..` in a request path are now resolved rather than 404'd.** `GET /public/../admin` reaches + a route declared as `/admin`, and `%2e` counts as a dot, so the encoded spelling cannot reach a route + the plain one resolves away from. This is a **behaviour change on Node only**, and it exists to end a + divergence: Deno, Bun and Workers resolve dot segments inside the `Request` constructor before the + framework sees anything, so the same bytes on the wire already reached different routes depending on + where you deployed. Rejecting them — the stricter option, and what this module does for `//` — is not + implementable on three of the four runtimes. If a proxy or WAF in front of you matches on the literal + path, note that it sees `/public/...` where the application now routes `/admin`. + +### Fixed + +- **Buffered response bodies are narrowed to what the host runtime's `Response` accepts.** A Node + `Buffer` is a `Uint8Array` at runtime but its declared backing store admits `SharedArrayBuffer`, which + `BodyInit` does not — so Deno's types rejected it. This was a real typing hole on the `app.fetch` + path, which is the path Deno, Bun and the edge all use, rather than a JSR formality. + +- **`close()`'s shutdown timer is armed before `finish()` is referenced.** The previous ordering relied + on `server.close(cb)` deferring, which is Node's behaviour rather than a guarantee to us, and left a + `ReferenceError` waiting in the shutdown path for whoever changed it. + ## [26.8.0-beta.0] - 2026-08-02 ### Added