Skip to content

Releases

v12.5.0

Choose a tag to compare

@kamilmysliwiec kamilmysliwiec released this 12 Nov 13:19
3a1c9ac

v12.5.0 (2026-11-12)

Notable changes

New options

  • WsAdapter takes maxPayload, the largest message a client may send (1 MB by default, was 100 MB; a gateway's own maxPayload takes precedence, 0 lifts the limit); a larger message closes the connection with code 1009 – 109e52cd9b
  • IoAdapter takes maxWaitingMessages, the number of a client's messages of one event that may wait beyond those being handled (10,000 by default; Infinity lifts it) – c98b5f782e
  • TCP server: maxConcurrentMessages (1000 per connection by default; 0 lifts it) – 42c619cd69
  • gRPC server: maxPendingResponses (1000 by default; 0 disables), after which a streaming call whose client leaves its responses unread fails with RESOURCE_EXHAUSTED – ce6d44d858
  • Redis server: maxWildcardChannelLength (1024 characters by default; 0 disables) for requests matched through a wildcard subscription – 074dcf7c60
  • RabbitMQ: maxMessageSize (16 MiB by default) for messages and replies decoded as JSON – da6b3fc5bc
  • @nestjs/platform-fastify: multipart limits.jsonFieldsSize (1 MiB by default) for the fields of a request sent as application/json – 958316696f

New defaults and behaviour changes

  • TCP: maxBufferSize defaults to 16 Mi characters (was 128 Mi), in both directions – 55da0b0d33 – and now applies to each packet rather than to everything received in one read, so a burst of small packets no longer closes the connection (#18502) – ce285e6ad3
  • TCP server: an empty or unset host now listens on localhost; set host: '0.0.0.0' (or '::') to listen on every interface – 4196d3655d
  • @nestjs/platform-express, @nestjs/platform-node: multipart requests default to at most 1000 parts, which also caps a fields, files or maxCount above 1000 unless limits.parts is raised – b2bbc17122
  • An upload option a route sets to undefined or null now keeps the module's value; use Infinity to lift a limit – 7bc8d9121e
  • A limit option given as NaN (e.g. Number(process.env.UNSET)) now gets its default instead of turning the limit off, for TCP, Kafka, WsAdapter, IoAdapter, the validation pipes and @Sse() – 8209d1c8be, f956177a0e, 5b58a6e89f
  • ClassSerializerInterceptor and StandardSchemaSerializerInterceptor serialize each object a streamed HTTP response yields, so @Exclude(), groups and schemas apply to every line of NDJSON – 8217f2b3b8
  • @Sse(): while Node.js has paused the socket of a client, a : comment is written every 5 s, so that a client that left is noticed – cd963b19bd
  • @nestjs/platform-express, @nestjs/platform-node: a SyntaxError or URIError without a 400 status (e.g. thrown by a middleware passed to app.use()) is answered with a logged 500 rather than a 400 carrying its message – 8d74ddcd3a
  • @nestjs/platform-node: when the matched route would leave a route parameter empty, the request is a 404 – 56c06f48c3
  • Middleware given to forRoutes() is mounted where the router serves the routes it covers, including routes excluded from the global prefix – 521cdea80f
  • Parameter pipes of controllers built with mixins or wrapped by a class decorator that returns a Proxy now run – 7c5792d969
  • The exclude predicate of enableCsrfProtection() excludes a request only when it returns true – 608fcec0a9
  • Gateways on their own port drop clients that connect before onApplicationBootstrap() has finished; socket.io clients reconnect – 7d705cc835
  • In a standalone microservice, a gateway without a port no longer opens a server on a random port; it gets a server that does not listen – 7359d3b06a
  • An @Optional() dependency that exists but fails to build at request time now fails its consumer – 0c360708b5
  • Transient providers with durable dependencies are built per request – 822d93ffd1
  • moduleRef.create() rejects a request-scoped property dependency, as it does for constructor parameters – 6c5fed8b72

New startup errors and warnings

  • A guard, interceptor or pipe that can't run (e.g. an abstract class used as a token, or a class given as the useValue of APP_GUARD) fails the application at startup; an exception filter that can't run logs a warning – 7a81aed500, 407518855f
  • An invalid forRoutes() or exclude() entry fails the application at startup – 1afb768959
  • A gateway that joins a shared server with a verifyClient or allowRequest the server won't run, or gateways on one port that set different hosts, stop the application at startup – 32875410dc, fd0155fba0
  • @nestjs/platform-fastify: @All('x') declared above @Search('x') or a WebDAV method on the same path fails at startup, as the reverse order already did; @All() routes now also answer these methods – a1695d18ea
  • Warnings for exception filter classes bound to a middleware, which don't apply – 3113f03f1e – and for a ValidationPipe that gets no parameter types – f433a1f752

Microservices

  • gRPC: an Error wrapped in an RpcException is logged and answered as "Internal server error"; its numeric code is still used as the status – 2038bff425
  • A filter that throws on a response stream is logged and answered as "Internal server error" – 515f99cfb6
  • Kafka: events can no longer ask for a reply through reply headers, and replies no longer carry them – d1473338c3; an object with a key or value and other properties is sent as the payload – 73373dc911; a request whose reply topic is one the server handles itself is dropped – 809029b74b
  • RabbitMQ wildcards: a message whose pattern names a different handler than its routing key is not handled – ef8f92c5d0
  • Patterns with a string value over 4096 characters or more than 100 keys get a marker route – ed8ca5cded; multi-key patterns with a non-ASCII key may get a new route, so clients and servers of such patterns should be on the same version – 015456cc2f

@nestjs/core and the platform packages should be updated together, as the adapters pass new route matching options to core.

Bug fixes

Read more

v11.2.10

Choose a tag to compare

@kamilmysliwiec kamilmysliwiec released this 12 Nov 18:52
89a3e0f

What's changed

Read more

v12.4.1

Choose a tag to compare

@kamilmysliwiec kamilmysliwiec released this 09 Nov 08:01
3737faf

v12.4.1 (2026-11-09)

Features

  • platform-node
    • #18435 feat(node): inject requests into the node adapter like the fastify one (@thekhegay)
    • #18439 feat(node): set req.route on the node adapter like express does (@thekhegay)

Bug fixes

Enhancements

Dependencies

Committers: 8

v11.2.9

Choose a tag to compare

@kamilmysliwiec kamilmysliwiec released this 09 Nov 07:53
c6cf340

What's changed

v12.4.0

Choose a tag to compare

@kamilmysliwiec kamilmysliwiec released this 06 Nov 10:11
c0e503b

v12.4.0 (2026-11-06)

Features

  • platform-node
    • #18396 feat(node): let the node adapter set locals for every view (@thekhegay)

Bug fixes

  • microservices
    • #18418 fix(microservices): ignore an mqtt server's own replies under wildcards (@pavstev)
    • #18413 fix(microservices): reach handlers whose string pattern reads as json (@pavstev)
    • #18392 fix(microservices): forward grpc call options on request streams (@DenisCDev)
    • #18393 fix(microservices): await the mqtt close and reset the client state (@hktitof)
  • common
    • #18419 fix(common): keep the fields of grouped item errors in parse array pipe (@pavstev)
    • #18402 fix(common): keep console logger from mutating the caller options (@pavstev)
  • platform-node
    • #18417 fix(node): omit the Content-Length of a redirect with a Transfer-Encoding (@hktitof)
    • #18415 fix(node): give each route that shares a path shape its own params (@pavstev)
    • #18372 fix(node): strip trailing slashes when resolving view names (@saiyam-jain-dev)
    • #18403 fix(node): omit content-length when transfer-encoding is set (@pavstev)
    • #18395 fix(node): render with eta, liquidjs and art-template (@thekhegay)
    • #18391 fix(node): add the charset to a content type the app sets (@pavstev)
  • platform-fastify
    • #18414 fix(fastify): answer 403 for a path the static plugin refuses (@pavstev)
  • core, testing
    • #18410 fix(core): apply a provider override whose value is undefined (@pavstev)
  • platform-express, platform-fastify, platform-node
    • #18400 fix(express,node,fastify): declare rxjs as a peer dependency (@ryodine)
  • core

Enhancements

  • common, core

Dependencies

Committers: 8

v12.3.0

Choose a tag to compare

@kamilmysliwiec kamilmysliwiec released this 28 Oct 11:41
3acb8e5

v12.3.0 (2026-10-27)

Features

Bug fixes

  • common
  • core
    • #18276 fix(core): run middleware once for routes that differ only in version (@OmBhandwaldar)
    • #18262 fix(core): tolerate sse request sockets without tuning methods (@SnowingFox)
    • #18252 fix(core): read the url protocol from the server (@thekhegay)
    • #18254 fix(core): name the array and index of undefined module entries (@thekhegay)
    • #18235 fix(core): discover classes by each of their discovery decorators (@OmBhandwaldar)
    • #18216 fix(core): read the abort on error option of the app being called (@thekhegay)
    • #18209 fix(core): let middleware exclusions cover prefix-excluded routes (@thekhegay)
    • #18210 fix(core): honor abortOnError passed to select() (@Cayan)
    • #18215 fix(core): subscribe to handler observables from other rxjs copies (@koreahghg)
    • #18201 fix(core): read a quoted media type version in the middleware exclusions (@hktitof)
    • #18200 fix(core): resolve request-scoped forward refs for concurrent requests (@maxymlyskov)
  • common, microservices, platform-ws
  • common, microservices, websockets
    • #18272 fix(common): keep one route param per argument in an overriding method (@maxymlyskov)
  • platform-express
    • #18264 fix(express): map unsupported multipart content types to 415 (@seren-wib)
    • #18234 fix(express): end a head response for an empty streamable file (@spokodev)
    • #18232 fix(express): leave 5xx http-errors errors unmapped so they are logged (@kamilmysliwiec)
    • #18214 fix(platform-express): map http-errors exceptions to HttpException in Express adapter (@okxint)
    • #18199 fix(express): send the standard body for an exception wrapping an error (@KAPUIST)
  • platform-fastify
  • core, platform-express, platform-fastify, platform-socket.io, platform-ws, websockets
    • #18251 fix(core,express,fastify,ws,socket.io): load adapters with an older core (@thekhegay)
  • microservices
    • #18250 fix(microservices): re-arm the redis retries on a new listen (@hktitof)
    • #18255 fix(microservices): report a nats connection that gave up reconnecting (@thekhegay)
    • #18249 fix(microservices): do not emit a trailing null to kafka requesters (@thekhegay)
    • #18256 fix(microservices): let a retriable exception keep travelling (@hktitof)
    • #18238 fix(microservices): retry the tcp server again after close and listen (@kamilmysliwiec)
    • #18223 fix(microservices): clear the tcp retry timer when a new listen starts (@hktitof)
    • #18221 fix(microservices): honor mqtt topic filter boundaries (@fabric0de)
    • #18229 fix(microservices): let only the exact message handler answer a request (@maxymlyskov)
    • #18211 fix(microservices): fail the request when its last reply cannot be sent (@maxymlyskov)
    • #18206 fix(microservices): reset the tcp retry attempts on each listen (@hktitof)
    • #18204 fix(microservices): count every failed rmq connection attempt (@maxymlyskov)
    • #18197 fix(microservices): send the record headers of nats as message headers (@hktitof)

Dependencies

Committers: 16

v11.2.8

Choose a tag to compare

@kamilmysliwiec kamilmysliwiec released this 23 Oct 12:40
8e3a557

What's changed

Read more

v12.2.0

Choose a tag to compare

@kamilmysliwiec kamilmysliwiec released this 19 Oct 10:50
af37111

v12.2.0 (2026-10-19)

Notable changes

New options

  • @Sse({ maxPendingDataLength }) sets how many characters of event data may wait for a client that is not reading its events (4M by default; 0 or Infinity lifts the limit) – 2f05ad954e
  • IoAdapter and WsAdapter take maxConcurrentMessages, the number of a client's messages handled at once (1000 by default; Infinity lifts it) – 0bd0810ed7
  • ValidationPipe takes maxErrorMessagesLength (1,000,000 characters by default); messages past it are replaced by a "Further validation errors were omitted" entry – 086c1c514f
  • Kafka: parser.maxMessageSize (16 MiB after decompression by default); larger messages are logged and skipped – 9bdf844fca
  • TCP server: drainTimeout (30 s by default, 0 disables) disconnects a peer that leaves its responses unread – 583d6077ad
  • MQTT server: reconnectOnConnackError is now enabled by default, so a refused connection attempt is retried; set it to false for the previous behaviour – a63cea600a
  • HttpServer.getRouteMatchingOptions(), an optional adapter hook that tells core how the router matches paths (see "Middleware exclusions" below) – 08d8677c8d

New defaults and behaviour changes

  • @nestjs/platform-express, @nestjs/platform-fastify: fieldNestingDepth and fieldArrayIndexLimit (#18074) now default to 32 and 1000; set them to Infinity to lift the limits – 94fcc93770
  • ValidationPipe validates with validationError.target: false unless the options set it, so an exceptionFactory that reads error.target gets undefined; set validationError.target to true for the old errors – 8c5a59bf63
  • ValidationPipe answers an array or a primitive sent for a validated class with a 400 – 197371c1f3
  • FileTypeValidator matches a string fileType up to the end of a name (e.g. font/woff no longer accepts font/woff2; use a RegExp for that) – 770c6f1a19
  • @SerializeOptions({}) on a handler no longer turns off the class schema – d27cb7017f
  • BaseExceptionFilter answers http-errors errors created with expose: false (the default from 500) with the standard reason phrase instead of their message – 9ed572f853
  • A StreamableFile error still gets a 400, but the body no longer carries the error message – 2f28d91afb
  • Files uploaded with a request that a pipe rejected are removed from storage – acb98de89e
  • @nestjs/platform-fastify: a route with fileSize: undefined (or null) falls back to the plugin's limit; set it to Infinity to keep uploads unlimited – dd549e1a74
  • @nestjs/platform-express: object error bodies are sent as application/json on routes with a non-JSON Content-Type – 7dc6e349d5
  • ConsoleLogger in JSON mode cuts a record short past about a million characters – ad4915eaa3
  • A global enhancer that the injector failed to instantiate now fails the application at startup – ae78524ced
  • A request- or transient-scoped APP_FILTER now logs a startup warning, as it only applies to exceptions thrown from controllers – df5275c5e1
  • Microservices: a pattern key longer than 256 characters matches no handler – accd27e66c
  • Kafka: a message may carry up to 10,000 header values (e419ff540b); headers given as a string or array are not sent (312777743f); reply headers are decoded as text (ee94f6aaae)
  • gRPC: request streams are paused while their replies wait to be written – 37e5cf7706
  • Deprecation: on TCP, Redis, NATS, MQTT and RabbitMQ, an @EventPattern() handler that replies to ClientProxy#send() now logs a deprecation warning. The reply is unchanged; in the next major version event handlers will not reply to send(), as on Kafka already – ba3668d36b

Middleware exclusions

  • MiddlewareConsumer.exclude() now compiles excluded routes with the router's case and trailing-slash matching (08d8677c8d). Update @nestjs/core together with @nestjs/platform-express / @nestjs/platform-fastify: with an adapter that does not implement getRouteMatchingOptions(), excluded routes are matched exactly (f5aa875e40), so on a lenient router other spellings of an excluded path run the middleware.
  • With header, media type or custom versioning, exclude({ path, method, version }) and enableCsrfProtection({ exclude }) apply only to requests that ask for one of the excluded versions – 1a7a31fa46
  • @nestjs/platform-fastify: the request hook used by enableCsrfProtection() and useSecurityHeaders() now runs before Nest and app.use() middleware with NestFactory.create() too, including middleware registered before either call, as it already did with Test.createNestApplication() – 8351806290

Bug fixes

Read more

v12.1.3

Choose a tag to compare

@kamilmysliwiec kamilmysliwiec released this 12 Oct 11:29
4514623

v12.1.3 (2026-10-12)

Bug fixes

Read more

v12.1.1

Choose a tag to compare

@kamilmysliwiec kamilmysliwiec released this 28 Sep 09:06
9feedff

v12.1.1 (2026-09-28)

Bug fixes

  • common, core, microservices, testing
    • #17893 fix(common): logger bugs in json output, level changes, fatal and buffered logs (@kamilmysliwiec)
  • microservices
    • #17891 fix(microservices): let the mqtt client retry after a failed connect (@hktitof)
    • #17888 fix(microservices): keep tcp event listeners across reconnects (@KAPUIST)
    • #17887 fix(microservices): ignore events from a replaced tcp client socket (@KAPUIST)
    • #17878 fix(microservices): keep a newer nats connection when a stale one fails (@hktitof)
    • #17869 fix(microservices): keep a newer kafka connection when a stale one fails (@kamilmysliwiec)
    • #17865 fix(microservices): let the rmq client retry after a failed connect (@hktitof)
    • #17866 fix(microservices): reply on the request channel when redis wildcards are enabled (@fadiroot)
    • #17861 fix(microservices): recover the nats client after it gives up reconnecting (@xia-chao)
  • common
    • #17884 fix(common): preserve string enum values matching numeric member names (@KAPUIST)
  • core
    • #17871 fix(core): detect circular dependencies across more than two providers (@erezcor)
  • platform-fastify
    • #17867 fix(fastify): treat a JSON content type with parameters as JSON in reply() (@fadiroot)
  • core, testing
    • #17860 fix(core): honor class and factory overrides of value providers (@lehafari)

Enhancements

  • common
  • microservices
    • #17863 feat(microservices): export deserializers from the package root (@lazerg)

Committers: 13