From 47d08eafbf964569352a9516b189391b513fe44b Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Thu, 16 Apr 2026 10:07:41 +0200 Subject: [PATCH] fix(ci): preserve version replacements in update-deps workflow Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- .github/workflows/update-deps.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-deps.yml b/.github/workflows/update-deps.yml index f26e206..d7a99d0 100644 --- a/.github/workflows/update-deps.yml +++ b/.github/workflows/update-deps.yml @@ -297,7 +297,13 @@ jobs: if (match[2] === target.value) { continue; } - fs.writeFileSync(absolutePath, content.replace(target.pattern, `$1${target.value}$3`), 'utf8'); + const updatedContent = content.replace(target.pattern, (...args) => { + const groups = args.slice(1, -2); + const prefix = groups[0]; + const suffix = groups[2] || ''; + return `${prefix}${target.value}${suffix}`; + }); + fs.writeFileSync(absolutePath, updatedContent, 'utf8'); changedFiles.push(target.path); }