unstale

npm / @nestjs/core

@nestjs/core

What changed in @nestjs/core 9 to 12, from its official release notes, upgrade guides and advisories. Also covers @nestjs/common. Sources checked 2026-12-05.

143 breaking30 security8 deprecations104 new APIs and options3 performance47 behavior and defaults6 tooling385 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@nestjs/core 12498 changes

Breaking changes 101

  • Fastify now fails startup if @All('x') precedes @Search('x') or a WebDAV method on the same path; @All() routes also answer those methods.

    12.5.0release notes

  • The strategy payload is injected as the request for durable providers.

    12.5.0release notes

  • Transient instances are no longer included in durable sub-trees.

    12.5.0release notes

  • On the Node platform, a matched route that would leave a route parameter empty now results in a 404.

    12.5.0release notes

  • Excluded paths end at semicolons, matching Fastify router behavior.

    12.5.0release notes

  • A trailing-slash path is excluded only when no other route can serve it.

    12.5.0release notes

  • A request fails when an upload filter throws.

    11.2.10, 12.5.0release notesrelease notes

  • An upload is cut off once the response has been sent.

    12.5.0release notes

  • Middleware is mounted where the router serves covered routes, including routes excluded from the global prefix.

    12.5.0release notes

  • An invalid forRoutes() or exclude() entry now fails the application at startup.

    12.5.0release notes

  • A gateway is refused if its connection check would not run.

    11.2.10, 12.5.0release notesrelease notes

  • Gateways on / and gateways without a namespace share streams.

    12.5.0release notes

  • Gateway clients are dropped during startup.

    12.5.0release notes

  • Clients that connect before onApplicationBootstrap() finishes are dropped; Socket.IO clients reconnect.

    12.5.0release notes

  • An Error wrapped in an RpcException is logged and answered as Internal server error; its numeric code remains the status.

    12.5.0release notes

  • An application now fails at startup when a guard, interceptor, or pipe cannot run; an exception filter that cannot run logs a warning.

    12.5.0release notes

  • An empty or unset TCP server host now listens on localhost; use 0.0.0.0 or :: to listen on every interface.

    11.2.10, 12.5.0release notesrelease notes

  • Empty strings count toward the JSON log record cap.

    12.5.0release notes

  • An object with a key or value and additional properties is now sent as the payload.

    11.2.10, 12.5.0release notesrelease notes

  • Kafka events can no longer request a reply through reply headers, and replies no longer carry those headers.

    12.5.0release notes

  • A request whose reply topic is handled by the server itself is dropped.

    12.5.0release notes

  • A limit option set to NaN now uses its default instead of turning the limit off, for TCP, Kafka, WebSocket and Socket.IO adapters, validation pipes, and @Sse().

    12.5.0release notes

  • Adds a 1 MiB default limit for multipart fields in application/json requests handled by the Fastify platform.

    12.5.0release notes

  • Express and Node platform multipart requests now default to at most 1000 parts; this also caps fields, files, or maxCount above 1000 unless limits.parts is raised.

    12.5.0release notes

  • The TCP default is now 16 Mi characters instead of 128 Mi in both directions, and the limit applies to each packet rather than everything received in one read.

    12.5.0release notes

  • Adds a gRPC server limit of 1000 pending responses by default; 0 disables it, and exceeding it fails a streaming call whose client leaves responses unread with RESOURCE_EXHAUSTED.

    12.5.0release notes

  • Patterns with string values over 4096 characters or more than 100 keys get a marker route; multi-key patterns with non-ASCII keys may get a new route, so clients and servers should use the same version.

    12.5.0release notes

  • An invalid middleware target now fails at startup, and exception filter classes bound to middleware produce a warning because they do not apply.

    12.5.0release notes

  • Rejects a request-scoped property dependency, as it already does for constructor parameters.

    12.5.0release notes

  • A consumer now fails when an optional dependency fails to load.

    12.5.0release notes

  • An optional dependency that exists but fails to build at request time now causes its consumer to fail.

    12.5.0release notes

  • Non-validation errors are rethrown rather than treated as validation failures.

    12.5.0release notes

  • Removed wrappers are released from providers they depended on.

    12.5.0release notes

  • A message is no longer handled when its pattern names a different handler than its routing key.

    12.5.0release notes

  • A filter that throws on a response stream is logged and the response is answered as Internal server error.

    12.5.0release notes

  • Startup fails when a gateway joins a shared server with an unsupported verifyClient or allowRequest, or gateways on one port set different hosts.

    12.5.0release notes

  • A gateway without a port no longer opens a server on a random port and instead gets a server that does not listen.

    12.5.0release notes

  • Express and Node platforms now answer a SyntaxError or URIError without a 400 status with a logged 500 instead of a 400 exposing its message.

    12.5.0release notes

  • Transient providers with durable dependencies are now built per request.

    12.5.0release notes

  • A route-level upload option set to undefined or null now retains the module value; use Infinity to lift a limit.

    12.5.0release notes

  • A buffer held by a nested validated property is rejected.

    12.5.0release notes

  • A buffer supplied in place of a validated class is rejected.

    12.5.0release notes

  • The value is omitted from validation errors that have children.

    12.5.0release notes

  • Sparse array gaps are closed before validation.

    12.5.0release notes

  • Binary data is no longer echoed in error replies.

    12.5.0release notes

  • Gateways sharing a port are refused if they specify different hosts.

    12.5.0release notes

  • The size of messages a client may send is limited.

    12.5.0release notes

  • A client is refused if its upgrade check throws.

    12.5.0release notes

  • Adds a maximum client message size, 1 MB by default; a gateway's own maxPayload takes precedence, 0 lifts the limit, and larger messages close the connection with code 1009.

    12.5.0release notes

  • Routes sharing a path shape now receive their own params.

    12.4.0release notes

  • rxjs is declared as a peer dependency for the Express, Fastify, and Node platform packages.

    12.4.0release notes

  • Maps unsupported multipart content types to HTTP 415.

    12.3.0release notes

  • For http-errors errors with expose: false, the response now uses the standard reason phrase instead of the error message.

    12.2.0release notes

  • create() now rejects when a dependency is request-scoped.

    11.2.10, 12.2.0release notesrelease notes

  • On Fastify with NestFactory.create(), its request hook now runs before Nest and app.use() middleware, including middleware registered before either call.

    12.2.0release notes

  • Request targets that are not a path now receive a 404.

    11.2.8, 12.2.0release notesrelease notes

  • Field nesting and array indexes are limited by default.

    12.2.0release notes

  • A string fileType now matches only through the end of a name; use a RegExp for broader matches such as font/woff accepting font/woff2.

    12.2.0release notes

  • If the injector fails to instantiate a global enhancer, the application now fails at startup.

    12.2.0release notes

  • Duplex calls now error on upstream errors.

    12.2.0release notes

  • gRPC calls now fail when their handler promise rejects.

    12.2.0release notes

  • gRPC response streams that emit null now fail.

    12.2.0release notes

  • JSON log records longer than a million characters are cut short.

    11.2.8, 12.2.0release notesrelease notes

  • Kafka messages may carry up to 10,000 header values; headers provided as a string or array are not sent, and reply headers are decoded as text.

    11.2.8, 12.2.0release notesrelease notes

  • Wildcard exclusions no longer cover parent routes, and middleware runs on controller roots excluded by a wildcard.

    12.2.0release notes

  • Excluded routes now use the router's case and trailing-slash matching; adapters without getRouteMatchingOptions() match exclusions exactly.

    12.2.0release notes

  • MQTT topics longer than 65535 bytes are rejected.

    12.2.0release notes

  • Object error bodies are sent as application/json on routes with a non-JSON Content-Type.

    12.2.0release notes

  • The fieldArrayIndexLimit default is now 1000; set it to Infinity to lift the limit.

    12.2.0release notes

  • A route with fileSize undefined or null now falls back to the plugin limit; set it to Infinity to keep uploads unlimited.

    12.2.0release notes

  • Limits Kafka messages to 16 MiB after decompression by default; larger messages are logged and skipped.

    12.2.0release notes

  • MQTT servers now retry refused connection attempts by default; set the option to false for the previous behavior.

    12.2.0release notes

  • Bootstrap fails when scoped providers have missing dependencies; testing mocks dependencies of request-scoped providers.

    12.2.0release notes

  • A StreamableFile error still returns a 400, but its response body no longer contains the error message.

    12.2.0release notes

  • Validation errors no longer expose the validated object by default, so exceptionFactory code reading error.target gets undefined; set validationError.target to true to restore the old errors.

    12.2.0release notes

  • Returns a 400 when an array or primitive is sent for a validated class.

    12.2.0release notes

  • Every event handler runs when a sibling completes empty.

    12.1.3release notes

  • ParseArrayPipe rejects arrays nested in item values.

    12.1.3release notes

  • Request-scoped global enhancers now fail explicitly at startup instead of being silently dropped.

    11.2.8, 12.1.3release notesrelease notes

  • Every pending request now fails when a callback throws.

    12.1.0release notes

  • Pending RMQ requests now fail when the client closes.

    12.0.4release notes

  • Pending requests now fail when the client closes.

    12.0.3release notesrelease notes

  • Plain handler results are no longer flattened when pre-request hooks are used.

    12.0.2release notes

  • Requests now fail when their reply subscription is rejected.

    12.0.2release notes

  • The angular schematic has been removed.

    12.0.0release notesupgrade guideupgrade guide

  • ArgumentMetadata is now generic, requiring adjustments to some hand-written custom pipe signatures.

    12.0.0release notesupgrade guideupgrade guide

  • Plain objects after log messages are now attached as structured parameters by default; structuredParams false restores prior behavior.

    12.0.0release notesupgrade guideupgrade guide

  • Core Nest packages are now ESM-only, while CommonJS applications can continue using them through require(esm).

    12.0.0upgrade guide

  • GraphiQL is now the default GraphQL IDE, and customization uses an options object.

    12.0.0upgrade guide

  • Throwing HealthCheckError no longer reports unhealthy health checks.

    12.0.0upgrade guide

  • The legacy health indicator base class has been removed; custom indicators must use HealthIndicatorService.

    12.0.0upgrade guideupgrade guide

  • Lifecycle hooks are now invoked by component hierarchy level, which may change ordering assumptions.

    12.0.0release notesupgrade guideupgrade guide

  • The NATS transport package replaces nats; direct imports and message handling must be updated.

    12.0.0release notesupgrade guideupgrade guide

  • NATS packets are serialized as JSON strings, and custom deserializers receive the full message object.

    12.0.0upgrade guideupgrade guide

  • CLI generation and upgrade commands require Node.js v22.22.3+, v24.15+, or v26+.

    12.0.0upgrade guide

  • Version 12 requires TypeScript 6 as a peer dependency, so projects must update TypeScript when installing the package.

    12.0.0upgrade guide

  • NestJS 12 requires Node.js 20.19+ or 22.12+; the 21.x line is unsupported.

    12.0.0release notesupgrade guideupgrade guide

  • Optional constructor parameter markers are no longer inherited by subclasses.

    12.0.0upgrade guideupgrade guide

  • In 12.0.x, a subclass without its own constructor also loses its parent's optional markers; this behavior changes starting with NestJS v12.1.

    12.0.0upgrade guide

  • GraphQL subscriptions transport support was removed; clients must switch to graphql-ws.

    12.0.0release notesupgrade guideupgrade guide

  • Joi-specific validation settings must be moved under validationOptions.libraryOptions.

    12.0.0release notesupgrade guideupgrade guide

