11.2.8
What's changed
@nestjs/common- fix(common): reject non-numeric items in ParseArrayPipe with items Number — backport of #17876
- fix(common): reject arrays nested in ParseArrayPipe items — backport of #18073
- fix(common): skip array holes when stripping prototype keys
- fix(common): copy array and object defaults in
DefaultValuePipe - fix(common): cut json log records short past a million characters
- fix(common): strip a falsy constructor key from request data
- fix(common): validate parsed array items one at a time
- fix(common): stop copying nested validation errors for each level
- fix(common): reject arrays and primitives for validated classes
- fix(common): limit the length of validation error messages by default
- fix(common): stop exposing the validated object on validation errors
- fix(common): match a file type string up to the end of a name
- fix(common): handle
StreamableFileerrors raised before the reply - fix(common): keep
StreamableFileerror messages out of responses - fix(common): abort the response when a streamable file fails midway — backport of #18220
@nestjs/core- fix(core,express,fastify): match excluded routes like the router does
- fix(core): match excluded routes exactly when the router is unknown
- fix(core): answer host mismatches on fastify with 404
- fix(core): never exclude request targets with "#" or in absolute form
- fix(core): mount unversioned middleware paths under the default version
- fix(core): map controller middleware under every module declaring it
- fix(core): mount transient-scoped middleware instead of skipping it — on v11 this also mounts the middleware listed after a transient one, which was skipped as well
- fix(core): drop an overlapped middleware route only when it is covered
- fix(core): mount wildcard middleware on every path when "/" is excluded
- fix(core): mount middleware paths on routes excluded from the prefix
- fix(core): stop wildcard exclusions from covering their parent route
- fix(core): run middleware on a controller root excluded by a wildcard
- fix(core,common): exclude a version only for requests that ask for it
- fix(core,microservices,websockets): ignore inherited keys of non-objects
- fix(core): stop the Observable producer when the client disconnects — backport of #17826
- fix(core): end sse responses to head requests once headers are sent
- fix(core): do not send the message of an unexposed http error
- fix(core): destroy a
StreamableFiledropped by a timed-out handler - fix(core): destroy a
StreamableFilethat is not sent - fix(core,express,fastify): remove uploads of requests a pipe rejected
- fix(core): hand sse header errors to the exception filters
- fix(core): drop sse clients that stop reading their events
- fix(core): hide internal error messages from sse error events
- fix(core): make the sse pending data limit configurable
- fix(core): apply the expose flag of http errors to sse error events
- fix(core,microservices): run transient global enhancers on controllers — backport of #17993
- fix(core): stop silently dropping request-scoped global enhancers — backport of #18066; a global enhancer whose dependency tree is request-scoped is no longer silently skipped
- fix(core): fail at startup for request-scoped class global enhancers — backport of #18104; such an enhancer (e.g.
APP_GUARDwithuseClass) now fails at startup instead of running without its dependencies - fix(core): read class-level enhancers from the registered class
- fix(core): apply the enhancers of class providers under any token
- fix(core): run enhancers that are request-scoped through dependencies
- fix(core): fail at startup when a global enhancer is not instantiated
- fix(core): run transient global enhancers on static entry providers
- fix(core,websockets): run transient enhancers bound to static gateways
- fix(core): run guards bound as classes without a name
- fix(core): subscribe to guard observables from other copies of rxjs
- fix(core): run interceptor, pipe and filter classes without a name
@nestjs/platform-express- fix(express): run wildcard middleware on "/api/" for a named wildcard
- fix(express): apply middleware to controller root routes in strict mode
- fix(express): map multer array index and invalid field name codes to 400 — backport of #17857
- fix(express): destroy the
StreamableFilesource on client disconnect — backport of #17973 - fix(express): send object error bodies with a json content type
- fix(express,fastify): handle a
StreamableFilethat cannot be streamed - fix(express): stop reading a streamable file for a head request
@nestjs/platform-fastify- fix(fastify): treat an empty route parameter as a route miss
- fix(fastify): answer request targets that are not a path with 404
- fix(fastify): pass middleware rejections to the error handler
- fix(fastify): pass version extractor errors to the error handler
- fix(fastify): match middleware paths like a case-insensitive router
- fix(fastify): apply middleware to plugins registered before init
- fix(fastify): run cors before nest middleware — backport of #18217
- fix(fastify): stop reading a streamable file for a head request
@nestjs/microservices- fix(microservices): close tls connections still in their handshake
- fix(microservices): keep sibling event handlers running on error
- fix(microservices): reject tcp data too long to be a content length
- fix(microservices): keep reading tcp replies during client backpressure — backport of #18162
- fix(microservices): drop tcp peers that stop reading their responses
- fix(microservices): reply to a request only from its message handler
- fix(microservices): stop tcp observable responses when the peer leaves
- fix(microservices): route message handler rejections to handleError — backport of #17785
- fix(microservices): reject mqtt topics longer than 65535 bytes
- fix(microservices): use unguessable request ids and nats reply inboxes
- fix(microservices): drop rmq replies that amqp cannot address
- fix(microservices): only emit rmq replies that a request waits for
- fix(microservices): drain streamed replies in linear time
- fix(microservices): limit the length of pattern keys
- fix(microservices): validate request ids before echoing them
- fix(microservices): route mqtt messages by the topic they arrived on
- fix(microservices): send no kafka headers given as a string or array
- fix(microservices): decode kafka reply headers as text
- fix(microservices): limit the size of kafka messages the parser decodes
- fix(microservices): limit the number of kafka header values
- fix(microservices): let only the exact message handler answer a request — backport of #18229
- fix(microservices): honor mqtt topic filter boundaries — backport of #18221
- fix(microservices): treat an error in an rpc exception as unknown
- fix(microservices): answer grpc calls that error or complete empty
- fix(microservices): error grpc duplex calls on upstream error
- fix(microservices): send grpc errors that grpc-js can encode
- fix(microservices): fail grpc response streams that emit null
- fix(microservices): fail grpc calls whose handler promise rejects
- fix(microservices): end grpc unary subscriptions with the call
- fix(microservices): pause grpc request streams while replies wait
@nestjs/websockets@nestjs/platform-ws- fix(ws): drop messages from a client the server is closing
- fix(ws): close the socket of an upgrade request it cannot parse
- fix(ws): answer non-upgrade requests on a gateway's own port with 426
- fix(ws): listen on the host of a gateway with its own port and a path
- fix(ws): stop reading from a client that does not read its replies
Full Changelog: https://github.com/nestjs/nest/compare/v11.2.7...v11.2.8