Skip to content

Releases: liaoliaots/nestjs-redis

v8.2.0

26 May 12:21
3955734
Compare
Choose a tag to compare

8.2.0 - 2022-05-26

Features

  • redis
    • explicitly add path option to support unix domain socket (#256)

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

30 Apr 13:43
b35bb2d
Compare
Choose a tag to compare

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 Node.js@16.15.0 LTS
  • remove unnecessary timeout function for e2e tests (#241)

v8.1.0

15 Apr 14:36
0dbd649
Compare
Choose a tag to compare

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

  • update comments for modules/interfaces/methods (#236)
  • update messages for better readability (#236)

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

28 Mar 15:47
1111be1
Compare
Choose a tag to compare

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 supported Node.js version is Node@12.22.0 (#223)

Dependencies

  • (deps) remove promise.allsettled, @types/promise.allsettled (#223)
  • (deps-dev) remove @types/ioredis (#223)
  • update dependencies to latest (#218) (#223)

Other

  • build with Node.js@16 LTS (#219)
  • update unit and e2e tests (#223)
  • update docs (#224)
  • update ts and eslint config (#219) (#220) (#223)

v7.0.0

15 Mar 15:57
6acbe4a
Compare
Choose a tag to compare

7.0.0 - 2022-03-15

Bug fixes

  • update tsc-alias to v1.6.4 (#199)
  • use on to listen ready event instead of once (#208)

Features

  • health check
    • (redis) add timeout option to check if ping times out, set the default value to 1000 (#199) (#200)
    • (redis) add memoryThreshold option to check maximum amount of memory (#199) (#200)

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
    • rename RedisCheckOptions to RedisCheckSettings and refactor it (#199) (#200)
    • you must specify what redis server type you use, possible values are "redis", "cluster" (#199) (#200)
    • refactor checkHealth (#199) (#200) (#206)

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 for ClusterClientOptions (#202)

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:

v7.0.0-rc.3

13 Mar 16:12
d702be7
Compare
Choose a tag to compare
v7.0.0-rc.3 Pre-release
Pre-release

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

12 Mar 10:38
8943357
Compare
Choose a tag to compare
v7.0.0-rc.2 Pre-release
Pre-release

7.0.0-rc.2 - 2022-03-12

Changed

  • update messages
  • refactor utils

TESTING

  • add tests for messages, utils, errors

v7.0.0-alpha.3

11 Mar 14:18
f60ecb0
Compare
Choose a tag to compare
v7.0.0-alpha.3 Pre-release
Pre-release

7.0.0-alpha.3 - 2022-03-11

BREAKING CHANGES ⚠️

  • [cluster] flat options in ClusterClientOptions

v7:

ClusterModule.forRoot({
    readyLog: true,
    config: {
        nodes: [{ host: '127.0.0.1', port: 16380 }],
        enableOfflineQueue: true,
        enableReadyCheck: true,
        scaleReads: 'all',
        redisOptions: { password: 'cluster1' }
    }
})

v6:

ClusterModule.forRoot({
    readyLog: true,
    config: {
        nodes: [{ host: '127.0.0.1', port: 16380 }],
        options: {
            enableOfflineQueue: true,
            enableReadyCheck: true,
            scaleReads: 'all',
            redisOptions: { password: 'cluster1' }
        }
    }
})

Changed

  • update interface comments to be more detailed than the pre version

TESTING

  • update cluster.utils.spec.ts, e2e test

v7.0.0-rc.1

10 Mar 14:12
15e3402
Compare
Choose a tag to compare
v7.0.0-rc.1 Pre-release
Pre-release

7.0.0-rc.1 - 2022-03-10

Changed

  • remove redis-errors from dependencies, use custom errors instead of it
  • remove unnecessary test.ts

Fixed

  • fix a worker process failed to exit when testing

NOTE: This version is deprecated.

v7.0.0-alpha.2

10 Mar 10:16
Compare
Choose a tag to compare
v7.0.0-alpha.2 Pre-release
Pre-release

7.0.0-alpha.2 - 2022-03-10

Fixed

  • fix falsy 0 when using memoryThreshold
  • update messages
  • update code comments