Skip to content

Commit

Permalink
nits to try and fix github
Browse files Browse the repository at this point in the history
  • Loading branch information
sjpotter committed Nov 5, 2024
1 parent 5a2b91c commit caa5820
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/client/lib/client/cache.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ describe("Client Side Cache", () => {
});
});

describe.only("Pooled Cache", () => {
describe("Pooled Cache", () => {
const csc = new BasicPooledClientSideCache();

testUtils.testWithClient('Virtual Pool Disconnect', async client1 => {
Expand Down
16 changes: 8 additions & 8 deletions packages/client/lib/client/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ abstract class ClientSideCacheEntryBase implements ClientSideCacheEntry {
}
}

export class ClientSideCacheEntryValue extends ClientSideCacheEntryBase {
class ClientSideCacheEntryValue extends ClientSideCacheEntryBase {
readonly #value: any;

get value() {
Expand All @@ -67,7 +67,7 @@ export class ClientSideCacheEntryValue extends ClientSideCacheEntryBase {
}
}

export class ClientSideCacheEntryPromise extends ClientSideCacheEntryBase {
class ClientSideCacheEntryPromise extends ClientSideCacheEntryBase {
readonly #sendCommandPromise: Promise<ReplyUnion>;

get promise() {
Expand Down Expand Up @@ -95,8 +95,8 @@ export class BasicClientSideCache extends ClientSideCacheProvider {
#cacheKeyToEntryMap: Map<string, ClientSideCacheEntry>;
#keyToCacheKeySetMap: Map<string, Set<string>>;
readonly ttl: number;
readonly #maxEntries: number;
readonly #lru: boolean;
readonly maxEntries: number;
readonly lru: boolean;
#cacheHits = 0;
#cacheMisses = 0;

Expand All @@ -106,8 +106,8 @@ export class BasicClientSideCache extends ClientSideCacheProvider {
this.#cacheKeyToEntryMap = new Map<string, ClientSideCacheEntry>();
this.#keyToCacheKeySetMap = new Map<string, Set<string>>();
this.ttl = config?.ttl ?? 0;
this.#maxEntries = config?.maxEntries ?? 0;
this.#lru = config?.lru ?? true;
this.maxEntries = config?.maxEntries ?? 0;
this.lru = config?.lru ?? true;
}

/* logic of how caching works:
Expand Down Expand Up @@ -240,7 +240,7 @@ export class BasicClientSideCache extends ClientSideCacheProvider {
return undefined;
}

if (val !== undefined && this.#lru) {
if (val !== undefined && this.lru) {
this.#cacheKeyToEntryMap.delete(cacheKey);
this.#cacheKeyToEntryMap.set(cacheKey, val);
}
Expand Down Expand Up @@ -268,7 +268,7 @@ export class BasicClientSideCache extends ClientSideCacheProvider {
oldEntry.invalidate();
}

if (this.#maxEntries > 0 && count >= this.#maxEntries) {
if (this.maxEntries > 0 && count >= this.maxEntries) {
this.deleteOldest();
}

Expand Down
2 changes: 1 addition & 1 deletion packages/client/lib/sentinel/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ class RedisSentinelInternal<
this.#scanInterval = options.scanInterval ?? 0;
this.#passthroughClientErrorEvents = options.passthroughClientErrorEvents ?? false;

this.#nodeClientOptions = options.nodeClientOptions ? {...options.nodeClientOptions} : {};
this.#nodeClientOptions = (options.nodeClientOptions ? {...options.nodeClientOptions} : {}) as typeof options.nodeClientOptions;

Check failure on line 615 in packages/client/lib/sentinel/index.ts

View workflow job for this annotation

GitHub Actions / tests (20, 7.2.0-v13)

Type 'RedisClientOptions<RedisModules, RedisFunctions, RedisScripts, RESP, TYPE_MAPPING, RedisTcpSocketOptions> | undefined' is not assignable to type 'RedisClientOptions<M, F, S, RESP, TYPE_MAPPING, RedisTcpSocketOptions>'.

Check failure on line 615 in packages/client/lib/sentinel/index.ts

View workflow job for this annotation

GitHub Actions / tests (20, 7.2.0-v13)

Type 'RedisClientOptions<RedisModules, RedisFunctions, RedisScripts, RESP, TYPE_MAPPING, RedisTcpSocketOptions> | undefined' is not assignable to type 'RedisClientOptions<M, F, S, RESP, TYPE_MAPPING, RedisTcpSocketOptions>'.

Check failure on line 615 in packages/client/lib/sentinel/index.ts

View workflow job for this annotation

GitHub Actions / tests (20, 6.2.6-v17)

Type 'RedisClientOptions<RedisModules, RedisFunctions, RedisScripts, RESP, TYPE_MAPPING, RedisTcpSocketOptions> | undefined' is not assignable to type 'RedisClientOptions<M, F, S, RESP, TYPE_MAPPING, RedisTcpSocketOptions>'.

Check failure on line 615 in packages/client/lib/sentinel/index.ts

View workflow job for this annotation

GitHub Actions / tests (20, 6.2.6-v17)

Type 'RedisClientOptions<RedisModules, RedisFunctions, RedisScripts, RESP, TYPE_MAPPING, RedisTcpSocketOptions> | undefined' is not assignable to type 'RedisClientOptions<M, F, S, RESP, TYPE_MAPPING, RedisTcpSocketOptions>'.

Check failure on line 615 in packages/client/lib/sentinel/index.ts

View workflow job for this annotation

GitHub Actions / tests (18, 7.4.0-v1)

Type 'RedisClientOptions<RedisModules, RedisFunctions, RedisScripts, RESP, TYPE_MAPPING, RedisTcpSocketOptions> | undefined' is not assignable to type 'RedisClientOptions<M, F, S, RESP, TYPE_MAPPING, RedisTcpSocketOptions>'.

Check failure on line 615 in packages/client/lib/sentinel/index.ts

View workflow job for this annotation

GitHub Actions / tests (18, 7.4.0-v1)

Type 'RedisClientOptions<RedisModules, RedisFunctions, RedisScripts, RESP, TYPE_MAPPING, RedisTcpSocketOptions> | undefined' is not assignable to type 'RedisClientOptions<M, F, S, RESP, TYPE_MAPPING, RedisTcpSocketOptions>'.

Check failure on line 615 in packages/client/lib/sentinel/index.ts

View workflow job for this annotation

GitHub Actions / tests (18, 6.2.6-v17)

Type 'RedisClientOptions<RedisModules, RedisFunctions, RedisScripts, RESP, TYPE_MAPPING, RedisTcpSocketOptions> | undefined' is not assignable to type 'RedisClientOptions<M, F, S, RESP, TYPE_MAPPING, RedisTcpSocketOptions>'.

Check failure on line 615 in packages/client/lib/sentinel/index.ts

View workflow job for this annotation

GitHub Actions / tests (18, 6.2.6-v17)

Type 'RedisClientOptions<RedisModules, RedisFunctions, RedisScripts, RESP, TYPE_MAPPING, RedisTcpSocketOptions> | undefined' is not assignable to type 'RedisClientOptions<M, F, S, RESP, TYPE_MAPPING, RedisTcpSocketOptions>'.

Check failure on line 615 in packages/client/lib/sentinel/index.ts

View workflow job for this annotation

GitHub Actions / tests (18, 7.2.0-v13)

Type 'RedisClientOptions<RedisModules, RedisFunctions, RedisScripts, RESP, TYPE_MAPPING, RedisTcpSocketOptions> | undefined' is not assignable to type 'RedisClientOptions<M, F, S, RESP, TYPE_MAPPING, RedisTcpSocketOptions>'.

Check failure on line 615 in packages/client/lib/sentinel/index.ts

View workflow job for this annotation

GitHub Actions / tests (18, 7.2.0-v13)

Type 'RedisClientOptions<RedisModules, RedisFunctions, RedisScripts, RESP, TYPE_MAPPING, RedisTcpSocketOptions> | undefined' is not assignable to type 'RedisClientOptions<M, F, S, RESP, TYPE_MAPPING, RedisTcpSocketOptions>'.

Check failure on line 615 in packages/client/lib/sentinel/index.ts

View workflow job for this annotation

GitHub Actions / tests (20, 7.4.0-v1)

Type 'RedisClientOptions<RedisModules, RedisFunctions, RedisScripts, RESP, TYPE_MAPPING, RedisTcpSocketOptions> | undefined' is not assignable to type 'RedisClientOptions<M, F, S, RESP, TYPE_MAPPING, RedisTcpSocketOptions>'.

Check failure on line 615 in packages/client/lib/sentinel/index.ts

View workflow job for this annotation

GitHub Actions / tests (20, 7.4.0-v1)

Type 'RedisClientOptions<RedisModules, RedisFunctions, RedisScripts, RESP, TYPE_MAPPING, RedisTcpSocketOptions> | undefined' is not assignable to type 'RedisClientOptions<M, F, S, RESP, TYPE_MAPPING, RedisTcpSocketOptions>'.
if (this.#nodeClientOptions.url !== undefined) {
throw new Error("invalid nodeClientOptions for Sentinel");
}
Expand Down

0 comments on commit caa5820

Please sign in to comment.