3.0.7 — 2026-03-26
New feature
-
Cross-cutting middleware pipeline across all 7 HTTP and serverless adapters.
A framework-agnosticMiddlewarePipeline(Koa-style onion compose) is now the
dispatch layer for every adapter — Express, Fastify, Koa, Hono, Lambda, Cloudflare
Workers, and Azure Functions. Any CDI component that declares
static __middleware = { order: N }participates automatically; lower order = outermost.
Three built-in middleware components are registered by every*Starter():
RequestLoggerMiddleware(order 10, logs[METHOD] /path → status (Xms)),
ErrorHandlerMiddleware(order 20, converts throws to structured JSON error responses),
andNotFoundMiddleware(order 30, returns 404 when no route matches). All three are
disableable via config flags (middleware.requestLogger.enabled, etc.) and individually
replaceable via CDI'sconditionalOnMissingBeanpattern.MiddlewarePipeline,
RequestLoggerMiddleware,ErrorHandlerMiddleware, andNotFoundMiddlewareare exported
from@alt-javascript/boot. All duplicatetry/catchand inline 404 blocks have been
removed from adapter internals — they are now handled uniformly by the pipeline.
The normalised request shape{ method, path, params, query, headers, body, ctx }is
consistent across all seven adapters so middleware written once works everywhere. -
Node.js minimum version raised to 20.
Dependencies includingconfig@4.4.1,chokidar@5,listr2@9, andcliui@9
require Node.js ≥ 20. Theenginesfield in all packages has been updated to
"node": ">=20"and the CI matrix now tests 20.x, 22.x, and 24.x only.
Documentation
-
All publishable package READMEs updated. Every adapter README now documents the
middleware pipeline with a built-in component table, a customAuthMiddlewareexample,
and the config flags for disabling built-ins. Core package READMEs (@alt-javascript/cdi,
@alt-javascript/config,@alt-javascript/logger) updated with Spring Framework / SLF4J
attribution tables. Root monorepo README updated with a comprehensive Spring concept
mapping table and the full middleware pipeline quick-start. -
Spring Framework attributed as design collaborator. The
contributorsfield in all
publishable package.json files now credits Spring Framework (VMware/Broadcom) as the
design inspiration and pattern source. A full concept-to-concept mapping table is
included in the root README and each relevant package README.
Examples
example-2-1-servers-expressandexample-3-1-serverless-lambdaupdated to
demonstrate the middleware pipeline end-to-end: a customAuthMiddlewareCDI component
protects routes,RequestLoggerMiddlewarelogs every request, and
ErrorHandlerMiddlewareconverts handler throws to structured error responses.
The Lambda example test suite extended with explicit 401 (no token) and 200
(valid token) assertions.