Security 13

Deprecations 7

  • Warns when decorator metadata is missing.

    12.4.1release notes

  • Request- or transient-scoped APP_FILTER now logs a startup warning because it only applies to exceptions thrown from controllers.

    12.2.0release notes

  • Event handlers that reply to send() are deprecated.

    12.2.0release notes

  • On TCP, Redis, NATS, MQTT, and RabbitMQ, an event handler replying to ClientProxy#send() now logs a deprecation warning; replies remain unchanged, but event handlers will not reply to send() in the next major version.

    12.2.0release notes

  • Terminus built-in indicator timeout options are deprecated in favor of chaining withTimeout on the returned attempt.

    12.0.0upgrade guideupgrade guide

  • The webpack CLI workflow is deprecated in favor of --builder rspack.

    12.0.0release notesupgrade guideupgrade guide

  • The webpack path flag is deprecated in favor of selecting the Rspack builder.

    12.0.0release notes

New APIs and options 55

  • The RMQ server now supports graceful shutdown.

    12.5.1release notes

  • Module metadata can now be accepted as the root module.

    12.5.1release notes

  • Limits how many messages of one event can wait beyond those being handled; the default is 10,000 and Infinity lifts the limit.

    12.5.0release notes

  • Adds a TCP server limit of 1000 concurrently handled messages per connection; 0 lifts the limit.

    12.5.0release notes

  • Adds a 16 MiB default size limit for RabbitMQ messages and replies decoded as JSON.

    12.5.0release notes

  • Limits wildcard-subscription Redis requests to channel names of 1024 characters by default; 0 disables the limit.

    12.5.0release notes

  • A new package provides the Node adapter for running Nest directly on Node.js's node:http module.

    12.3.0docsrelease notes

  • The Node platform exposes NestNodeApplication as its application interface for platform-specific typing.

    12.3.0docs

  • Pass a NodeAdapter instance to NestFactory.create() to run an application on node:http; request and response objects include Express-style helpers, and most Express middleware works with it.

    12.3.0docs

  • TCP servers disconnect peers that leave responses unread after 30 seconds by default; 0 disables the timeout.

    12.2.0release notes

  • Adds an optional adapter hook that tells core how the router matches paths.

    12.2.0release notes

  • Limits the number of a client's messages handled at once to 1000 by default; Infinity lifts the limit.

    12.2.0release notes

  • Sets how many characters of event data may wait for a client that is not reading its events; defaults to 4M, and 0 or Infinity lifts the limit.

    12.2.0release notes

  • The limit for pending SSE data is configurable.

    11.2.8, 12.2.0release notesrelease notes

  • Limits validation error message length to 1,000,000 characters by default; excess messages are replaced by an omission entry.

    12.2.0release notes

  • Express and Fastify file uploads support array index limits.

    12.1.3release notes

  • Express and Fastify file uploads support field nesting limits.

    12.1.3release notes

  • Upload limits now support field nesting and array indexes.

    12.1.3release notes

  • Fastify can listen on a socket path.

    12.1.3release notes

  • Exports deserializers from the microservices package root.

    12.1.1release notes

  • NestJS adds built-in, adapter-agnostic cookie support.

    12.1.0release notes

  • Fastify gains file upload interceptors backed by @fastify/multipart.

    12.1.0release notes

  • Global prefixes now support being provided as an array.

    12.1.0release notes

  • ServerMqtt adds maxConnectionAttempts to configure the maximum connection attempts.

    12.0.2release notes

  • CLI builds should select Rspack with the builder option as webpack workflows are deprecated.

    12.0.0release notes

  • Kafka event patterns now accept RegExp values.

    12.0.0release notes

  • JSON logging can spread structured parameters into the root instead of nesting them under params.

    12.0.0release notesupgrade guide

  • graphql-ws is the supported GraphQL subscriptions transport.

    12.0.0upgrade guide

  • WebSocket disconnect handlers can receive the disconnection reason.

    12.0.0release notesupgrade guideupgrade guide

  • Exceptions can serialize a stable error code so clients avoid parsing message strings.

    12.0.0release notesupgrade guideupgrade guide

  • Kafka message patterns now accept RegExp values.

    12.0.0release notesupgrade guide

  • A new hook runs before a microservice message handler is invoked.

    12.0.0release notesupgrade guideupgrade guide

  • The SWC builder can emit declaration files through a new CLI flag or nest-cli.json option.

    12.0.0release notesupgrade guideupgrade guide

  • Builds can disable type checking.

    12.0.0release notesupgrade guideupgrade guide

  • Monorepo projects can be built in parallel with configurable concurrency.

    12.0.0release notesupgrade guide

  • Monorepo projects can build in parallel when --parallel is combined with --all.

    12.0.0upgrade guide

  • nest build supports specifying the Rspack path.

    12.0.0release notes

  • Adds a nest-cli.json property for copying library assets into an application build.

    12.0.0release notesupgrade guideupgrade guide

  • A new command deploys applications to the cloud through Mau and installs @nestjs/mau on first use.

    12.0.0release notesupgrade guideupgrade guide

  • The upgrade command can report planned changes without modifying project files.

    12.0.0release notesupgrade guide

  • The application accepts an instrument option for integrating the official observability SDK with Nest's lifecycle.

    12.0.0release notesupgrade guide

  • The new SDK provides native observability for requests, jobs, errors, traces, and supported transports.

    12.0.0release notesupgrade guideupgrade guide

  • Projects switching to ESM set package.json type to module.

    12.0.0upgrade guide

  • Kafka message and event patterns can now use regular expressions.

    12.0.0upgrade guide

  • Request-scoped WebSocket gateways can inject the socket through the REQUEST token.

    12.0.0release notesupgrade guideupgrade guide

  • Route parameter decorators accept Standard Schema-compatible schemas for validation and OpenAPI generation.

    12.0.0release notesupgrade guideupgrade guide

  • Applications can opt into errors for duplicate route conflicts.

    12.0.0release notes

  • NestApplicationOptions can configure duplicate and shadowed route diagnostics.

    12.0.0upgrade guideupgrade guide

  • Applications can opt into warnings when declaration order causes one route to shadow another.

    12.0.0release notes

  • Applications can opt into specificity-based route resolution.

    12.0.0release notesupgrade guideupgrade guide

  • nest build and nest start accept a Rspack configuration path.

    12.0.0upgrade guide

  • Compiler informational logs can be suppressed.

    12.0.0upgrade guideupgrade guide

  • A new interceptor validates and transforms outgoing responses using Standard Schema.

    12.0.0release notesupgrade guideupgrade guide

  • A new pipe validates route data against Standard Schema metadata.

    12.0.0release notesupgrade guideupgrade guide

  • Adds errorFormat to control validation error response shape as list or grouped.

    12.0.0release notesupgrade guideupgrade guide

