Releases: liaoliaots/nestjs-redis
Releases · liaoliaots/nestjs-redis
v9.0.0
9.0.0 - 2022-07-17
If you depend on NestJS 7 or 8, please use version 8 of the lib.
There are two packages in this repo now:
@liaoliaots/nestjs-redis
@liaoliaots/nestjs-redis-health
BREAKING CHANGES ⚠️
- drop support
NestJS@8
andNestJS@7
, minimum supported NestJS version isNestJS@9
- the
RedisHealthModule
was removed from@liaoliaots/nestjs-redis
, now you should install@liaoliaots/nestjs-redis-health
to use it
Enhancements
- perf(redis): remove unneeded files, functions, variables and types, reduce file size...
- perf(redis-health): refactor indicator, simplify logic, remove unneeded conditions
Other
- build: migrate to pnpm workspace
- test: update & simplify unit and e2e tests
- ci: use latest version for nodejs and pnpm
- chore: update MIT License, .gitattributes, update documentation
- chore(sample): upgrade to nestjs 9
Dependencies
- bump dependencies to latest, add missing peer dependencies
v8.2.2
8.2.2 - 2022-06-24
Bug fixes
- fix: register event listeners immediately (#286)
- fix: if the status of the instance is end, then quit and disconnect methods will not be invoked (#286)
- fix(health): if the
type
argument is invalid, now the indicator will throw an error (#286)
Enhancements
- perf: reduce memory usage - remove closure functions for event listeners (#286)
- revert: remove deprecated tag from
onClientCreated
option as it can be used to specify custom loggers (#286) - refactor: remove unused utility functions, interfaces (#286)
- refactor: enable timestamp option for logger (#286)
- refactor: improve messages, errors, comments (#286)
Other
- chore: change peerDependencies version ranges from
x
to^
(#286) - chore(docker): use redis version 6.2.7 instead of latest (#286)
- test: update unit tests (#286)
- ci: update nodejs and npm versions (#287)
- node: 16.15.1 LTS
- npm: 8.13.1
- docs: update README.md (#288)
Dependencies
v8.2.1
v8.2.0
8.2.0 - 2022-05-26
Features
redis
- explicitly add
path
option to support unix domain socket (#256)
- explicitly add
Enhancements
- add tsdoc tags to classes, interfaces, methods, decorators to enhance readability (#256) (#259) (#261) (#262)
- update code comments for classes, interfaces, methods, decorators to enhance readability (#256) (#259) (#260) (#261)
Dependencies
Other
- recreate git hooks (#248)
- refactor docker compose file according to latest compose specification (#250)
- refactor template for bug report (#251) (#252) (#253)
- refactor workflow files, upgrade to setup-node@3 (#254)
- delete unneeded files, extract common constants (#256) (#259)
- add .gitattributes, set endOfLine to auto, to develop on windows platform or linux (#258)
- update docs (#263) (#264) (#266) (#268)
- update samples (#267)
v8.1.1
8.1.1 - 2022-04-30
Bug fixes
- bump
tsc-alias
to v1.6.7 (#240)
Enhancements
- bump
tslib
to v2.4.0 (#240) - rebuild barrel file for health module (#243)
- simplify health check logic (#242)
Dependencies
- update dependencies to latest (#240)
Other
- build with
[email protected] LTS
- remove unnecessary timeout function for e2e tests (#241)
v8.1.0
8.1.0 - 2022-04-15
Bug fixes
- bump tsc-alias to v1.6.6 (#233)
Features
- add
errorLog
option to display error logging while connecting. (Default:true
) (#236)
Enhancements
Other
- update docs (#236)
- remove old legacy eslint.validate setting (#229)
- remove es2021 env from .eslintrc.js (#229)
Dependencies
- (deps-dev) remove core-js-compat and compat.js (#235)
- update dependencies to latest
v8.0.0
8.0.0 - 2022-03-28
If you depend on ioredis@4
, please use version7 of the plugin.
BREAKING CHANGES
- compatibility with
ioredis@5
, which includes some breaking changes, please read (#223) - drop support
Node.js@10
, minimum supportedNode.js
version is[email protected]
(#223)
Dependencies
- (deps) remove
promise.allsettled
,@types/promise.allsettled
(#223) - (deps-dev) remove
@types/ioredis
(#223) - update dependencies to latest (#218) (#223)
Other
v7.0.0
7.0.0 - 2022-03-15
Bug fixes
Features
- health check
Enhancements
- update error messages for better readability (#199) (#200) (#204) (#206)
- add custom errors instead of redis-errors:
MissingConfigurationError
,ClientNotFoundError
(#201) - use built-in logger to show error logs while connecting (#208)
- update comments for
RedisService
,ClusterService
,InjectRedis
,InjectCluster
(#209) - update comments for module options interface for better readability (#202)
- simplify decorators:
InjectRedis
,InjectCluster
(#210) - use correct return type for decorators:
InjectRedis
,InjectCluster
(#210)
Other
- use multiple nodejs version for testing.yml (#198)
- format workflow configuration (#198)
- update eslint configuration (#198) (#199)
- update scripts in package.json (#198) (#200) (#204)
- ignore health barrel correctly for prettier (#200)
- add compat.js to show missing API for node 10.13 (#199)
- add forceConsistentCasingInFileNames in tsconfig.json, remove node_modules from exclude list in tsconfig.build.json (#199)
- update unit tests (#199) (#202) (#204) (#205) (#206) (#207) (#208)
- update docs (26f4e2d) (#211) (#215) (#216)
Dependencies
- (deps) remove redis-errors and types (#200)
- (deps-dev) remove eslint-plugin-promise (#198)
- (deps-dev) add core-js-compat (#199)
- update dependencies to latest
BREAKING CHANGES
- health check
v7:
@Controller('app')
export class AppController {
constructor(
private readonly health: HealthCheckService,
private readonly redisIndicator: RedisHealthIndicator,
@InjectRedis() private readonly redis: Redis,
@InjectCluster() private readonly cluster: Cluster
) {}
@Get('health')
@HealthCheck()
async healthChecks(): Promise<HealthCheckResult> {
return await this.health.check([
() => this.redisIndicator.checkHealth('redis', { type: 'redis', client: this.redis }),
() => this.redisIndicator.checkHealth('cluster', { type: 'cluster', client: this.cluster })
]);
}
}
old:
@Controller('app')
export class AppController {
constructor(
private readonly health: HealthCheckService,
private readonly redisIndicator: RedisHealthIndicator,
@InjectRedis() private readonly redis: Redis,
@InjectCluster() private readonly cluster: Cluster
) {}
@Get('health')
@HealthCheck()
async healthChecks(): Promise<HealthCheckResult> {
return await this.health.check([
() => this.redisIndicator.checkHealth('redis', { client: this.redis }),
() => this.redisIndicator.checkHealth('cluster', { client: this.cluster })
]);
}
}
- cluster
- flat
options
forClusterClientOptions
(#202)
- flat
v7:
ClusterModule.forRoot({
readyLog: true,
config: {
nodes: [{ host: '127.0.0.1', port: 16380 }],
enableOfflineQueue: true,
enableReadyCheck: true,
scaleReads: 'all',
redisOptions: { password: 'cluster1' }
}
})
old:
ClusterModule.forRoot({
readyLog: true,
config: {
nodes: [{ host: '127.0.0.1', port: 16380 }],
options: {
enableOfflineQueue: true,
enableReadyCheck: true,
scaleReads: 'all',
redisOptions: { password: 'cluster1' }
}
}
})
Committers:
- Jirat Ki. (@n3tr)
v7.0.0-rc.3
7.0.0-rc.3 - 2022-03-14
Changed
- update messages for better readability
TESTING
- update tests for messages, utils, health
v7.0.0-rc.2
7.0.0-rc.2 - 2022-03-12
Changed
- update messages
- refactor utils
TESTING
- add tests for messages, utils, errors