Releases: nestjs/terminus
Release 11.0.0
11.0.0 (2025-01-25)
Features
- simplify custom health indicator creation (9f10a9b)
- upgrade to nestjs v11 (c2569df), closes #2570
- update dependencies
BREAKING CHANGES
- Drop support for Node 16 / 18
For users who have implemented a custom health indicator, an enhanced API is now available. However, the existing API will continue to function as-is without requiring any changes.
The new and improved HealthIndicatorService
provides a streamlined way to indicate whether a health indicator is up or down.
Please note that the HealthIndicator
and HealthCheckError
classes have been marked as deprecated and are scheduled for removal in the next major release, version 12.0.0.
@Injectable()
export class DogHealthIndicator {
constructor(
private readonly dogService: DogService,
private readonly healthIndicatorService: HealthIndicatorService,
) {}
async isHealthy(key: string) {
const indicator = this.healthIndicatorService.check(key);
const dogs = await this.dogService.getDogs();
const badboys = dogs.filter((dog) => dog.state === DogState.BAD_BOY);
const isHealthy = badboys.length === 0;
if (!isHealthy) {
return indicator.down({
badboys: badboys.length,
});
}
return indicator.up();
}
}
Release 11.0.0-beta.1
Release 11.0.0-beta.0
11.0.0-beta.0 (2025-01-23)
Features
BREAKING CHANGES
- Drop support for Node 16 / 18
Installaion
# npm
npm install @nestjs/[email protected]
# pnpm
pnpm add @nestjs/[email protected]
# yarn
yarn add @nestjs/[email protected]
For users who have implemented a custom health indicator, an enhanced API is now available. However, the existing API will continue to function as-is without requiring any changes.
The new and improved HealthIndicatorService
provides a streamlined way to indicate whether a health indicator is up or down.
Please note that the HealthIndicator
and HealthCheckError
classes have been marked as deprecated and are scheduled for removal in the next major release, version 12.0.0.
@Injectable()
export class DogHealthIndicator {
constructor(
private readonly dogService: DogService,
private readonly healthIndicatorService: HealthIndicatorService,
) {}
async isHealthy(key: string) {
const indicator = this.healthIndicatorService.check(key);
const dogs = await this.dogService.getDogs();
const badboys = dogs.filter((dog) => dog.state === DogState.BAD_BOY);
const isHealthy = badboys.length === 0;
if (!isHealthy) {
return indicator.down({
badboys: badboys.length,
});
}
return indicator.up();
}
}
Release 10.3.0
Release 10.2.3
Release 10.2.2
10.2.2 (2024-02-07)
Bug Fixes
MikroOrmHealthIndicators
indicates as up even when disconnected (#2509) (#2511) (069b998), closes #2460- Swagger schema for health check result additional props set to
type: 'object'
instead oftype: 'string'
, (44c06f6), closes #2516 - mark
result
as required in the Swagger Schema for the health check result (01ce13b), @srdanielillo
Dependencies
- deps: update dependency reflect-metadata to v0.2.1 (e2420bd)
- deps: update prisma monorepo to v5.9.1 (d88770c)
- deps: update dependency class-validator to v0.14.1 (#2479) (a8585ce)
- deps: update dependency typeorm to v0.3.20 (#2480) (72e7f7a)
- deps: update mikro-orm monorepo to v5.9.7 (#2481) (1eaa605)
- deps: update nest monorepo (#2482) (3c555e0)
Release 10.2.2-beta.0
10.2.2-beta.0 (2024-01-31)
Bug Fixes
- deps: update dependency class-validator to v0.14.1 (#2479) (a8585ce)
- deps: update dependency typeorm to v0.3.20 (#2480) (72e7f7a)
- deps: update mikro-orm monorepo to v5.9.7 (#2481) (1eaa605)
- deps: update nest monorepo (#2482) (3c555e0)
- mikroorm is indicated as up even when disconnected (#2509) (#2511) (069b998), closes #2460
Release 10.2.1
Release 10.2.0
10.2.0 (2023-11-27)
Bug Fixes
- Fixed typeorm mongodb health check fails with mongodb>=5.0 (#2399) (b6026c2) @supaflyENJOY
Features
- Add graceful shutdown timeout configuration option, read more here (#2422) (cc3d402) @Lp-Francois
Dependencies
- deps: update dependency @grpc/grpc-js to v1.9.11 (8b9477e)
- deps: update dependency @grpc/grpc-js to v1.9.3 (8205d8e)
- deps: update dependency @grpc/proto-loader to v0.7.10 (#2398) (c16da49)
- deps: update dependency @mikro-orm/nestjs to v5.2.2 (0c72183)
- deps: update dependency @nestjs/axios to v3 (6f1d4bb)
- deps: update dependency @nestjs/axios to v3.0.1 (#2438) (7239bb0)
- deps: update dependency @nestjs/mongoose to v10.0.1 (9c4baef)
- deps: update dependency @nestjs/mongoose to v10.0.2 (8e70686)
- deps: update dependency @nestjs/sequelize to v10 (100d8fa)
- deps: update dependency @nestjs/typeorm to v10 (77972fe)
- deps: update dependency @nestjs/typeorm to v10.0.1 (3cf5c15)
- deps: update dependency mongoose to v7.6.4 (51cb375)
- deps: update dependency mongoose to v7.6.5 (af11baf)
- deps: update dependency redis to v4.6.8 (5c35747)
- deps: update dependency rimraf to v5 (46cd5be)
- deps: update dependency sequelize to v6.33.0 (b362509)
- deps: update dependency typeorm to v0.3.17 (d07b83a)
- deps: update mikro-orm monorepo to v5.8.1 (2a0d68a)
- deps: update nest monorepo (c25b594)
- deps: update prisma monorepo to v4.16.2 (3933016)
Release 10.2.0-beta.0
10.2.0-beta.0 (2023-11-27)
Bug Fixes
- deps: update dependency @grpc/grpc-js to v1.9.11 (8b9477e)
- deps: update dependency @grpc/grpc-js to v1.9.3 (8205d8e)
- deps: update dependency @grpc/proto-loader to v0.7.10 (#2398) (c16da49)
- deps: update dependency @mikro-orm/nestjs to v5.2.2 (0c72183)
- deps: update dependency @nestjs/axios to v3 (6f1d4bb)
- deps: update dependency @nestjs/axios to v3.0.1 (#2438) (7239bb0)
- deps: update dependency @nestjs/mongoose to v10.0.1 (9c4baef)
- deps: update dependency @nestjs/mongoose to v10.0.2 (8e70686)
- deps: update dependency @nestjs/sequelize to v10 (100d8fa)
- deps: update dependency @nestjs/typeorm to v10 (77972fe)
- deps: update dependency @nestjs/typeorm to v10.0.1 (3cf5c15)
- deps: update dependency mongoose to v7.6.4 (51cb375)
- deps: update dependency mongoose to v7.6.5 (af11baf)
- deps: update dependency redis to v4.6.8 (5c35747)
- deps: update dependency rimraf to v5 (46cd5be)
- deps: update dependency sequelize to v6.33.0 (b362509)
- deps: update dependency typeorm to v0.3.17 (d07b83a)
- deps: update mikro-orm monorepo to v5.8.1 (2a0d68a)
- deps: update nest monorepo (c25b594)
- deps: update prisma monorepo to v4.16.2 (3933016)
- Fixed typeorm mongodb health check fails with mongodb>=5.0 (#2399) (b6026c2)