Performance 2

  • Waiting SSE events are written in linear time.

    12.5.0release notes

  • Values in a stream are serialized in linear time.

    12.5.0release notes

Behavior and default changes 40

  • The MQTT server now supports graceful shutdown.

    12.5.1release notes

  • Redis and NATS servers now support graceful shutdown.

    12.5.1release notes

  • The TCP server now supports graceful shutdown.

    12.5.1release notes

  • Serializes each object yielded by a streamed HTTP response, applying exclusions and groups to every NDJSON line.

    12.5.0release notes

  • Requests sharing a connection share one close listener.

    12.5.0release notes

  • Gateways connect in their declaration order.

    12.5.0release notes

  • Gateways in the same namespace share one host.

    12.5.0release notes

  • The default multipart parts limit is 1000.

    12.5.0release notes

  • Parameter pipes are scoped to each microservice or WebSocket context.

    12.5.0release notes

  • Error messages for parsed array items are limited in total.

    12.5.0release notes

  • Files are validated one at a time.

    11.2.10, 12.5.0release notesrelease notes

  • Update @nestjs/core and the platform packages together because adapters pass new route matching options to core.

    12.5.0release notes

  • The number of queued messages waiting for a client's turn is capped.

    12.5.0release notes

  • Writes a comment every five seconds while Node.js has paused a client's socket so disconnected clients are noticed.

    12.5.0release notes

  • Standard schema error messages are length-limited.

    12.5.0release notes

  • Serializes each object yielded by a streamed HTTP response, applying schemas to every NDJSON line.

    12.5.0release notes

  • A warning is issued when a validation pipe receives no parameter types.

    12.5.0release notes

  • A client remains paused while any gateway using it is backlogged.

    12.5.0release notes

  • Upgrade requests for other paths are left to other listeners.

    12.5.0release notes

  • The node adapter can inject requests like the Fastify adapter.

    12.4.1release notes

  • The node adapter can set locals for every view.

    12.4.0release notes

  • A handler can return a web response or a stream for Nest to send.

    12.4.0release notes

  • With header, media type, or custom versioning, exclusions apply only to requests asking for one of the excluded versions.

    12.2.0release notes

  • The fieldNestingDepth default is now 32; set it to Infinity to lift the limit.

    12.2.0release notes

  • Omitted WebSocket adapter creation options receive defaults.

    12.1.3release notes

  • SSE responses now send the expires header.

    12.1.3release notes

  • Transient global enhancers now run on controllers.

    12.1.3release notes

  • Global scoped enhancers are resolved per connection.

    12.1.3release notes

  • A redeclared @Inject() property replaces the inherited property.

    12.1.3release notes

  • Request-scoped hooks use the hook name as their pattern.

    12.1.3release notes

  • Server options now receive defaults like the client factory does.

    12.1.3release notes

  • TCP connections wait for the TLS handshake.

    12.1.3release notes

  • useClass() overrides now take the scope of the class.

    12.1.3release notes

  • validationSchema now accepts any compatible Standard Schema instead of being Joi-specific.

    12.0.0release notesupgrade guideupgrade guide

  • All core Nest packages now ship as ESM while existing CommonJS applications generally continue working.

    12.0.0release notesupgrade guide

  • The Express adapter now drains in-flight requests during shutdown.

    12.0.0release notesupgrade guide

  • The Express adapter drains in-flight requests during shutdown.

    12.0.0release notesupgrade guide

  • GraphiQL is now the default GraphQL IDE, replacing playground configuration.

    12.0.0release notesupgrade guide

  • Error mapping was reworked across core, Express, and Fastify adapters.

    12.0.0release notes

  • Rspack is now the default bundler for monorepos.

    12.0.0release notesupgrade guideupgrade guide

Tooling 6

