Repository navigation
v12.6.1 (2026-11-25)
Notable changes
New features
- RabbitMQ server:
nackOnInternalError(falseby default). WithnoAck: false, the message of a handler that fails with an internal error (an exception other than anRpcException) is negatively acknowledged without requeue, so a dead letter exchange of the queue receives it. It used to stay unacknowledged until the channel closed – #18686
New defaults and behaviour changes
ParseDatePiperejects more dates thatnew Date()would roll into the next month: unpadded and dotted numeric dates (2/30/2024), month names (Feb 30, 2024), two-digit years (4/31/24), and dates after a weekday or with other separators (Fri 02/30/2024,2024 02 30) – #18652, #18673, #18675, #18693ParseArrayPipewithstopAtFirstError: falsecollects the exceptions of a customexceptionFactorythat are not anHttpException(e.g.RpcException) for every item again, where since 12.5.0 it threw the first one – #18689ParseEnumPipereturns an exact match before a numeric one, so'0'gives'0'rather than0for an enum that has both – #18649applyDecorators()uses what a composed decorator returns, as TypeScript does: a returned descriptor replaces the method and a returned class replaces the class. A composed parameter decorator (e.g.applyDecorators(Inject(TOKEN))on a constructor parameter) gets the parameter's index – #18688ConsoleLoggerredactalso masks the entries ofHeaders,URLSearchParamsandFormData, the username, password and search params of aURL, and theerrorandsuppressedof aSuppressedError, which JSON mode now also serializes – #18670, #18692, #18676@nestjs/platform-express: a multipart field name that puts a__proto__key or aconstructor[prototype]path inreq.bodygets a 400 ("Invalid field name"), as on@nestjs/platform-node– #18666- Upload limits given as
NaN(parts,fieldNestingDepth,fieldArrayIndexLimit, andjsonFieldsSizeon Fastify) take their default: on Express and Node they used to turn the limit off, on Fastify startup failed. On Fastify, a field whosemaxCountisNaNgets no files – #18653, #18668, #18656 @nestjs/platform-socket.io: a client whoseallowRequestcheck throws or rejects is refused, and the error logged; it used to reach the process handlers – #18650
Microservices
- RabbitMQ fanout server with
exchangeType: 'fanout'and noexchange: it asserts a fanout exchange named after its queue and binds the queue to it, which is where the client publishes. An existing exchange of that name with another type fails startup – #18660 - Redis, RabbitMQ, Kafka and gRPC servers closed while their client is being created:
listen()fails with "Connection closed" instead of starting – #18638 - TCP client:
close()rejects a pending connect with "Connection closed" – #18643; the Redis and MQTT clients reset their connection state onclose()before quitting – #18640, #18639 - NATS server: headers set with
NatsRecordBuilder.setHeaders()as a plain object are sent with the reply; such a reply used to fail – #18695
Dependencies
@nestjs/platform-fastify:@fastify/middie9.3.9 (release notes). It also adds a middleware used on the application to the plugins registered before it, as the adapter already did; a middleware runs once per request – #18644- Since
@fastify/middie9.3.7 (@nestjs/platform-fastify12.6.0), the Fastify adapter needs Node.js 20.19+ or 22.12+: middie loads the ES modulepath-to-regexp9 withrequire()
Features
microservices- #18686 feat(microservices): add rmq option to nack messages of internal errors (@kamilmysliwiec)
Bug fixes
common- #18688 fix(common): keep the values returned by composed decorators (@abdurrahmanriyad)
- #18689 fix(common): collect custom item exceptions in parse array pipe (@salasjr)
- #18694 fix(common): export ShutdownHooksOptions and GlobalPrefixOptions from the package root (@davydmaker)
- #18693 fix(common): reject days past month end after a weekday or with any date separator (@Johannes7549)
- #18692 fix(common): redact the credentials and search params of urls in logs (@Johannes7549)
- #18676 fix(common): log and redact both errors of a disposal failure (@Johannes7549)
- #18675 fix(common): reject days past month end in dates with two-digit years (@Johannes7549)
- #18670 fix(common): redact headers, search params and form data in logs (@zelalem61)
- #18673 fix(common): reject days past month end in dates with month names (@zelalem61)
- #18652 fix(common): reject days past month end in slash and dot date formats (@Asadshah7950)
- #18649 fix(common): prefer exact enum match over numeric coercion in ParseEnumPipe (@ragib-mrb)
core- #18690 fix(core): drop a middleware route a wildcard route covers (@pengzh1)
- #18691 fix(core): read discovery metadata through the class-ref registry (@yuvrajtiwary-bitmesraece)
- #18671 fix(core): exclude a global prefix path written with a trailing slash (@abdurrahmanriyad)
- #18665 fix(core): discover overridden providers by the metadata of their override (@Johannes7549)
- #18626 fix(core): respect module filters in metadata discovery (@dani7514)
- #18663 fix(core): read the provider of a class token in repl methods() (@Johannes7549)
- #18658 fix(core): restore logger after overlapping silent lazy loads (@thejesh23)
- #18654 fix(core): keep replaced providers and controllers out of discovery (@yuvrajtiwary-bitmesraece)
- #18633 fix(core): list own methods of plain object providers in repl methods() (@yuvrajtiwary-bitmesraece)
microservices- #18695 fix(microservices): send plain nats reply headers (@beyondwin)
- #18660 fix(microservices): bind rmq fanout servers to the client's exchange (@izg0820)
- #18643 fix(microservices): reject pending non-TLS connect on close and ignore late connect on closed TCP sockets (@ragib-mrb)
- #18638 fix(microservices): stop redis, rmq, kafka and grpc startup after close (@prkomb)
- #18640 fix(microservices): reset redis client state before quit and reject closed connects (@ragib-mrb)
- #18639 fix(microservices): reset mqtt client state before endAsync and ignore dropped client events (@ragib-mrb)
platform-expressplatform-fastify- #18644 fix(fastify): run a middleware once when middie also adds it to plugins (@kamilmysliwiec)
- #18681 fix(fastify): redirect a raw response (@Siltonn)
- #18668 fix(fastify): use default upload limits when given as nan (@prkomb)
- #18656 fix(fastify): reject the files of a field whose max count is nan (@prkomb)
platform-nodeplatform-socket.io- #18650 fix(socket.io): refuse a client whose request check throws (@beyondwin)
platform-wsplatform-express,platform-fastify,platform-node- #18653 fix(platform): use default upload limits when given as nan (@Asadshah7950)
Enhancements
common- #18684 perf(common): format the log timestamp once per second (@thekhegay)
Committers: 20
- Abdellatif Anaflous (@hktitof)
- Abdur Rahman (@abdurrahmanriyad)
- Asad Ali Shah (@Asadshah7950)
- Daniel Misganaw (@dani7514)
- Elmer (@Siltonn)
- Kamil Mysliwiec (@kamilmysliwiec)
- KevinZhou (@pengzh1)
- Khagani Mamedov (@prkomb)
- Koh Hom(Xu Feng) (@clean99)
- Lee Jae Hyun (@izg0820)
- Ofri Peretz (@ofri-peretz)
- Ragib MRB (@ragib-mrb)
- Roman Khegay (@thekhegay)
- Thejesh (@thejesh23)
- WooSeung Kim (@beyondwin)
- Yohannes (@Johannes7549)
- Yuvraj Tiwary (@yuvrajtiwary-bitmesraece)
- Zelalem Habtamu (@zelalem61)
- davyd (@davydmaker)
- salahadin juhar (@salasjr)