v12.1.3
nestjs/nestv12.1.3Oct 12, 2026by kamilmysliwiec
Upgrading?
AI Summary
This release focuses on stabilizing the NestJS framework by addressing numerous bug fixes across core modules, microservices, and websockets. Key improvements include handling SSE streams more robustly, fixing middleware execution logic, and enhancing the Fastify platform. Additionally, enhancements were added for file upload limits.
Key Highlights
- Fixed SSE (Server-Sent Events) lifecycle management, including handling early disconnects, serialization errors, and header commits.
- Improved middleware and global enhancer execution, specifically fixing transient providers, wildcard path handling, and exclusions.
- Enhanced microservices reliability by fixing connection issues and error handling for NATS, RabbitMQ, Kafka, and Redis clients.
- Added support for field nesting and array index upload limits for the Express and Fastify platforms.
- Improved shutdown sequence handling and logging for both Express and Fastify platforms.
New Features
- Added field nesting and array index upload limits for Express and Fastify platforms
Full Release Notes
## v12.1.3 (2026-10-12) #### Bug fixes * `core`, `microservices` * [#18111](https://github.com/nestjs/nest/pull/18111) fix(core,microservices): flush buffered logs when initialization fails ([@thekhegay](https://github.com/thekhegay)) * [#17993](https://github.com/nestjs/nest/pull/17993) fix(core,microservices): run transient global enhancers on controllers ([@johnnyhuirilef](https://github.com/johnnyhuirilef)) * `platform-express` * [#18110](https://github.com/nestjs/nest/pull/18110) fix(express): guard async request hook completion ([@GiHoon1123](https://github.com/GiHoon1123)) * [#17973](https://github.com/nestjs/nest/pull/17973) fix(express): destroy the `StreamableFile` source on client disconnect ([@maxymlyskov](https://github.com/maxymlyskov)) * [#17942](https://github.com/nestjs/nest/pull/17942) fix(express): run wildcard middleware on the bare global prefix path ([@Chaoqi31](https://github.com/Chaoqi31)) * `core` * [#18104](https://github.com/nestjs/nest/pull/18104) fix(core): fail at startup for request-scoped class global enhancers ([@thekhegay](https://github.com/thekhegay)) * [#18066](https://github.com/nestjs/nest/pull/18066) fix(core): stop silently dropping request-scoped global enhancers ([@OmBhandwaldar](https://github.com/OmBhandwaldar)) * [#18072](https://github.com/nestjs/nest/pull/18072) fix(core): resolve uri versioned exclusions for the not-found handler ([@basteez](https://github.com/basteez)) * [#18075](https://github.com/nestjs/nest/pull/18075) fix(core): normalize slashes when mapping controllers for middleware ([@basteez](https://github.com/basteez)) * [#18086](https://github.com/nestjs/nest/pull/18086) fix(core): do not mutate the message when assigning an sse event id ([@Metehan-Bicer](https://github.com/Metehan-Bicer)) * [#18025](https://github.com/nestjs/nest/pull/18025) fix(core): end sse streams whose event data cannot be serialized ([@OmBhandwaldar](https://github.com/OmBhandwaldar)) * [#18011](https://github.com/nestjs/nest/pull/18011) fix(core): send status and headers set by handlers on sse responses ([@johnnyhuirilef](https://github.com/johnnyhuirilef)) * [#18021](https://github.com/nestjs/nest/pull/18021) fix(core): honor a shutdown signal received while close() is in flight ([@maxymlyskov](https://github.com/maxymlyskov)) * [#17987](https://github.com/nestjs/nest/pull/17987) fix(core): settle SSE lifecycle on early disconnect ([@jackie-cqz](https://github.com/jackie-cqz)) * [#17986](https://github.com/nestjs/nest/pull/17986) fix(core): commit SSE headers for empty streams ([@jackie-cqz](https://github.com/jackie-cqz)) * [#17978](https://github.com/nestjs/nest/pull/17978) fix(core): preserve explicit null values in reflectable decorators ([@gophersg](https://github.com/gophersg)) * [#17966](https://github.com/nestjs/nest/pull/17966) fix(core): run the shutdown sequence after a failed init ([@kamilmysliwiec](https://github.com/kamilmysliwiec)) * [#17963](https://github.com/nestjs/nest/pull/17963) fix(core): send the expires header on sse responses ([@Mohamed-Elshesheny](https://github.com/Mohamed-Elshesheny)) * [#17953](https://github.com/nestjs/nest/pull/17953) fix(core): honor global prefix exclusions for overlapping versions ([@Chaoqi31](https://github.com/Chaoqi31)) * [#17950](https://github.com/nestjs/nest/pull/17950) fix(core): let a `GET` middleware exclusion cover `HEAD` requests ([@Chaoqi31](https://github.com/Chaoqi31)) * [#17951](https://github.com/nestjs/nest/pull/17951) fix(core): reset the listening state when the application closes ([@Chaoqi31](https://github.com/Chaoqi31)) * [#17945](https://github.com/nestjs/nest/pull/17945) fix(core): hash `Map`, `Set` and `RegExp` options in deep-hash tokens ([@Chaoqi31](https://github.com/Chaoqi31)) * [#17947](https://github.com/nestjs/nest/pull/17947) fix(core): treat `VERSION_NEUTRAL` in middleware routes as no version ([@Chaoqi31](https://github.com/Chaoqi31)) * [#17941](https://github.com/nestjs/nest/pull/17941) fix(core): turn off express `x-powered-by` in `useSecurityHeaders()` ([@Chaoqi31](https://github.com/Chaoqi31)) * [#17939](https://github.com/nestjs/nest/pull/17939) fix(core): name dynamic host modules in import error messages ([@Chaoqi31](https://github.com/Chaoqi31)) * [#17940](https://github.com/nestjs/nest/pull/17940) fix(core): isolate nested transient providers injected into properties ([@Chaoqi31](https://github.com/Chaoqi31)) * `microservices` * [#18108](https://github.com/nestjs/nest/pull/18108) fix(microservices): keep nats status updates alive when a listener throws ([@kamilmysliwiec](https://github.com/kamilmysliwiec)) * [#18100](https://github.com/nestjs/nest/pull/18100) fix(microservices): default server options like the client factory does ([@thekhegay](https://github.com/thekhegay)) * [#18083](https://github.com/nestjs/nest/pull/18083) fix(microservices): match rmq '#' wildcards in any position ([@thekhegay](https://github.com/thekhegay)) * [#18095](https://github.com/nestjs/nest/pull/18095) fix(microservices): fail mqtt requests whose publish fails ([@izg0820](https://github.com/izg0820)) * [#18085](https://github.com/nestjs/nest/pull/18085) fix(microservices): preserve null payloads in kafka tombstone records ([@Hangell](https://github.com/Hangell)) * [#18081](https://github.com/nestjs/nest/pull/18081) fix(microservices): close the connection when the channel close fails ([@hktitof](https://github.com/hktitof)) * [#18071](https://github.com/nestjs/nest/pull/18071) fix(microservices): return the rmq reply publish so failures are handled ([@maxymlyskov](https://github.com/maxymlyskov)) * [#18060](https://github.com/nestjs/nest/pull/18060) fix(microservices): fail redis listen on rejected subscriptions ([@kamilmysliwiec](https://github.com/kamilmysliwiec)) * [#18056](https://github.com/nestjs/nest/pull/18056) fix(microservices): clone the kafka record before serializing ([@Mihir-Rabari](https://github.com/Mihir-Rabari)) * [#18054](https://github.com/nestjs/nest/pull/18054) fix(microservices): do not crash when the redis connection drops ([@maxymlyskov](https://github.com/maxymlyskov)) * [#18043](https://github.com/nestjs/nest/pull/18043) fix(microservices): fail pending kafka request on deserializer error ([@hktitof](https://github.com/hktitof)) * [#18002](https://github.com/nestjs/nest/pull/18002) fix(microservices): wait for the TCP TLS handshake ([@jackie-cqz](https://github.com/jackie-cqz)) * [#17995](https://github.com/nestjs/nest/pull/17995) fix(microservices): survive custom deserializer errors in clients ([@johnnyhuirilef](https://github.com/johnnyhuirilef)) * [#18027](https://github.com/nestjs/nest/pull/18027) fix(microservices): close both kafka client connections when one fails ([@izg0820](https://github.com/izg0820)) * [#18008](https://github.com/nestjs/nest/pull/18008) fix(microservices): unwrap records returned by message handlers ([@johnnyhuirilef](https://github.com/johnnyhuirilef)) * [#18001](https://github.com/nestjs/nest/pull/18001) fix(microservices): wait for both Redis clients to be ready ([@jackie-cqz](https://github.com/jackie-cqz)) * [#18000](https://github.com/nestjs/nest/pull/18000) fix(microservices): ignore stale NATS status events ([@jackie-cqz](https://github.com/jackie-cqz)) * [#17996](https://github.com/nestjs/nest/pull/17996) fix(microservices): preserve MQTT payload options ([@jackie-cqz](https://github.com/jackie-cqz)) * [#17989](https://github.com/nestjs/nest/pull/17989) fix(microservices): suspend incomplete packet timers during backpressure ([@jackie-cqz](https://github.com/jackie-cqz)) * [#17988](https://github.com/nestjs/nest/pull/17988) fix(microservices): cancel pending TCP retries on close ([@jackie-cqz](https://github.com/jackie-cqz)) * [#17972](https://github.com/nestjs/nest/pull/17972) fix(microservices): keep grpc response errors out of the request stream ([@drakeo338](https://github.com/drakeo338)) * [#17957](https://github.com/nestjs/nest/pull/17957) fix(microservices): fail rmq connect and listen on channel setup errors ([@johnnyhuirilef](https://github.com/johnnyhuirilef)) * [#17961](https://github.com/nestjs/nest/pull/17961) fix(microservices): run every event handler when a sibling completes empty ([@johnnyhuirilef](https://github.com/johnnyhuirilef)) * [#17959](https://github.com/nestjs/nest/pull/17959) fix(microservices): fail nats requests on undecodable replies ([@johnnyhuirilef](https://github.com/johnnyhuirilef)) * [#17955](https://github.com/nestjs/nest/pull/17955) fix(microservices): stop rmq client opening two channels on connect ([@johnnyhuirilef](https://github.com/johnnyhuirilef)) * [#17946](https://github.com/nestjs/nest/pull/17946) fix(microservices): answer client-streaming calls that return nothing ([@Chaoqi31](https://github.com/Chaoqi31)) * [#17943](https://github.com/nestjs/nest/pull/17943) fix(microservices): resolve grpc stream calls that complete empty ([@hktitof](https://github.com/hktitof)) * `platform-fastify` * [#18109](https://github.com/nestjs/nest/pull/18109) fix(fastify): answer the shutdown hooks 503 with fastify's json body ([@kamilmysliwiec](https://github.com/kamilmysliwiec)) * [#18101](https://github.com/nestjs/nest/pull/18101) fix(fastify): honor `return503OnClosing` during the shutdown hooks ([@thekhegay](https://github.com/thekhegay)) * [#18059](https://github.com/nestjs/nest/pull/18059) fix(fastify): reject listen() on an invalid port ([@kamilmysliwiec](https://github.com/kamilmysliwiec)) * [#18053](https://github.com/nestjs/nest/pull/18053) fix(fastify): listen on a socket path ([@johnnyhuirilef](https://github.com/johnnyhuirilef)) * [#17997](https://github.com/nestjs/nest/pull/17997) fix(fastify): settle async lifecycle hooks once ([@jackie-cqz](https://github.com/jackie-cqz)) * [#17998](https://github.com/nestjs/nest/pull/17998) fix(fastify): preserve custom router constraints ([@jackie-cqz](https://github.com/jackie-cqz)) * [#17938](https://github.com/nestjs/nest/pull/17938) fix(fastify): keep the default body parsers after `useBodyParser()` ([@Chaoqi31](https://github.com/Chaoqi31)) * [#17937](https://github.com/nestjs/nest/pull/17937) fix(fastify): count headers flushed on `reply.raw` in `isHeadersSent` ([@Chaoqi31](https://github.com/Chaoqi31)) * `common` * [#18090](https://github.com/nestjs/nest/pull/18090) fix(common): keep custom decorator data that has schema or pipes keys ([@Ahmad-Mosha](https://github.com/Ahmad-Mosha)) * [#18073](https://github.com/nestjs/nest/pull/18073) fix(common): reject arrays nested in ParseArrayPipe items ([@KAPUIST](https://github.com/KAPUIST)) * [#17999](https://github.com/nestjs/nest/pull/17999) fix(common): collect configurable module alias dependencies ([@jackie-cqz](https://github.com/jackie-cqz)) * [#17983](https://github.com/nestjs/nest/pull/17983) fix(common): isolate file type regexp state ([@jackie-cqz](https://github.com/jackie-cqz)) * [#17982](https://github.com/nestjs/nest/pull/17982) fix(common): preserve parent validation constraints ([@jackie-cqz](https://github.com/jackie-cqz)) * [#17949](https://github.com/nestjs/nest/pull/17949) fix(common): let a redeclared `@Inject()` property replace the parent's ([@Chaoqi31](https://github.com/Chaoqi31)) * [#17944](https://github.com/nestjs/nest/pull/17944) fix(common): keep inherited `@Optional()` properties optional ([@Chaoqi31](https://github.com/Chaoqi31)) * `microservices`, `websockets` * [#18084](https://github.com/nestjs/nest/pull/18084) fix(websockets, microservices): fallback to 'Error' for minified exception class names ([@korrayt](https://github.com/korrayt)) * `websockets` * [#18088](https://github.com/nestjs/nest/pull/18088) fix(websockets): copy the options object in the base ws exception filter ([@Mihir-Rabari](https://github.com/Mihir-Rabari)) * [#18089](https://github.com/nestjs/nest/pull/18089) fix(websockets): log scoped gateway resolution errors without a hook ([@basteez](https://github.com/basteez)) * [#18048](https://github.com/nestjs/nest/pull/18048) fix(websockets): pass gateway lifecycle hook errors to exception filters ([@kamilmysliwiec](https://github.com/kamilmysliwiec)) * [#18046](https://github.com/nestjs/nest/pull/18046) fix(websockets): pass the pattern when a scoped handler fails to resolve ([@kamilmysliwiec](https://github.com/kamilmysliwiec)) * [#18044](https://github.com/nestjs/nest/pull/18044) fix(websockets): use the hook name as pattern for request-scoped hooks ([@OmBhandwaldar](https://github.com/OmBhandwaldar)) * [#17985](https://github.com/nestjs/nest/pull/17985) fix(websockets): retain shared contexts during disconnect hooks ([@jackie-cqz](https://github.com/jackie-cqz)) * `common`, `core`, `platform-express` * [#17923](https://github.com/nestjs/nest/pull/17923) fix(common,core,express): answer method miss on an excluded route ([@thekhegay](https://github.com/thekhegay)) * `platform-ws` * [#18003](https://github.com/nestjs/nest/pull/18003) fix(ws): default omitted adapter creation options ([@jackie-cqz](https://github.com/jackie-cqz)) * `core`, `websockets` * [#17979](https://github.com/nestjs/nest/pull/17979) fix(websockets): resolve global scoped enhancers per connection ([@jackie-cqz](https://github.com/jackie-cqz)) * `core`, `testing` * [#17952](https://github.com/nestjs/nest/pull/17952) fix(core): take the scope of the class in `useClass()` overrides ([@Chaoqi31](https://github.com/Chaoqi31)) #### Enhancements * `platform-express`, `platform-fastify` * [#18074](https://github.com/nestjs/nest/pull/18074) feat(express,fastify): add field nesting and array index upload limits ([@KAPUIST](https://github.com/KAPUIST)) #### Docs * [#18099](https://github.com/nestjs/nest/pull/18099) docs(samples): replace broken api.travis-ci.org badges (Closes [#18091](https://github.com/nestjs/nest/issues/18091)) ([@auroraxo](https://github.com/auroraxo)) #### Dependencies * `platform-fastify` * [#18050](https://github.com/nestjs/nest/pull/18050) fix(deps): update dependency @fastify/formbody to v9.0.1 ([@renovate[bot]](https://github.com/apps/renovate)) * [#18051](https://github.com/nestjs/nest/pull/18051) fix(deps): update dependency @fastify/middie to v9.3.5 ([@renovate[bot]](https://github.com/apps/renovate)) * [#18039](https://github.com/nestjs/nest/pull/18039) fix(deps): update dependency @fastify/cors to v11.3.1 ([@renovate[bot]](https://github.com/apps/renovate)) * `platform-socket.io` * [#18015](https://github.com/nestjs/nest/pull/18015) chore(deps): bump socket.io from 4.8.3 to 4.8.4 ([@dependabot[bot]](https://github.com/apps/dependabot)) #### Committers: 23 - Abdellatif Anaflous ([@hktitof](https://github.com/hktitof)) - Ahmed Gamal ([@Ahmad-Mosha](https://github.com/Ahmad-Mosha)) - Aurora ([@auroraxo](https://github.com/auroraxo)) - Chaoqi ([@Chaoqi31](https://github.com/Chaoqi31)) - Dustin ([@GiHoon1123](https://github.com/GiHoon1123)) - Hangell ([@Hangell](https://github.com/Hangell)) - Johnny J. Huirilef Millán ([@johnnyhuirilef](https://github.com/johnnyhuirilef)) - Kamil Mysliwiec ([@kamilmysliwiec](https://github.com/kamilmysliwiec)) - Lee Jae Hyun ([@izg0820](https://github.com/izg0820)) - Luke Son ([@KAPUIST](https://github.com/KAPUIST)) - Maksym Lyskov ([@maxymlyskov](https://github.com/maxymlyskov)) - Metehan Biçer ([@Metehan-Bicer](https://github.com/Metehan-Bicer)) - Micael Levi L. Cavalcante ([@micalevisk](https://github.com/micalevisk)) - Mohamed-Zakaria ([@Mohamed-Elshesheny](https://github.com/Mohamed-Elshesheny)) - Om Bhandwaldar ([@OmBhandwaldar](https://github.com/OmBhandwaldar)) - Rabari Mihir ([@Mihir-Rabari](https://github.com/Mihir-Rabari)) - RedShapedMoon ([@korrayt](https://github.com/korrayt)) - Roman Khegay ([@thekhegay](https://github.com/thekhegay)) - Tiziano Basile ([@basteez](https://github.com/basteez)) - Younes Beriane ([@drakeo338](https://github.com/drakeo338)) - [@gophersg](https://github.com/gophersg) - jackie_cqz ([@jackie-cqz](https://github.com/jackie-cqz)) - Žan Mlakar ([@zanmlakar](https://github.com/zanmlakar))
Related Repositories
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
Interactive roadmaps, guides and other educational content to help developers grow in their careers.
Reverse engineer anything with agents, from app behavior down to native binaries.
The open source coding agent.
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.