Fixes and other changes 274

  • A Kafka connection attempt stops once the client is closed.

    12.5.1release notes

  • Nunjucks views are rendered through an Environment.

    12.5.1release notes

  • Rejects dates past the end of their month.

    12.5.1release notes

  • Each value of a repeated Kafka header is decoded individually.

    12.5.1release notes

  • Class-bound enhancers now run the container instance and use the enhancers of the module that holds the host.

    12.5.0release notes

  • A null depth prints every level in the console logger.

    11.2.10, 12.5.0release notesrelease notes

  • A controller root route is preserved when defined next to an optional-tail route.

    12.5.0release notes

  • Durable instances marked by a failed load are no longer reloaded.

    12.5.0release notes

  • Unserializable dynamic modules receive their own deep-hash IDs.

    12.5.0release notes

  • The exclude predicate now excludes a request only when it returns true.

    12.5.0release notes

  • Exception filters not created for a request are skipped.

    12.5.0release notes

  • Excluded parameters are matched up to the router's limit.

    12.5.0release notes

  • Text following an excluded parameter is matched as written.

    12.5.0release notes

  • Express, Fastify, and Node platforms fix file-stream handling for non-byte chunks, failures, pipelined requests, and send-file errors.

    12.5.0release notes

  • Errors from a connection hook's exception filter are logged.

    12.5.0release notes

  • Gateway options are retained when the port is not set.

    12.5.0release notes

  • A gateway without a port no longer opens one.

    12.5.0release notes

  • Host parameters are matched correctly next to an optional group.

    11.2.10, 12.5.0release notesrelease notes

  • HTTP errors left by GraphQL or asynchronous RPC filters are answered.

    12.5.0release notes

  • The JSON log record cap is checked before values are converted.

    12.5.0release notes

  • Kafka event handlers with equal regex patterns are chained, and the consumer continues running after type errors.

    12.5.0release notes

  • Overlapping loads build a lazy module only once.

    12.5.0release notes

  • Logged key names are excluded from redactor cache keys.

    12.5.0release notes

  • Fixes include handling filter failures, stream-call errors and cancellation, and completing TCP message streams without an id.

    12.5.0release notes

  • Middleware paths are matched in the forms decoded by the router.

    12.5.0release notes

  • Fixes middleware mounting and route matching for prefixes, exclusions, versioned paths, route tails, and asynchronous configuration.

    12.5.0release notes

  • mixin() preserves the scope declared by a class.

    11.2.10, 12.5.0release notesrelease notes

  • Module upload options are retained when a route omits them.

    12.5.0release notes

  • create() continues to work after repeated calls in snapshot mode.

    12.5.0release notes

  • Fixes reject wildcard characters in client topic names and match MQTT wildcard filters against the sent topic.

    12.5.0release notes

  • Array gaps in multipart bodies are closed.

    12.5.0release notes

  • Platform fixes cover failed and interrupted file streams, cleanup of discarded or incomplete uploads, multipart parsing, and middleware and route handling.

    12.5.0release notes

  • Parameter metadata is read from the declaring class.

    12.5.0release notes

  • Parameter pipes now run for controllers built with mixins or wrapped by a class decorator that returns a Proxy.

    12.5.0release notes

  • Dependency injection now injects the provider represented by an alias.

    12.5.0release notes

  • Fixes handle cancelled reply consumers, fail pending requests on connection loss, and validate request identifiers before echoing them.

    12.5.0release notes

  • Redis wildcard requests are bounded and requests waiting for a subscription are counted.

    12.5.0release notes

  • The router listens for errors from every stream it holds.

    12.5.0release notes

  • A scoped gateway's disconnect hook runs after its connect hook.

    12.5.0release notes

  • A disconnected SSE client is detected while its socket is paused.

    12.5.0release notes

  • Errors thrown while tearing down an SSE producer are caught.

    12.5.0release notes

  • Objects yielded by a streamed HTTP response are serialized.

    12.5.0release notes

  • Streamed bodies are read in the asynchronous context of their request.

    12.5.0release notes

  • Streaming handlers now send the value returned by interceptors.

    11.2.10, 12.5.0release notesrelease notes

  • A stand-in for a buffer supplied as the whole value is validated.

    12.5.0release notes

  • A disconnected paused client is detected.

    12.5.0release notes

  • All pipes for a message finish before the message fails.

    12.5.0release notes

  • Modules are rolled back when a lazy load fails.

    12.4.1release notes

  • The node adapter now sets req.route like Express does.

    12.4.1release notes

  • The console logger no longer mutates the caller's options.

    12.4.0release notes

  • Content-Length is omitted when Transfer-Encoding is set, including on redirects.

    12.4.0release notes

  • The charset is added to a content type set by the app.

    12.4.0release notes

  • Rendering now works with eta, liquidjs, and art-template.

    12.4.0release notes

  • gRPC call options are now forwarded on request streams.

    12.4.0release notes

  • Middleware runs on subpaths next to an all-methods route.

    12.4.0release notes

  • The MQTT close is awaited and client state is reset.

    12.4.0release notes

  • MQTT servers now ignore their own replies under wildcard subscriptions.

    12.4.0release notes

  • Grouped item errors retain their fields in ParseArrayPipe.

    12.4.0release notes

  • Provider overrides are applied when their value is undefined.

    12.4.0release notes

  • Fastify answers 403 for a path refused by the static plugin.

    12.4.0release notes

  • Handlers are now reachable when their string pattern reads as JSON.

    12.4.0release notes

  • Trailing slashes are stripped when resolving view names.

    12.4.0release notes

  • Maps 4xx http-errors errors to HTTP exceptions.

    12.3.0release notes

  • Leaves 5xx Fastify errors unmapped so they are logged.

    12.3.0release notes

  • Leaves 5xx http-errors errors unmapped so they are logged.

    12.3.0release notes

  • Reads the abort on error option from the app being called.

    12.3.0release notes

  • Loads adapters with an older core.

    12.3.0release notes

  • Avoids throwing for arrow prototype constructors.

    12.3.0release notes

  • Runs CORS before Nest middleware.

    12.3.0release notes

  • Discovers classes by each of their discovery decorators.

    12.3.0release notes

  • Sends the standard body for an exception wrapping an error.

    12.3.0release notes

  • Allows the Fastify platform to listen on a file descriptor.

    12.3.0release notes

  • File type errors now report the detected file type.

    12.3.0release notes

  • Subscribes to handler observables from other RxJS copies.

    12.3.0release notes

  • Ends a HEAD response for an empty streamable file.

    12.3.0release notes

  • Maps http-errors exceptions to HttpException in the Express adapter.

    12.3.0release notes

  • Does not emit a trailing null to Kafka requesters.

    12.3.0release notes

  • Lets only the exact message handler answer a request.

    12.3.0release notes

  • Fails the request when its last reply cannot be sent.

    12.3.0release notes

  • Middleware exclusions now cover prefix-excluded routes.

    12.3.0release notes

  • Reads quoted media type versions in middleware exclusions.

    12.3.0release notes

  • Runs middleware once for routes that differ only in version.

    12.3.0release notes

  • Honors MQTT topic filter boundaries.

    12.3.0release notes

  • Reports a NATS connection that gave up reconnecting.

    12.3.0release notes

  • Sends NATS record headers as message headers.

    12.3.0release notes

  • Sends object error bodies with a JSON content type.

    12.3.0release notes

  • Loads packages where bundlers can see them.

    12.3.0release notes

  • Re-arms Redis retries on a new listen.

    12.3.0release notes

  • Resolves request-scoped forward references for concurrent requests.

    12.3.0release notes

  • Lets a retriable exception keep travelling.

    12.3.0release notes

  • Counts every failed RMQ connection attempt.

    12.3.0release notes

  • Keeps one route parameter per argument in an overriding method.

    12.3.0release notes

  • Honors abortOnError passed to select().

    12.3.0release notes

  • Tolerates SSE request sockets without tuning methods.

    12.3.0release notes

  • Aborts the response when a streamable file fails midway.

    12.3.0release notes

  • Resets TCP retry attempts on each listen.

    12.3.0release notes

  • Clears the TCP retry timer when a new listen starts.

    12.3.0release notes

  • Retries the TCP server again after close and listen.

    12.3.0release notes

  • Names the array and index of undefined module entries.

    12.3.0release notes

  • Reads the URL protocol from the server.

    12.3.0release notes

  • Async parameter decorator values are settled before pipes run.

    12.2.0release notes

  • Providers with the same token share one auto-mock.

    12.2.0release notes

  • The class schema is preserved when a handler sets serialize options.

    12.2.0release notes

  • In JSON mode, log records are cut short past about a million characters.

    12.2.0release notes

  • Custom decorator options are preserved when followed by a pipe.

    12.2.0release notes

  • Array and object defaults are copied rather than shared.

    11.2.8, 12.2.0release notesrelease notes

  • Request order is preserved during deferred replay.

    12.2.0release notes

  • A route's dest can replace the module's storage configuration.

    12.2.0release notes

  • Calls with a lone or undefined stack are parsed correctly, and stacks with multiline error messages are detected.

    12.2.0release notes

  • Sibling event handlers keep running when another handler errors.

    12.2.0release notes

  • With header, media type, or custom versioning, an excluded path, method, and version applies only to requests asking for an excluded version.

    12.2.0release notes

  • Excluded routes match the router's behavior, including exact matching when the router is unknown.

    12.2.0release notes

  • Host mismatches on Fastify now receive a 404.

    12.2.0release notes

  • Memory storage chunks are freed once a file is buffered.

    12.2.0release notes

  • Fastify middleware paths now match like a case-insensitive router.

    12.2.0release notes

  • Middleware is now applied to Fastify plugins registered before initialization.

    12.2.0release notes

  • Route options are now applied to all-method routes.

    12.2.0release notes

  • Uploads cut off after their last chunk are removed.

    12.2.0release notes

  • Fastify validation errors are now treated as HTTP errors.

    12.2.0release notes

  • Filters are created for gateways that fail to resolve, hook error filters use the connection's context, and inherited gateway handlers use the right filters.

    12.2.0release notes

  • A gateway with its own port and a path listens on the configured host; non-upgrade requests on that port receive 426, and unparseable upgrade sockets are closed.

    11.2.8, 12.2.0release notesrelease notes

  • Only the hybrid application binds gateways.

    12.2.0release notes

  • gRPC errors are now sent in a form grpc-js can encode.

    12.2.0release notes

  • Request streams are paused while their replies wait to be written.

    12.2.0release notes

  • Unary subscriptions now end with the call.

    12.2.0release notes

  • Express stops reading a streamable file for a HEAD request.

    12.2.0release notes

  • Interceptor, pipe, and filter classes without a name now run.

    11.2.8, 12.2.0release notesrelease notes

  • Malformed Kafka reply assigner member metadata is now handled.

    12.2.0release notes

  • Shared objects are traversed once during redaction.

    12.2.0release notes

  • The number of messages handled concurrently for a client is bounded.

    12.2.0release notes

  • Hybrid applications now own the initialization hooks, and init() calls them once.

    12.2.0release notes

  • Fastify now passes middleware rejections to the error handler.

    12.2.0release notes

  • MQTT messages are routed by the topic they arrived on.

    11.2.8, 12.2.0release notesrelease notes

  • Express sends object error bodies with a JSON content type.

    11.2.8, 12.2.0release notesrelease notes

  • All packages expose package.json in their exports map.

    12.2.0release notes

  • Parsed array items are validated one at a time.

    12.2.0release notes

  • In microservices, a pattern key longer than 256 characters matches no handler.

    12.2.0release notes

  • Fastify now sends the status of an exception whose body is an error.

    12.2.0release notes

  • Express and Fastify now parse quoted media type version parameters.

    12.2.0release notes

  • Replies that AMQP cannot address are dropped, and only replies awaited by a request are emitted.

    11.2.8, 12.2.0release notesrelease notes

  • Fastify header helpers now retain cookies from raw responses.

    12.2.0release notes

  • The route now waits for the redirect reply before settling.

    12.2.0release notes

  • A falsy constructor key is stripped from request data.

    12.2.0release notes

  • Cycles in request-scoped forward references are now detected.

    12.2.0release notes

  • Uploads are removed when a pipe rejects the request.

    11.2.8, 12.2.0release notesrelease notes

  • Exact routes now remain ahead of optional groups by specificity.

    12.2.0release notes

  • Deferred loads of a gateway's scoped enhancers are awaited.

    12.2.0release notes

  • An empty handler-level @SerializeOptions no longer turns off the class schema.

    12.2.0release notes

  • The loaded transformer is retained while serializers are created.

    12.2.0release notes

  • SSE clients that stop reading their events are dropped.

    12.2.0release notes

  • SSE header and early errors are now handled by exception filters.

    12.2.0release notes

  • SSE responses to HEAD requests now end once headers are sent.

    12.2.0release notes

  • Fastify stops reading a streamable file for a HEAD request.

    12.2.0release notes

  • A StreamableFile that is not sent, or is dropped by a timed-out handler, is destroyed.

    11.2.8, 12.2.0release notesrelease notes

  • Errors raised before the reply are handled, and files that cannot be streamed are handled correctly.

    12.2.0release notes

  • Streamed replies are drained in linear time.

    12.2.0release notes

  • The logger is now passed as this when stringifyReplacer is called.

    12.2.0release notes

  • TCP observable responses stop when the peer leaves.

    11.2.8, 12.2.0release notesrelease notes

  • TLS connections still in their handshake are closed.

    11.2.8, 12.2.0release notesrelease notes

  • Transient enhancers bound to static gateways are run.

    12.2.0release notes

  • Dependencies of transient providers are resolved when auto-mocked.

    12.2.0release notes

  • Files uploaded with a request rejected by a pipe are removed from storage.

    12.2.0release notes

  • Validation no longer mutates input arrays.

    12.2.0release notes

  • Fastify now passes version extractor errors to the error handler.

    11.2.8, 12.2.0release notesrelease notes

  • The server stops reading from a client that does not read its replies.

    12.2.0release notes

  • Messages from a client the server is closing are dropped.

    12.2.0release notes

  • Wildcard middleware is mounted on every path when / is excluded and runs on /api/ for a named wildcard.

    12.2.0release notes

  • Fastify async lifecycle hooks settle only once.

    12.1.3release notes

  • Async request hook completion is guarded.

    12.1.3release notes

  • Buffered logs are flushed when application initialization fails.

    12.1.3release notes

  • Client-streaming calls receive an answer when handlers return nothing.

    12.1.3release notes

  • Dependencies of configurable module aliases are collected.

    12.1.3release notes

  • Custom decorator data is retained when it has schema or pipes keys.

    12.1.3release notes

  • Client operations survive custom deserializer errors.

    12.1.3release notes

  • Import error messages now name dynamic host modules.

    12.1.3release notes

  • Minified exception class names fall back to Error.

    12.1.3release notes

  • Method misses are answered on excluded routes.

    12.1.3release notes

  • Method misses are answered on excluded routes.

    12.1.3release notes

  • File type regular-expression state is isolated.

    12.1.3release notes

  • Gateway lifecycle hook errors are passed to exception filters.

    12.1.3release notes

  • A GET middleware exclusion also covers HEAD requests.

    12.1.3release notes

  • Global prefix exclusions are honored for overlapping versions.

    12.1.3release notes

  • Global scoped enhancers are resolved separately for each connection.

    12.1.3release notes

  • gRPC response errors no longer enter the request stream.

    12.1.3release notes

  • Empty-completing gRPC stream calls now resolve.

    12.1.3release notes

  • isHeadersSent counts headers flushed through reply.raw.

    12.1.3release notes

  • Both Kafka client connections close when one fails.

    12.1.3release notes

  • Kafka records are cloned before serialization.

    12.1.3release notes

  • Pending Kafka requests fail when deserialization errors occur.

    12.1.3release notes

  • Null payloads are preserved in Kafka tombstone records.

    12.1.3release notes

  • Fastify listen() rejects invalid ports.

    12.1.3release notes

  • Records returned by message handlers are unwrapped.

    12.1.3release notes

  • Controller paths are normalized when middleware is mapped.

    12.1.3release notes

  • MQTT payload options are preserved.

    12.1.3release notes

  • MQTT requests fail when publishing fails.

    12.1.3release notes

  • NATS requests fail on undecodable replies.

    12.1.3release notes

  • Stale NATS status events are ignored.

    12.1.3release notes

  • NATS status updates continue when a listener throws.

    12.1.3release notes

  • Inherited @Optional() properties remain optional.

    12.1.3release notes

  • Redis operations wait for both clients to be ready.

    12.1.3release notes

  • Redis connections no longer crash the process when they drop.

    12.1.3release notes

  • Redis listen operations fail when subscriptions are rejected.

    12.1.3release notes

  • Explicit null values are preserved in reflectable decorators.

    12.1.3release notes

  • Fastify shutdown hooks honor return503OnClosing.

    12.1.3release notes

  • The RabbitMQ client no longer opens two channels on connect.

    12.1.3release notes

  • RabbitMQ connect and listen operations fail on channel setup errors.

    12.1.3release notes

  • RabbitMQ # wildcards match in any position.

    12.1.3release notes

  • Custom Fastify router constraints are preserved.

    12.1.3release notes

  • The pattern is included when a scoped handler fails to resolve.

    12.1.3release notes

  • Shared contexts are retained during disconnect hooks.

    12.1.3release notes

  • The shutdown sequence runs after initialization fails.

    12.1.3release notes

  • A shutdown signal received while close() is running is honored.

    12.1.3release notes

  • Assigning an SSE event id no longer mutates the message.

    12.1.3release notes

  • Headers are committed for empty SSE streams.

    12.1.3release notes

  • SSE lifecycle state settles correctly after an early disconnect.

    12.1.3release notes

  • Handler-set status and headers are sent on SSE responses.

    12.1.3release notes

  • SSE streams end when event data cannot be serialized.

    12.1.3release notes

  • The StreamableFile source is destroyed when a client disconnects.

    11.2.8, 12.1.3release notesrelease notes

  • Pending TCP retries are canceled when the connection closes.

    12.1.3release notes

  • Nested transient providers injected into properties are isolated.

    12.1.3release notes

  • Default Fastify body parsers remain available after useBodyParser().

    12.1.3release notes

  • Overrides take the scope of the class.

    12.1.3release notes

  • Parent validation constraints are preserved.

    12.1.3release notes

  • VERSION_NEUTRAL middleware routes are treated as having no version.

    12.1.3release notes

  • URI versioned exclusions are resolved correctly for the not-found handler.

    12.1.3release notes

  • The base WebSocket exception filter copies the options object.

    12.1.3release notes

  • Wildcard middleware runs on the bare global prefix path.

    12.1.3release notes

  • Detects circular dependencies across more than two providers.

    12.1.1release notes

  • Keeps a newer Kafka connection when a stale connection fails.

    12.1.1release notes

  • Fixes JSON output, log level changes, fatal logs, and buffered logs.

    12.1.1release notes

  • Allows the MQTT client to retry after a failed connection.

    12.1.1release notes

  • Recovers the NATS client after it gives up reconnecting.

    12.1.1release notes

  • Keeps a newer NATS connection when a stale connection fails.

    12.1.1release notes

  • Rejects non-numeric items when ParseArrayPipe uses Number items.

    12.1.1release notes

  • Replies on the request channel when Redis wildcards are enabled.

    12.1.1release notes

  • Treats JSON content types with parameters as JSON in reply().

    12.1.1release notes

  • Allows the RMQ client to retry after a failed connection.

    12.1.1release notes

  • Preserves string enum values that match numeric member names.

    12.1.1release notes

  • Ignores events emitted by a replaced TCP client socket.

    12.1.1release notes

  • Preserves TCP event listeners across reconnects.

    12.1.1release notes

  • Honors class and factory overrides of value providers.

    12.1.1release notes

  • Fastify initialization now honors Nest's forceCloseConnections setting.

    12.1.0release notes

  • Invalid metadata entries now include the module name in the resulting diagnostic.

    12.1.0release notes

  • Optional constructor parameters are inherited when the constructor is not redeclared.

    12.1.0release notes

  • The ParseDatePipe default now applies to every missing value.

    12.1.0release notes

  • The Redis client retries after a failed connection.

    12.1.0release notes

  • Route handler names are preserved.

    12.1.0release notes

  • Subsequent middleware is no longer skipped after a transient middleware.

    12.1.0release notes

  • Sparse factory inject arrays no longer cause the application to hang.

    12.0.4release notes

  • Missing gRPC package namespaces are handled gracefully.

    12.0.4release notes

  • The Kafka client retries after a failed connection.

    12.0.4release notes

  • Message handler rejections are routed to handleError.

    12.0.4release notes

  • Multer limits are merged key-by-key instead of being overridden wholesale.

    12.0.4release notes

  • Parse date pipe options are optional.

    12.0.4release notes

  • The processing hook envelope is shared across transports.

    12.0.4release notes

  • Kafka request-response spans are closed exactly once.

    12.0.4release notes

  • Request-response spans are closed exactly once.

    12.0.4release notes

  • The Kafka processing end hook now always runs.

    12.0.3release notes

  • Open TCP sockets are now destroyed during shutdown.

    12.0.3release notes

  • The proto-key stripping hook is now invoked via this during transformation.

    12.0.3release notes

  • UUID version and variant are now validated when no version is set.

    12.0.3release notes

  • Fastify derives a neutral version when the accept header is absent.

    12.0.2release notes

  • Factory providers using discovery decorators are now discovered.

    12.0.2release notes

  • Message streams now remain alive when a handler throws.

    12.0.2release notes

  • Responses are now sent for exceptions thrown from middleware.

    12.0.2release notes

  • The MQTT listen callback now runs only once.

    12.0.2release notes

  • normalizePath now collapses duplicate internal slashes.

    12.0.2release notes

  • An empty string is now treated as array input by ParseArrayPipe.

    12.0.2release notes

  • Foreign JSON is no longer treated as an RPC envelope.

    12.0.2release notes

  • Repeated shutdown signal listeners are cleaned up.

    12.0.2release notes

  • Connected microservices now detach signal listeners correctly.

    12.0.2release notes

  • Error instances with statusCode are no longer incorrectly treated as HTTP errors.

    12.0.2release notes

  • UUID v3 variant validation is corrected.

    12.0.2release notes

  • gRPC exception handling now maps errors to proper gRPC status codes instead of UNKNOWN.

    12.0.0release notesupgrade guideupgrade guide

