yarn @nestjs/platform-express 12.5.0
v12.5.0

55 minutes ago

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

Docs

  • microservices
    • #18497 docs(microservices): fix the noack and noassert docs of the rmq options (@gjija)

Committers: 7

Don't miss a new platform-express release

NewReleases is sending notifications on new releases.