In the server-side TypeScript ecosystem, Kamil Mysliwiec's framework has long established itself as the de facto standard for building scalable backends. Even in mature projects, regular minor updates bring welcome targeted improvements that smooth out rough edges in production. The NestJS v12.4.0 release, shipped on November 6, 2026, is just like that: it doesn't break backward compatibility, yet fixes several nasty bugs in microservices and significantly simplifies working with server-side views.
In the context of the ongoing evolution of Node.js, this release smoothly aligns adapter behavior with current platform standards.
Let's look at what changed under the hood and how to apply these new features in your codebase.
Server-Side Rendering and Global Locals
If you build hybrid applications where part of the pages are rendered on the server via @nestjs/platform-node or the Express adapter, you're surely familiar with the hassle of passing global data into templates. Passing the app version number, service name, or base meta tags meant either writing custom middleware or manually injecting them into every controller's return object.
In PR #18396, the developers added the setLocal() method, allowing you to declaratively register application-wide variables during initialization:
import { NestFactory } from '@nestjs/core';
import { NestExpressApplication } from '@nestjs/platform-express';
import { AppModule } from './app.module';
import { join } from 'path';
async function bootstrap() {
const app = await NestFactory.create<NestExpressApplication>(AppModule);
app.setBaseViewsDir(join(__dirname, '..', 'views'));
app.setViewEngine('eta');
// Global variables are now available in all views by default
app.setLocal('appName', 'Developer Portal');
app.setLocal('appVersion', '12.4.0');
app.setLocal('releaseYear', new Date().getFullYear());
await app.listen(3000);
}
bootstrap();
Alongside this, PR #18395 added official support for modern lightweight template engines Eta, LiquidJS, and art-template to the Node adapter, and fixed handling of routes with trailing slashes.
MQTT Stability and Granular Array Validation
The second key focus of the release is microservices and network contract handling:
- Protection against infinite loops in MQTT:
PR #18418 fixes a sneaky message broker bug. Previously, when a service subscribed to wildcard topics (
+or#), the broker could mistakenly intercept the server's own replies and route them back into the handler, triggering an avalanche-like infinite reply loop. Server replies are now strictly isolated from subscription patterns. - Accurate error details in ParseArrayPipe:
When batch-validating lists of entities via
ParseArrayPipe, the pipe previously stripped the context of nested validation errors, making it hard to tell which specific field in which array element failed validation. PR #18419 preserves all grouped validator fields:
import { Controller, Post, Body, ParseArrayPipe, HttpStatus } from '@nestjs/common';
import { IsString, IsEmail, MinLength } from 'class-validator';
export class RegisterUserDto {
@IsString()
@MinLength(3)
username: string;
@IsEmail()
email: string;
}
@Controller('users')
export class UsersBatchController {
@Post('import')
async importUsers(
@Body(
new ParseArrayPipe({
items: RegisterUserDto,
errorHttpStatusCode: HttpStatus.UNPROCESSABLE_ENTITY,
whitelist: true,
forbidNonWhitelisted: true,
}),
)
users: RegisterUserDto[],
) {
return { importedCount: users.length, status: 'ok' };
}
}
The release also eliminates options mutation in ConsoleLogger (PR #18402), fixes streaming call options forwarding in gRPC (PR #18392), and updates the Fastify CORS adapter to version 11.4.1. Upgrading takes a standard npm update @nestjs/core @nestjs/common and requires no changes to existing architecture.