@nestjs/core 11193 changes

Breaking changes 32

  • Middleware bound to *path no longer runs for /; {*path} still covers it.

    11.2.11release notes

  • A Fastify @All() route declared above a WebDAV or SEARCH method on the same path now fails at startup.

    11.2.10release notes

  • An Error body sent with an error status now gets the standard body for that status.

    11.2.10release notes

  • In a standalone microservice, a gateway without a port no longer listens.

    11.2.10release notes

  • A binding that cannot run now fails the application at startup.

    11.2.10release notes

  • WsAdapter closes clients that send messages over 1 MB with code 1009; raise the adapter or gateway maxPayload to allow larger messages.

    11.2.10release notes

  • Adds a limit of 1000 pending gRPC stream responses; streams fail when clients leave replies unread.

    11.2.10release notes

  • A middleware target that is not a controller or route now fails the application at startup.

    11.2.10release notes

  • Non-ASCII pattern keys may get a new route, so clients and servers using such patterns should run the same version.

    11.2.10release notes

  • SSE events without data now count toward the pending limit.

    11.2.10release notes

  • The default TCP maxBufferSize is lowered to 16 Mi characters; larger packets are refused unless the limit is raised.

    11.2.10release notes

  • Rejects buffers supplied in place of validated classes or held by nested validated properties, and validates a stand-in for a buffer supplied as the whole value.

    11.2.10release notes

  • An absolute-form request target with a / after a query that comes before its path is now answered with 404.

    11.2.9release notes

  • This request target is now routed as /.

    11.2.9release notes

  • Wildcard middleware now runs on excluded routes of every version.

    11.2.9release notes

  • Treats an empty route parameter as a route miss.

    11.2.8release notes

  • Runs transient global enhancers on controllers and static entry providers, and no longer silently drops request-scoped global enhancers.

    11.2.8release notes

  • Fails at startup when a global enhancer is not instantiated.

    11.2.8release notes

  • Fails response streams that emit null and sends errors that grpc-js can encode.

    11.2.8release notes

  • Routes handler rejections to handleError and restricts request replies to the exact message handler.

    11.2.8release notes

  • Mounts unversioned paths under the default version, maps controller middleware under every declaring module, and mounts transient-scoped middleware.

    11.2.8release notes

  • Rejects topics longer than 65535 bytes and honors topic filter boundaries.

    11.2.8release notes

  • Rejects non-numeric items when items is Number, rejects nested arrays, and validates parsed items one at a time.

    11.2.8release notes

  • Rejects arrays and primitives for validated classes, limits validation error message length by default, and no longer exposes the validated object on validation errors.

    11.2.8release notes

  • Numeric enum validation no longer includes reverse-mapped keys.

    11.2.0release notes

  • get() now throws for implicitly request-scoped dependency trees.

    11.1.9release notes

  • Fastify top-level options are migrated to routerOptions.

    11.1.8release notes

  • NestJS upgrades to Express v5 and adds a legacy route path converter to minimize breaking changes.

    11.0.0release notes

  • NestJS upgrades to Fastify v5 and adds a legacy route path converter to minimize breaking changes.

    11.0.0release notes

  • Module destruction now runs in the reverse order of module initialization.

    11.0.0release notes

  • Drops broken support for promises in module exports.

    11.0.0release notes

  • Node v16 and v18 are no longer supported; Node v20 or later is required.

    11.0.0release notes

