Release Notes
See the upgrade guide for migration instructions.
4.5.1 (2026-12-05)
Two fixes to 4.5.0. The full list is in the GitHub release.
@expressots/microon AWS Lambda answers errors as production whenNODE_ENVis not set. In 4.5.0 it counted an unsetNODE_ENVas development there, so a deployed function sent an unexpected error's message to the client and listed close routes in a 404.isProductionEnvironment()in@expressots/corealready treated Lambda as production; the two now follow the same rule. SetNODE_ENV=developmentwhere you want the details, such as forsam local.cloudflareBindings<Env>()accepts an optional binding in a project compiled withstrictNullChecks. WithCACHE?: KVNamespaceinEnv,bindings.kv("CACHE")did not compile. A binding of the wrong kind is still rejected. Types only; nothing changes at runtime.
4.5.0 (2026-12-04)
4.5.0 adds a runtime that runs wherever the Fetch API does, and starts new Cloudflare Worker projects on it. Nothing is removed or renamed, and micro() from @expressots/adapter-express works as before. One change can alter what a deployed application sends, on Cloudflare Workers and AWS Lambda only: read Upgrading from 4.4 to 4.5 first. The full list is in the GitHub release.
Before you upgrade:
- On Cloudflare Workers and AWS Lambda, an application with no
NODE_ENVanswers errors as production. Neither runtime setsNODE_ENV, and an unset one counted as development, so a deployed application sent an unexpected error's message, and with no error handler its stack trace, to the client, and listed close routes in a 404. SetNODE_ENV=developmentwhere you want the details:.dev.varsforwrangler dev, the local environment forsam local. awsLambdaAdapterno longer sends an error's message when nothing else answered the error. It answers{ "error": "Internal Server Error" }, as the Cloudflare and Vercel adapters do, and logs the error.
New:
@expressots/micro, the fetch-native runtime: handlers take the FetchRequestand a context and return the response, and one application runs on Node and Cloudflare Workers, where it is tested, and on any runtime with the Fetch API. A Worker built with it needs nonodejs_compatand is about 6 KiB gzipped, wheremicro()on Express is about 200 KiB. Bodies stream both ways, and errors are problem documents with the framework's codes.@expressots/micro/cloudflare: typed tokens for KV, D1, R2 and Queue bindings.@expressots/micro/node:serve(app)andtoNodeHandler(app).expressots new --target cloudflarebuilds the Worker on@expressots/micro. Projects created before are unchanged.isProductionEnvironment()in@expressots/coresays whether error responses are those of production.
4.4.1 (2026-12-04)
A fix to expressots inspect. In 4.4.0 it reported "0 middleware, 0 modules" for an application made by expressots new, and no routes for a micro application.
- Modules written where they are used, as in
configContainer([CreateModule([AppController])]), are listed, as(inline). - Middleware set up by calls, such as
this.Middleware.applyPreset("api"), is listed with the call and its line. - Micro applications are read. Routes registered with
app.get()and its like, and withRoute.get()on an application built withcreateMicroAPI(), are listed with their handler, middleware and body schema. In the JSON report such a route has anappmember and nocontroller. - What cannot be read is named, under "Not in this report".
Only the scan behind inspect changed. @expressots/core and @expressots/adapter-express hold the same code as in 4.4.0, so nothing changes for a running application.
4.4.0 (2026-12-03)
4.4.0 makes the framework easier to work with, for a person reading an error and for a coding agent alike. Errors say what to change and carry a stable code, an application can be checked and inspected without starting a server, and error responses have one JSON shape. No API is removed or renamed. One change can stop an application from starting, so read Upgrading from 4.3 to 4.4 first. The full list is in the GitHub release.
Before you upgrade:
- An application serves the controllers its modules list, and only those. A controller that is loaded and that no module lists stops the start with
EXP4002. An application created from a template or withexpressots generatelists every controller already. - Validation that was declared now runs. A body typed with a class-validator class, and a schema passed to
@validatedBody, zod and yup included, were not applied in some setups. They are, and a body that breaks its rules is answered with 400. - A request whose rules cannot be applied is refused. When a class declares class-validator rules and the package is not installed, the request is answered with 500 and
EXP3002. It used to be accepted unchecked. - A path parameter reaches its handler in the type its method declares. In compiled builds a route's parameters were also converted with the types of the routes declared after it.
- A start does not take over a port outside development. It fails with
EXP4001and names the process that holds the port. - Outside production, an uncaught error with no error handler is answered with JSON, and the start banner is compact when the output is not a terminal.
- The
typeof an error response has a new value, underhttps://doc.expresso-ts.com/docs/errors/. Each one leads to a page.
New:
- Errors that say what to change. A dependency that cannot be resolved names who asked for it and how to provide it. Framework errors and development warnings end with a code, from
EXP1001toEXP4002, and each code has a page. expressots checkstarts the application up to the point of listening and exits with 0 or 1, without opening a port.expressots inspectprints routes, controllers, providers, middleware and dependencies, as text or as one JSON object.- One error shape.
setErrorHandler({ problemJson: true })answers every error with a problem document (RFC 9457), in an application class and in amicro()application. See Error responses. validateBody(schema)validates the body of a route in a micro application.EXPRESSOTS_LOG=jsonwrites one JSON object per log line, in any environment.- Development warnings for a body that was not parsed, a body type the runtime cannot see, and a validation package that is missing.
- Templates and generators start with JSON errors and a validated endpoint, and
expressots generatewrites a schema in the project's validation library. llms.txtandAGENTS.mdcarry the error codes, the common mistakes with their fixes, and the two commands.- A request to a controller costs about 14% less CPU.
Measured: in a first run of the agent benchmark, a coding agent solved the same five tasks on 4.3.1 and on a build of 4.4.0, in half the model turns on the build.
4.3.1 (2026-12-02)
A security release for ExpressoTS Studio. Upgrade if you use @expressots/studio or @expressots/studio-agent. Details are in the GitHub release and on the Studio installation page.
- Studio accepts local connections only. The agent and the Studio UI now listen on
127.0.0.1. Earlier versions listened on every network interface with no authentication, so other machines on the same network, and web pages open in your browser, could read recorded requests. - Recorded requests no longer store credentials.
Authorization, cookies, API-key headers and fields such aspasswordandaccess_tokenare replaced with[REDACTED]. Recordings made by earlier versions are cleaned the first time the agent starts. - Request bodies are recorded, which earlier versions never did, and
.studio/is kept out of git.
Two things change for existing setups: reaching the agent from outside a container or VM now needs EXPRESSOTS_STUDIO_HOST=0.0.0.0 and a token, and replaying a recorded request sends it without the redacted values.
4.3.0 (2026-09-13)
Highlights, with the full list in the GitHub release:
- Typed Cloudflare binding providers for the micro API:
cloudflareBindings<Env>()tokens for KV, D1, R2 and Queues, resolved per request throughreq.services, verified inside workerd. See Micro API. - Bun as a runtime:
expressots devandexpressots prodrun the app with Bun when the project uses Bun; override with--runtimeorEXPRESSOTS_RUNTIME. - AI coding tools:
AppFactoryreturns as a compile-time tombstone that namesbootstrap()as the replacement,@expressots/corenow ships itsllms.txt, andexpressots llmsprints it for the installed version. - Fixes: file log rotation no longer loses lines when two rotations share a millisecond; port recovery runs without a shell; dependency floors raised so
npm auditis clean.
What's New in 4.0
| Feature | Description |
|---|---|
| Interceptors | AOP system with conditional execution |
| Testing Module | Zero-config test utilities |
| Event System | Type-safe events with auto-discovery |
| Lazy-Loading | On-demand module loading |
| Configuration | Type-safe config with validation |
| Logging | 11-phase logging system with transports |
| Authorization | Guards with permission hierarchy |
| Studio | Local developer experience platform: request timeline, architecture map, live logs, error inspector, security view |
Versioning Scheme
ExpressoTS follows Semantic Versioning:
- Major: Breaking changes (roughly yearly)
- Minor: New features (bi-weekly / monthly)
- Patch: Bug fixes (as needed)
Releases are bundled. All packages share the same version number:
@expressots/core@expressots/adapter-express@expressots/shared@expressots/templates@expressots/cli@expressots/studio@expressots/studio-agent
Support Policy
Starting with v4.0.0, every major release receives 24 months of bug fixes and security patches from its release date. Releases on the v3.x line and earlier follow the prior 18-month policy. Enterprise customers with support contracts receive extended support.
| Version | Node.js | Release | Bug & Security fixed until | Status |
|---|---|---|---|---|
| 4.0.0 | >= 20.18.0 | May 2026 | May 2028 | 🟢 |
| 3.0.0 | >= 20.18.0 | December 2024 | December 2026 | 🟡 |
| 2.0.0 | >= 18.10.0 | September 2023 | March 2025 | 🔴 |
🟢 Active support 🟡 Bug & Security fixes only 🔴 End-of-life
v3.0.0 was originally on the 18-month policy. With v4.0.0 we extended the v3 window by 6 months so users have a smooth transition runway through the rest of 2026.
ExpressoTS 4.0
Version 4.0.0 introduces significant features and architectural improvements.
Nodejs version
ExpressoTS v4.0.0 requires Node.js version 20.18.0 or higher.
Core Features
1. Interceptors System
AOP system for cross-cutting concerns:
whenInterceptor(),unlessInterceptor()for conditional execution- Auto-discovery via
@provide()+@UseInterceptors() - Composition:
pipeInterceptors(),combineInterceptors() - Built-in:
PerformanceInterceptor,LoggingInterceptor,TimeoutInterceptor
import {
UseInterceptors,
PerformanceInterceptor,
whenInterceptor,
} from "@expressots/core";
@controller("/users")
export class UserController {
@Get("/")
@UseInterceptors(
PerformanceInterceptor,
whenInterceptor(
(ctx) => ctx.request.headers["x-cache"] === "true",
CacheInterceptor,
),
)
getUsers() {
return this.userService.findAll();
}
}
2. Testing Module
Testing utilities for unit, integration, and E2E:
createTestApp()for zero-config test setupmockProvider()with dependency auto-suggestion- Fluent HTTP testing API
- Snapshot testing with
snapshotRequest() - Load testing with percentile metrics
- Database fixtures with
createTestDatabase()
import { createTestApp } from "@expressots/core";
describe("UserController", () => {
let testApp: Awaited<ReturnType<typeof createTestApp>>;
beforeAll(async () => {
testApp = await createTestApp(App);
});
afterAll(async () => {
await testApp.cleanup();
});
test("GET /users returns user list", async () => {
await testApp.request
.get("/users")
.expectStatus(200)
.expectBody<User[]>((users) => users.length > 0)
.expectTime({ lessThan: 100 })
.execute();
});
});
3. Event System
Type-safe events for decoupled architecture:
- Event classes with full TypeScript inference
- Auto-discovery via
@OnEvent()decorator - Priority-based handler execution
- Conditional handlers with
@When() - Event recording and replay
- Flow visualization
// Type-safe event class
export class UserCreatedEvent {
constructor(
public readonly userId: string,
public readonly email: string,
) {}
}
// Auto-discovered handler
@provide(SendWelcomeEmailHandler)
@OnEvent(UserCreatedEvent, { priority: 1 })
export class SendWelcomeEmailHandler implements IEventHandler<UserCreatedEvent> {
handle(event: UserCreatedEvent) {
// Full TypeScript inference on event payload
this.emailService.sendWelcome(event.email);
}
}
4. Lazy-Loading Modules
Performance optimization for large applications:
- On-demand module loading with
CreateLazyModule() - Route auto-detection from
@controller()decorators - Preload hints (
high,medium,low,never) via.withPreloadHint() - Prefetch and timeout configuration via
.withLazyConfig() - One-liner Express wiring with
setupLazyLoadingForExpress() - Background warmup strategies (
idle,immediate,scheduled)
import { CreateLazyModule } from "@expressots/core";
// Module only loaded when /admin routes are accessed
// (routes auto-detected from @controller("/admin"))
export const AdminModule = CreateLazyModule(
[AdminController],
{ name: "AdminModule" },
).withPreloadHint("never");
5. Enhanced Configuration
Type-safe configuration with validation:
- Full TypeScript inference
- Detailed validation error messages
- Automatic environment switching
SecretValuefor secure handling
import { defineConfig, Env } from "@expressots/core";
export default defineConfig({
database: {
url: Env.string("DATABASE_URL", { required: true }),
pool: Env.number("DB_POOL_SIZE", { default: 10 }),
},
features: {
caching: Env.boolean("ENABLE_CACHE", { default: true }),
},
});
Enhanced Logging System
11-phase production logging:
| Feature | Description |
|---|---|
| Log Levels | TRACE, DEBUG, INFO, WARN, ERROR, FATAL |
| Structured Logging | Objects and metadata with formatting |
| Context Management | withContext() and child() |
| File Transport | Daily rotating files, JSON in production |
| Log Querying | In-memory buffer with query API |
| Export | Markdown export with statistics |
| Redaction | Automatic sensitive data masking |
| Flow Visualization | Visual log flow representation |
| Transports | Console, File, Custom |
import { Logger, LogLevel, FileTransport } from "@expressots/core";
logger.configure({
level: LogLevel.DEBUG,
transports: [FileTransport.daily({ directory: "logs" })],
});
// Query logs
const errors = logger
.query()
.level(LogLevel.ERROR)
.context("UserService")
.search("authentication")
.execute();
// Export to markdown
const report = logger.exportLogsToMarkdown({
query: { level: LogLevel.ERROR },
groupBy: "level",
});
Content Negotiation
RFC 7231 compliant format negotiation:
- Formats: JSON, XML, CSV, YAML, Plain Text
- Quality value support
@Consumes()and@Produces()decorators- Automatic format selection from Accept headers
import { provide } from "@expressots/core";
import { controller, Get, Produces } from "@expressots/adapter-express";
@provide(UsersController)
@controller("/users")
export class UsersController {
@Get("/")
@Produces("application/json", "application/xml", "text/csv")
getUsers() {
return this.userService.findAll();
}
}
Smart Validation System
TypeScript-first validation with a pluggable adapter registry:
- Built-in adapters for class-validator (registered automatically), Zod, and Yup (opt-in via
addValidation({ adapters: [...] })) - Smart field detection (email, phone, URL, UUID)
- Helpful error messages with examples
- Custom adapters via
IValidationAdapter
import { provide, ZodValidatorAdapter } from "@expressots/core";
import { controller, Post, validatedBody } from "@expressots/adapter-express";
import { z } from "zod";
// In your App class:
// this.Middleware.addValidation({ adapters: [ZodValidatorAdapter] });
const CreateUser = z.object({
name: z.string(),
email: z.string().email(),
password: z.string().min(8),
});
@provide(UsersController)
@controller("/users")
export class UsersController {
@Post("/")
createUser(@validatedBody(CreateUser) data: z.infer<typeof CreateUser>) {
return this.userService.create(data);
}
}
See the Validation guide for class-validator and Yup variants.
Health Monitoring
Application health monitoring is built-in at three layers: middleware pipeline, IHealthCheck providers, and an aggregated dashboard. Full deep-dive in the Health & Monitoring guide.
import { AppExpress } from "@expressots/adapter-express";
export class App extends AppExpress {
async configureServices() {
this.Middleware.applyPreset("api");
this.Middleware.addHealthCheck({ path: "/health/middleware", includeMetrics: true });
}
}
Any provider implementing IHealthCheck is auto-discovered and aggregated by ProviderRegistry.checkHealth() so you can expose GET /health from your own controller.
Custom Scopes
Advanced DI scopes:
- Tenant, Transaction, Workflow, Session scopes
- Complete isolation between contexts
- Manual lifecycle control
import { provideInScope } from "@expressots/core";
@provideInScope(TenantConfigService, "tenant")
export class TenantConfigService {
// Instance shared within tenant, isolated between tenants
}
API Versioning
- URL versioning (
/v1/users,/v2/users) via the@Version()decorator - Controller-level and method-level versions (method overrides controller)
- Multiple active versions, auto-detected and shown in the startup banner
Route Constraints
- Type constraints: UUID, integer, string patterns
- Custom constraint validators
- Automatic validation before handler execution
Enhanced Middleware System
- Presets:
api,production,development - Built-in profiler with metrics
- Pipeline introspection at runtime
- Conditional execution with
when()andunless() - Zero-config validation with
@validatedBody()
Enhanced Authorization System
Guard system with advanced access control:
- Built-in:
AuthenticatedGuard,RoleGuard,PermissionGuard,ResourceOwnerGuard - ABAC with
RequirePolicy() - Composition:
combineGuards(),sequenceGuards(),whenGuard() - Request-scoped caching for performance
- Permission hierarchy and multi-tenant support
- Decorators:
@RequireAuthentication(),@RequireRoles(),@RequirePermissions()
import { RequireRoles, RequirePermissions } from "@expressots/core";
import { controller, Get } from "@expressots/adapter-express";
@controller("/documents")
export class DocumentController {
@Get("/")
@RequireRoles("user", "admin")
@RequirePermissions("documents:read")
getDocuments() {
return this.documentService.findAll();
}
}
Enhanced Error Handling
RFC 7807 compliant error handling:
- Exception filters via
@Catch()decorator @UseFilters()at controller and method levelAppErrorhelpers:badRequest(),notFound(),validationFailed()- Route suggestions for 404 errors
- Context-aware error hints (disabled in production)
Application Lifecycle Hooks
AppExpress exposes four lifecycle hooks you can override on your App class. All four are optional and run in the order shown:
import { AppExpress } from "@expressots/adapter-express";
export class App extends AppExpress {
// 1. Synchronous container wiring (custom binds, scopes)
protected globalConfiguration(): void { /* ... */ }
// 2. Async configuration once the container is live
protected async configureServices(): Promise<void> {
this.Middleware.applyPreset("api");
}
// 3. After the HTTP server starts listening
protected async postServerInitialization(): Promise<void> { /* ... */ }
// 4. On SIGINT / SIGTERM, before the process exits
protected async serverShutdown(signal?: NodeJS.Signals): Promise<void> { /* ... */ }
}
Providers can also implement IBootstrap.onBootstrap() and IShutdown.onShutdown(). They're auto-discovered by the lifecycle registry and run alongside the application-level hooks.
CLI Improvements
The v4 CLI ships with four templates and middleware presets:
| Template | Highlights |
|---|---|
application | Canonical full app: controllers, providers, lifecycle, presets |
application-with-events | Same as above plus the event system pre-wired |
micro | Minimal micro(): single file, fast bootstrap |
provider | Library template for publishing reusable providers (dual ESM/CJS, release-it) |
Plus:
--preset <api|web|graphql|microservice|minimal>selects the middleware preset forapplicationscaffolds (default:api).--eventsadds the event system toapplicationscaffolds.--package-manager <npm|pnpm|yarn>for consistent scaffolding.EXPRESSOTS_TEMPLATE_REF,EXPRESSOTS_DEV,EXPRESSOTS_USE_LOCAL_TEMPLATES,EXPRESSOTS_SKIP_INSTALLenv switches for CI / local development.expressots create <kind>for in-project code generation.expressots buildfor production compilation.expressots studioto launch the Studio dashboard.
Studio
ExpressoTS Studio is the local developer experience platform that ships as part of v4.0.0. Everything runs on your machine; nothing is sent off the box.
- Status Dashboard: app health, runtime info, DI scope counts, top routes, aggregate security grade.
- Architecture Map: read-only graph of controllers / use-cases / providers / middleware with DI scope badges and active-path highlighting.
- Request Timeline + Trace Detail: live recording of every HTTP request with OpenTelemetry spans, headers/body diff, and one-click Replay.
- Live Logs: in-memory buffer of every framework + app log line, filterable by level, route, and context.
- Error Inspector: aggregated runtime errors with stack frames and deep-links to source.
- Security View:
npm audit+ OSV.dev advisories with transitive root-cause chains, reachability scoring (confirmed / likely / unreachable / unknown), and one-click fixes. OWASP API Top 10 runtime posture findings derived from recorded traffic.
npm install -D @expressots/studio @expressots/studio-agent
npx expressots-studio
The studio-agent dynamically loads only when NODE_ENV=development and the package is installed, so production deployments pay zero runtime cost. See the Studio section for the full tour.
Breaking Changes
| Change | Impact |
|---|---|
| Node.js 20.18.0+ | Update runtime |
| DI patterns | Review injection syntax |
| Lifecycle hooks | Update app.ts |
See the upgrade guide for migration instructions.
Previous Releases
For information about previous releases, please see: