NestJS 12.5.1
NestJS 12.5.1 is out, dated November 16, 2026. It is a patch on top of 12.5.0, and it quietly rewrites how a Nest microservice says goodbye.
🚀 Root Module Gets Loose
The one new feature comes from Kamil Mysliwiec: core now accepts module metadata as the root module. That means NestFactory.create() can take an object with imports, controllers and providers instead of a decorated class. It is the kind of change that makes dynamic bootstrap and testing setups far less awkward, without adding another wrapper class just to satisfy the decorator.
🛑 Graceful Shutdown, Everywhere
Samuel Mbabhazi shipped graceful shutdown for the RabbitMQ, TCP, MQTT, Redis and NATS servers in one release. Until now, hooking app.enableShutdownHooks() worked neatly for HTTP and left your message transports to be cut off mid flight. In a queue worker that processes long jobs, that difference is data loss versus a clean drain.
Worth pairing with the limits that landed in 12.5.0. That release added a set of caps that turn silent memory growth into explicit errors: a 1 MB default WebSocket maxPayload (down from 100 MB, oversized frames close with code 1009), 10,000 waiting IO adapter messages per event, 1000 concurrent TCP messages per connection, 1000 pending gRPC responses before RESOURCE_EXHAUSTED, a 1024 character Redis wildcard channel limit, and a 16 MiB RabbitMQ message size default. If your consumers were relying on the old behaviour, audit them before the upgrade lands in production.
🐛 Bug Bashes
- The parse date pipe now rejects a date past the end of its month, so February 30 stops becoming March 2.
- Kafka consumers decode each value of a repeated header instead of collapsing them.
- A Kafka connection attempt stops once the client is closed, which fixes reconnect loops during shutdown.
- Nunjucks views render through an Environment, so configured filters and globals are respected.
⬆️ Upgrade Notes
No breaking changes are declared. Bump with npm install @nestjs/[email protected] @nestjs/[email protected], then check any WebSocket gateway that streams large payloads against the new 1 MB default, and any microservice that calls close() while connecting.
Eight contributors landed code in this release. For a patch version, that is a lot of shutdown logic arriving at once, so give your queue consumers a staging run before the deploy window.