Security 15

  • Does not send the message of an unexposed HTTP error and applies the expose flag to SSE error events.

    11.2.8release notes

  • Limits the size of messages the parser decodes and limits the number of header values.

    11.2.8release notes

  • Uses unguessable request IDs and validates request IDs before echoing them.

    11.2.8release notes

  • Ends HEAD responses after headers are sent, routes header errors to exception filters, drops clients that stop reading, and hides internal error messages.

    11.2.8release notes

  • Handles errors raised before the reply, keeps error messages out of responses, and aborts the response when a stream fails midway.

    11.2.8release notes

  • Closes sockets for unparseable upgrade requests and answers non-upgrade requests on a gateway's own port with 426.

    11.2.8release notes

  • Updated multer to address CVE-2026-88932 in @nestjs/platform-express.

    11.2.6release notes

  • Hardened the TCP transport against a hostile peer.

    11.2.5release notes

  • Nest: Middleware Bypass on Fastify via Trailing Slash

    11.1.24security advisory

  • jsonsocket.handledata no longer causes a stack overflow.

    11.1.19release notessecurity advisory

  • @nestjs/core Improperly Neutralizes Special Elements in Output Used by a Downstream Component ('Injection')

    11.1.18security advisory

  • SSE message handling now sanitizes messages.

    11.1.18release notes

  • Nest Fastify HEAD Request Middleware Bypass

    11.1.16security advisory

  • Fixes a Fastify middleware bypass vulnerability.

    11.1.14release notessecurity advisory

  • Fixes middie bypassing through decoded characters in platform-fastify.

    11.1.11release notessecurity advisory

