From 7c51751e2f125806b8039b9d302f5986941290f6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 06:54:32 +0000 Subject: [PATCH 1/3] Update dependency lru-cache to v7.18.3 --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 950b6421..1aa247fb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8206,9 +8206,9 @@ "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, "node_modules/lru-cache": { - "version": "7.13.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.13.2.tgz", - "integrity": "sha512-VJL3nIpA79TodY/ctmZEfhASgqekbT574/c4j3jn4bKXbSCnTTCH/KltZyvL2GlV+tGSMtsWyem8DCX7qKTMBA==", + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "engines": { "node": ">=12" } @@ -16715,9 +16715,9 @@ "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, "lru-cache": { - "version": "7.13.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.13.2.tgz", - "integrity": "sha512-VJL3nIpA79TodY/ctmZEfhASgqekbT574/c4j3jn4bKXbSCnTTCH/KltZyvL2GlV+tGSMtsWyem8DCX7qKTMBA==" + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==" }, "make-dir": { "version": "3.1.0", From b721c2b8a1bcecc59612907b1599d0028593676c Mon Sep 17 00:00:00 2001 From: Leona Kuse Date: Mon, 29 Jul 2024 08:56:33 +0200 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=8F=B7=EF=B8=8F=20fix=20getting=20ele?= =?UTF-8?q?m=20from=20cache=20after=20new=20dependency=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cache/storage/memory-storage-adapter.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cache/storage/memory-storage-adapter.ts b/src/cache/storage/memory-storage-adapter.ts index e8c485b1..7923b776 100644 --- a/src/cache/storage/memory-storage-adapter.ts +++ b/src/cache/storage/memory-storage-adapter.ts @@ -21,8 +21,11 @@ export class MemoryStorageAdapter implements StorageAdapter { } public async get(key: string): Promise { - const cached = await this.cache.get(key); - return cached ?? null; + if (this.cache.has(key)) { + return this.cache.get(key) as T; + } + + return null; } public async set(key: string, value: T): Promise { From 5bcf8f973a78480d9fd538c0b178dcaee491e581 Mon Sep 17 00:00:00 2001 From: Leona Kuse Date: Mon, 29 Jul 2024 08:57:45 +0200 Subject: [PATCH 3/3] :recycle: use new method instead of deprecated one --- src/cache/storage/memory-storage-adapter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cache/storage/memory-storage-adapter.ts b/src/cache/storage/memory-storage-adapter.ts index 7923b776..4c32753b 100644 --- a/src/cache/storage/memory-storage-adapter.ts +++ b/src/cache/storage/memory-storage-adapter.ts @@ -33,6 +33,6 @@ export class MemoryStorageAdapter implements StorageAdapter { } public async delete(key: string): Promise { - this.cache.del(key); + this.cache.delete(key); } }