unstale

npm / @nestjs/core

@nestjs/core

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

26 breaking17 security3 deprecations58 new APIs and options19 behavior and defaults6 tooling179 fixes and other

@nestjs/core 12203 changes

Breaking changes 23

Security 6

Deprecations 3

New APIs and options 40

Behavior and default changes 17

Tooling 6

Fixes and other changes 108

  • 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

  • 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.

    12.1.3release 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 11103 changes

Breaking changes 3

  • 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

Security 9

New APIs and options 18

  • 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

Behavior and default changes 2

  • 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

Fixes and other changes 71

  • 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

@nestjs/core 102 changes

Security 2