Deprecations 1

  • plainToClass is deprecated and replaced with plainToInstance.

    11.0.0release notes

New APIs and options 38

  • Limits how many TCP messages are handled per connection, with a default of 1000.

    11.2.10release notes

  • Adds a limit for the size of RabbitMQ messages decoded as JSON, defaulting to 16 MiB.

    11.2.10release notes

  • Adds an IoAdapter limit on how many client messages wait for their turn, set to 10,000 by default.

    11.2.10release notes

  • Bounds how long a TCP packet may take to arrive, with a default of 300 seconds.

    11.2.10release notes

  • NestJS now supports the HTTP QUERY method across core, common, and Fastify.

    11.2.0release notes

  • Server-sent events now support an SSE signal.

    11.2.0release notes

  • File type validation adds an override mimetype option.

    11.1.29release notes

  • Server-sent events support comments.

    11.1.29release notes

  • MulterOptions gains defParamCharset for configuring parameter character encoding.

    11.1.20release notes

  • Microservices add an option to return buffers for binary data.

    11.1.20release notes

  • Microservices handle RMQ blocked and unblocked connection events.

    11.1.20release notes

  • Microservices adds Redis driver identification for applications using Redis transport.

    11.1.17release notes

  • Microservices support a configurable maximum buffer size.

    11.1.13release notes

  • MQTT supports configuring QoS per handler.

    11.1.13release notes

  • An option for async logger compatibility was added.

    11.1.10release notes

  • FileTypeValidator gains a message property for customizing validation messages.

    11.1.10release notes

  • Server-side keepalive support was added for microservices.

    11.1.10release notes

  • SSE handlers now support Promise<Observable> return values.

    11.1.10release notes

  • The @sse decorator now accepts method options.

    11.1.9release notes

  • WebSockets supports manual acknowledgement handling through the @Ack decorator.

    11.1.7release notes

  • The console logger gains a force-console option.

    11.1.7release notes

  • A TCP exception was added for handling TCP receive errors.

    11.1.7release notes

  • HTTP error createBody now allows a number to be passed.

    11.0.0release notes

  • Introduces intrinsic exceptions.

    11.0.0release notes

  • Adds a JSON logger and improvements to the built-in logger.

    11.0.0release notes

  • Adds a configurable maximum TCP packet buffer length.

    11.0.0release notes

  • Introduces a message parser for the ws adapter.

    11.0.0release notes

  • Microservice options can now come from the dependency injection container.

    11.0.0release notes

  • Adds a graceful shutdown option for the NATS server.

    11.0.0release notes

  • Adds support for configuring a NATS queue per handler.

    11.0.0release notes

  • Adds an on method to microservice transporters (clients and servers).

    11.0.0release notes

  • Adds ParseDatePipe.

    11.0.0release notes

  • plainToInstance replaces the deprecated plainToClass.

    11.0.0release notes

  • TCP servers can now use a random port.

    11.0.0release notes

  • The abortOnError option can now be overridden for the select method.

    11.0.0release notes

  • Adds a status method to microservice transporters (clients and servers).

    11.0.0release notes

  • Adds an unwrap method to microservice transporters (clients and servers).

    11.0.0release notes

  • Adds support for WebDAV HTTP methods.

    11.0.0release notes

Performance 1

  • Introduces different module opaque key factories to improve bootstrap performance.

    11.0.0release notes

Behavior and default changes 6

  • Multipart requests default to at most 1000 parts; raise limits.parts to allow more.

    11.2.10release notes

  • Limits the length of pattern keys.

    11.2.8release notes

  • Bounds how many messages from a client are handled at once.

    11.2.8release notes

  • The legacy route path warning now includes the auto-converted route.

    11.1.28release notes

  • NestJS now warns when a WebSocket adapter is registered late.

    11.1.24release notes

  • Injection tokens accepted by @Inject now support type narrowing.

    11.0.0release notes

