From 28c54001b30f54a1a0f0cd91c1ef612465eac306 Mon Sep 17 00:00:00 2001 From: Krum Tyukenov Date: Thu, 2 Jul 2026 13:36:50 +0300 Subject: [PATCH] fix(api): drop .d.ts hunks from ioredis patch so it survives the e2e build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The E2E "Build Docker" job started failing (patch-package: "Failed to apply patch for package ioredis") after RI-8296 (#6100) added patches/ioredis+5.3.2.patch. The patch modified ioredis' built/*.d.ts files. .github/build/build_modules.sh installs the API (patch applies), then runs `yarn autoclean` with .yarnclean.prod — whose `*.ts` rule also deletes `*.d.ts` — and then re-installs, which re-runs patch-package. Because the patch's target .d.ts files were stripped by autoclean, patch-package can no longer apply it and the build fails. (The host workspace build passes because it never autocleans.) The .d.ts changes are type-only and unused by our build: prepareCommandOptions returns `any`, and RedisClient defines its own `integerReply` type — nothing type-checks against ioredis' CommandOptions. So drop the two .d.ts hunks and keep only the runtime Command.js / DataHandler.js changes. patch-package is then idempotent across the autoclean+reinstall cycle. Reproduced the full install -> autoclean -> reinstall sequence locally: the .js-only patch applies cleanly on both passes (`ioredis@5.3.2 ✔`). Co-Authored-By: Claude --- redisinsight/api/patches/ioredis+5.3.2.patch | 36 -------------------- 1 file changed, 36 deletions(-) diff --git a/redisinsight/api/patches/ioredis+5.3.2.patch b/redisinsight/api/patches/ioredis+5.3.2.patch index 9a9f3e40e9..b9c7803c48 100644 --- a/redisinsight/api/patches/ioredis+5.3.2.patch +++ b/redisinsight/api/patches/ioredis+5.3.2.patch @@ -1,23 +1,3 @@ -diff --git a/node_modules/ioredis/built/Command.d.ts b/node_modules/ioredis/built/Command.d.ts -index ea90aa2..ca28897 100644 ---- a/node_modules/ioredis/built/Command.d.ts -+++ b/node_modules/ioredis/built/Command.d.ts -@@ -6,6 +6,7 @@ interface CommandOptions { - * Set the encoding of the reply, by default buffer will be returned. - */ - replyEncoding?: BufferEncoding | null; -+ integerReply?: "number" | "bigint"; - errorStack?: Error; - keyPrefix?: string; - /** -@@ -75,6 +76,7 @@ export default class Command implements Respondable { - resolve: (result: any) => void; - promise: Promise; - private replyEncoding; -+ integerReply?: "number" | "bigint"; - private errorStack; - private bufferMode; - private callback; diff --git a/node_modules/ioredis/built/Command.js b/node_modules/ioredis/built/Command.js index 40cd1a6..aad90af 100644 --- a/node_modules/ioredis/built/Command.js @@ -30,22 +10,6 @@ index 40cd1a6..aad90af 100644 this.errorStack = options.errorStack; this.args = args.flat(); this.callback = callback; -diff --git a/node_modules/ioredis/built/DataHandler.d.ts b/node_modules/ioredis/built/DataHandler.d.ts -index 93e97d9..24fe877 100644 ---- a/node_modules/ioredis/built/DataHandler.d.ts -+++ b/node_modules/ioredis/built/DataHandler.d.ts -@@ -26,7 +26,11 @@ interface ParserOptions { - } - export default class DataHandler { - private redis; -+ private parser; -+ private stringNumbers; - constructor(redis: DataHandledable, parserOptions: ParserOptions); -+ private updateIntegerReplyMode; -+ private convertIntegerReply; - private returnFatalError; - private returnError; - private returnReply; diff --git a/node_modules/ioredis/built/DataHandler.js b/node_modules/ioredis/built/DataHandler.js index 1db1848..f985ed5 100644 --- a/node_modules/ioredis/built/DataHandler.js