npm / @nestjs/terminus
@nestjs/terminus
What changed in @nestjs/terminus 9 to 12, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-05.
23 breaking5 deprecations19 new APIs and options5 behavior and defaults8 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@nestjs/terminus 1248 changes
Breaking changes 17
A disk check on a path that does not exist is now
down(503), rather than an error (500).Each
@HealthCheck()option now defaults independently.ConnectionNotFoundError is no longer exported.
The deprecated getStatus() method has been removed; use HealthIndicatorService.check(key).up(data) or .down(data).
Throwing inside a health indicator now causes an unexpected failure (500); only a returned down result marks the check unhealthy (503).
HealthCheckError is no longer exported.
The deprecated HealthIndicator base class has been removed; custom indicators should migrate to HealthIndicatorService.
Custom health indicators migrate to HealthIndicatorService, whose checks return up or down results or use attempt to mark failures as down.
MongoConnectionError is no longer exported.
The Mongoose health check pings the database instead of checking readyState.
The package is now ESM-only, so projects must use it as an ESM package.
The package requires Node ^20.19.0 || ^22.12.0 || >=24.0.0.
@nestjs/terminus no longer has runtime dependencies.
StorageExceededError is no longer exported.
TimeoutError is no longer exported.
UnhealthyResponseCodeError is no longer exported.
Chain withTimeout on the returned attempt to set a timeout for built-in database, microservice, and gRPC health checks.
Deprecations 4
The value returned by
attempt()is still added to the result, but the next major version ignores it; usewithSuccessData()to choose the data.Deprecates
HttpHealthIndicator; useFetchHealthIndicator, which needs no additional package.The timeout option of built-in database, microservice, and gRPC indicators is deprecated; chain withTimeout on the returned attempt instead.
The timeout option of built-in database, microservice, and gRPC indicators is deprecated; chain .withTimeout(1500) on the returned attempt instead.
New APIs and options 15
Adds
degradedAfter()to health-check attempts.Adds
degradedOnFailure()to health-check attempts.Adds an HTTP health indicator that needs no additional package.
Registers a named Swagger schema for health check results.
Exports the
HealthCheckStatusobject.Exports the
HealthIndicatorStatusobject.Memory and disk check results now include
responseTime.The Swagger document uses the schemas
TerminusHealthCheckResultandTerminusHealthIndicatorResult, giving generated API clients new model names.Adds
withData()to attempts.Adds
withFailureData()to attempts.Adds
withSuccessData()to attempts for choosing success data.Accepts a URL object in HttpHealthIndicator.pingCheck.
A new attempt() function is available.
Health indicators can now report a degraded status.
HealthCheckResult now includes responseTime.
Behavior and default changes 4
Accepts duration and size strings such as
'2s'and'150mb'.A missing optional package is reported at application startup, only for indicators you inject.
A dedicated HttpService is created instead of resolving HttpService from DI.
RMQ pingCheck no longer asserts a queue per probe.
Fixes and other changes 8
Ignores reserved keys returned from
attempt().@HealthCheck({ noCache: true })no longer turns off Swagger documentation.@HealthCheck({ swaggerDocumentation: false })no longer turns off theCache-Controlheader.Safely resolves the MikroORM context connection.
Loads optional peers in a way bundlers can follow.
Fixes a memory leak in attempt().withTimeout() caused by AbortSignal.any().
shutting_down is set before awaiting the graceful shutdown timeout.
The microservice client is closed when the ping fails.
@nestjs/terminus 117 changes
Breaking changes 2
Disallows using the reserved keyword status for health indicators.
Support for Node 16 and Node 18 has been dropped.
Deprecations 1
The class is deprecated and scheduled for removal in version 12.0.0.
New APIs and options 3
Custom loggers are provided through dependency injection.
Supports dynamic configuration with Terminus.forRootAsync.
An enhanced API streamlines indicating whether a health indicator is up or down; the existing custom health indicator API continues to function.
Behavior and default changes 1
Health check results are inferred, reducing the need to specify their types explicitly.
@nestjs/terminus 102 changes
Breaking changes 1
Node v12 is no longer supported; Node v16 or later is required.
New APIs and options 1
Adds a health indicator for Prisma ORM, with pingCheck to check a Prisma service.
@nestjs/terminus 93 changes
Breaking changes 3
The redis package is replaced with ioredis.
Terminus upgrades to NestJS v9, so applications must use a compatible NestJS version.
Node v10 is no longer supported.