Fixes and other changes 100

  • Keeps the Nest functions in the REPL after .clear.

    11.2.11release notes

  • Preserves sparse array length when applying a default value.

    11.2.11release notes

  • Exclusions can cover routes excluded from the global prefix, and trailing slashes are compared as served.

    11.2.10release notes

  • Non-validation errors are rethrown, total error messages for parsed array items are limited, and sparse array gaps are validated.

    11.2.10release notes

  • Reads class-level enhancers from the registered class and applies class provider enhancers under any token.

    11.2.8release notes

  • Matches excluded routes like the router does, matches exactly when the router is unknown, and avoids excluding request targets with # or in absolute form.

    11.2.8release notes

  • Corrects named wildcard middleware matching for /api/ and applies middleware to controller root routes in strict mode.

    11.2.8release notes

  • Passes middleware rejections to the error handler, matches paths case-insensitively, applies middleware to plugins registered before init, and runs CORS before Nest middleware.

    11.2.8release notes

  • Matches a file type string up to the end of a name.

    11.2.8release notes

  • Answers calls that error or complete empty, fails calls whose handler promise rejects, and ends unary subscriptions with the call.

    11.2.8release notes

  • Errors duplex calls on upstream error and pauses request streams while replies wait.

    11.2.8release notes

  • Runs guards bound as unnamed classes and subscribes to guard Observables from other copies of rxjs.

    11.2.8release notes

  • Corrects overlapping, wildcard, excluded-prefix, and controller-root middleware route matching.

    11.2.8release notes

  • Maps array index and invalid field name codes to HTTP 400.

    11.2.8release notes

  • Stops the Observable producer when the client disconnects.

    11.2.8release notes

  • Skips array holes when stripping prototype keys and strips a falsy constructor key from request data.

    11.2.8release notes

  • Runs enhancers that are request-scoped through dependencies.

    11.2.8release notes

  • Keeps reading replies during client backpressure and drops peers that stop reading responses.

    11.2.8release notes

  • Excludes a version only for requests that ask for it.

    11.2.8release notes

  • Drops messages from clients the server is closing and stops reading from clients that do not read replies.

    11.2.8release notes

  • Logs and replies when an error cause cannot be sent, and treats an error in a WebSocket exception as unknown.

    11.2.8release notes

  • Multer errors are mapped by code instead of message, restoring 400 responses for unexpected file field names.

    11.2.6release notes

  • Microservices now handle unserializable patterns without crashing.

    11.2.4release notes

  • Fixes an issue involving circular durable providers.

    11.2.3release notes

  • Fixed bootstrap crashes with nestjs-cls proxy providers caused by ProxyProviderNotResolvedException on CLS_REQ.

    11.2.2release notes

  • Fixed ObserveInstrument breaking application startup in @nestjs/core 11.2.x.

    11.2.2release notes

  • Fixed an early-return issue affecting SSE abort behavior.

    11.2.1release notes

  • Pre-registered dynamic imports of lazy modules are now scanned.

    11.2.0release notes

  • Inherited middleware no longer receives a duplicated route prefix.

    11.2.0release notes

  • Adjacent wildcard segments are now converted correctly in legacy routes.

    11.2.0release notes

  • Middleware now runs on routes excluded from the global prefix.

    11.2.0release notes

  • Existing singleton providers are now shared with lazily loaded modules.

    11.2.0release notes

  • String file types containing regex metacharacters are now matched correctly.

    11.2.0release notes

  • A barrier resolves immediately when its target count is zero.

    11.1.29release notes

  • Middleware overlap regexes no longer use the global flag.

    11.1.29release notes

  • The gRPC client is nullified on close when tryshutdown fails.

    11.1.29release notes

  • Import lookup stops after the first direct export match.

    11.1.29release notes

  • Express maps missing Multer field nesting errors correctly.

    11.1.29release notes

  • Express now maps missing Multer field-nesting errors correctly.

    11.1.29release notes

  • The pub/sub client type used in Redis listeners is corrected.

    11.1.29release notes

  • The SSE retry field is serialized when its value is zero.

    11.1.29release notes

  • Missing exception classes are now included in HttpErrorByCode.

    11.1.28release notes

  • Teardown now triggers for the SSE producer Observable when a client disconnects with an interceptor.

    11.1.28release notes

  • The type guard now checks the value rather than the key.

    11.1.28release notes

  • Fixed middleware handling for routes with an ending slash.

    11.1.27release notes

  • Fixed teardown issues affecting SSE async handlers.

    11.1.27release notes

  • Fixed empty responses from POST SSE endpoints.

    11.1.26release notes

  • The ending slash is removed from pathnames in the Fastify platform.

    11.1.25release notes

  • Pending Redis requests are rejected when microservices close.

    11.1.25release notes

  • The SSE close listener is registered before asynchronous setup.

    11.1.25release notes

  • The dependency-tree cache now resets when metadata changes, preventing stale dependency information.

    11.1.24release notes

  • Fixes snapshot: true eagerly instantiating Terminus transient indicators since 11.1.20.

    11.1.23release notes

  • Fixed an inflight request injection bug in core.

    11.1.22release notes

  • Invalid-class-module errors now identify the decorator type.

    11.1.22release notes

  • Skipped provider initialization is now settled correctly.

    11.1.21release notes

  • bindMessageHandlers no longer duplicates the disconnect listener.

    11.1.20release notes

  • Deeply nested transient providers now resolve correctly.

    11.1.20release notes

  • The filetype validator buffer message is corrected.

    11.1.20release notes

  • The parse date pipe now accepts a zero timestamp.

    11.1.20release notes

  • ServerRMQ no longer crashes at boot when @MessagePattern(undefined) is combined with wildcards: true.

    11.1.20release notes

  • @Sse no longer loses events when the stream completes.

    11.1.20release notes

  • SSE message IDs now use strict null checking.

    11.1.20release notes

  • SSE writehead output is deferred until after the lifecycle completes.

    11.1.20release notes

  • The consumer CRASH event listener now uses its backing field.

    11.1.19release notes

  • Prevents the injector from hanging when design:paramtypes metadata is missing.

    11.1.18release notes

  • Fixes a dependency injection edge case involving ModuleRef.create.

    11.1.18release notes

  • NATS serializer behavior now preserves packet headers.

    11.1.18release notes

  • Middleware now auto-runs for HEAD requests because Fastify redirects them to GET handlers and otherwise skips middleware execution.

    11.1.17release notes

  • Fixed a double callback when isdisposed or err is truthy in microservices.

    11.1.16release notes

  • Introduces limits for pattern depth and object complexity in microservices handling.

    11.1.15release notes

  • Fixes pattern matching when indexOf returns 0, preventing a valid result from being treated as falsy.

    11.1.15release notes

  • Introduces object complexity limits for microservices processing.

    11.1.15release notes

  • Prevents the logger from printing an invalid context when no stack trace is provided.

    11.1.14release notes

  • Changes the requestOrigin type.

    11.1.14release notes

  • The maxArrayLength option is no longer skipped.

    11.1.13release notes

  • The maxStringLength option is no longer skipped.

    11.1.13release notes

  • Built-in primitives are excluded when stripping prototype keys.

    11.1.13release notes

  • Fixed a regression in loading file-type under Windows OS.

    11.1.12release notes

  • Adds a missing catch handler for forward-ref provider resolution.

    11.1.11release notes

  • fallbackToMimetype now works without a buffer.

    11.1.10release notes

  • Error handling in FileTypeValidator was improved.

    11.1.10release notes

  • The gRPC stream method return type was corrected.

    11.1.10release notes

  • Nested transient providers are now instantiated correctly in static context.

    11.1.10release notes

  • resolve() now resolves all providers when used with the each option.

    11.1.10release notes

  • ValidationPipe behavior was enhanced.

    11.1.10release notes

  • Nested transient providers are now isolated correctly.

    11.1.8release notes

  • Console logger options now check whether color output is allowed.

    11.1.7release notes

  • Dependency resolution errors now provide improved error messages.

    11.1.7release notes

  • Extras are resolved in configurable module builder asynchronous methods.

    11.1.7release notes

  • Lifecycle hooks are skipped for transient services that are not instantiated.

    11.1.7release notes

  • RabbitMQ microservice fanout binding was fixed.

    11.1.7release notes

  • The parameter type in the RouteConstraints decorator was corrected.

    11.1.7release notes

  • Options are now applied to plainToClass in ClassSerializerInterceptor.

    11.0.0release notes

  • The context parameter in createParamDecorator's callback now has improved type narrowing.

    11.0.0release notes

  • WebSocket exceptions include the cause to associate an error with the request.

    11.0.0release notes

  • File validators now provide error messages.

    11.0.0release notes

  • Fixes middleware not executing when the root path is excluded in the Fastify adapter.

    11.0.0release notes

  • Multer error messages now include the fieldname.

    11.0.0release notes

  • Corrects Reflector types.

    11.0.0release notes

  • Fixes the order in which shutdown hooks run.

    11.0.0release notes

@nestjs/core 1017 changes

Breaking changes 3

  • The return type of getInstance is narrowed for HTTP adapters.

    10.0.0release notes

  • Middleware runs once for a matching route.

    10.0.0release notes

  • Node v12 is no longer supported; applications require Node v16 or later.

    10.0.0release notes

Security 2

New APIs and options 5

  • Interceptors gain support for async local storage.

    10.0.0release notes

  • The Express platform adds support for multer.none.

    10.0.0release notes

  • Support is added for named groups.

    10.0.0release notes

  • The @Search decorator is added to available HTTP route handlers.

    10.0.0release notes

  • A client method is added to retrieve a websocket pattern.

    10.0.0release notes

Behavior and default changes 1

  • Wildcards are enabled in Redis microservice patterns.

    10.0.0release notes

Fixes and other changes 6

  • The cause type accepted by HTTP exceptions is loosened.

    10.0.0release notes

  • Global prefix exclusions work when versioning is enabled.

    10.0.0release notes

  • Microservice options can contain falsy values.

    10.0.0release notes

  • Fastify middleware paths are validated.

    10.0.0release notes

  • Middleware is applied to versioned controllers at the controller level.

    10.0.0release notes

  • Transformation of optional boolean parameters changes.

    10.0.0release notes

@nestjs/core 918 changes

Breaking changes 7

  • All deprecated methods were dropped.

    9.0.0release notes

  • Global providers and modules can no longer be renamed in the REPL.

    9.0.0release notes

  • HttpServer#applyVersionFilter is now mandatory, requiring HttpServer implementations to provide it.

    9.0.0release notes

  • Using inject on class and value providers is disallowed at the type level.

    9.0.0release notes

  • Kafka payloads are automatically unwrapped.

    9.0.0release notes

  • Misusing module imports now throws an exception instead of logging.

    9.0.0release notes

  • ParseUUIDPipe throws exceptions using exceptionFactory only.

    9.0.0release notes

New APIs and options 6

  • A configurable module builder was added for building configurable modules.

    9.0.0release notes

  • Support for durable providers was added.

    9.0.0release notes

  • A file validators pipe feature was added.

    9.0.0release notes

  • HTTP exceptions gained error chaining support.

    9.0.0release notes

  • A Kafka retriable exception was added.

    9.0.0release notes

  • A read–eval–print loop feature was added.

    9.0.0release notes

Fixes and other changes 5

  • Exception responses are sent only if the response header has not already been sent.

    9.0.0release notes

  • The factory provider definition was fixed.

    9.0.0release notes

  • The gRPC client interceptor change was reverted.

    9.0.0release notes

  • KafkaOptions accepts an empty string for postfixId.

    9.0.0release notes

  • The typings for MessageHandler were fixed.

    9.0.0release notes