From b72030114c3a3dc36393f4e49553677768135188 Mon Sep 17 00:00:00 2001 From: Dmitry Verkhoturov Date: Tue, 30 Jun 2026 20:05:42 +0100 Subject: [PATCH] Address Copilot review feedback on #2091 - Pin pnpm to the exact version (10.10.0) when installing it in the production Dockerfile, matching packageManager and Dockerfile.e2e, instead of a floating major that can drift the lockfile behaviour. - Fix mockEndpoint's array header handling in the api test utility: append each value instead of joining with a comma, which is how multi-value headers (e.g. set-cookie) are actually represented. - Update apps/remark42's engines to node >=18 / pnpm >=10, matching the pnpm 10 requirement instead of the stale node 16 / pnpm 8 range. --- Dockerfile | 2 +- frontend/apps/remark42/package.json | 4 ++-- frontend/packages/api/tests/test-utils.ts | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0ce717d8..4cb70223 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ COPY ./frontend/apps/remark42/package.json /srv/frontend/apps/remark42/ RUN \ if [[ -z "$SKIP_FRONTEND_BUILD" || -z "$SKIP_FRONTEND_TEST" ]]; then \ apk add --no-cache --update git && \ - npm i -g pnpm@10; \ + npm i -g pnpm@10.10.0; \ fi RUN --mount=type=cache,id=pnpm,target=/root/.pnpm-store/v3 \ diff --git a/frontend/apps/remark42/package.json b/frontend/apps/remark42/package.json index 5a090eca..a26261ba 100644 --- a/frontend/apps/remark42/package.json +++ b/frontend/apps/remark42/package.json @@ -22,8 +22,8 @@ "translation:check": "node ./tasks/checkTranslation.js" }, "engines": { - "node": ">=16.15", - "pnpm": ">=8" + "node": ">=18", + "pnpm": ">=10" }, "packageManager": "pnpm@10.10.0", "dependencies": { diff --git a/frontend/packages/api/tests/test-utils.ts b/frontend/packages/api/tests/test-utils.ts index 8fde3050..2ee76473 100644 --- a/frontend/packages/api/tests/test-utils.ts +++ b/frontend/packages/api/tests/test-utils.ts @@ -41,7 +41,11 @@ export function mockEndpoint( const responseHeaders = new Headers() if (headers) { for (const [key, value] of Object.entries(headers)) { - responseHeaders.set(key, Array.isArray(value) ? value.join(', ') : value) + if (Array.isArray(value)) { + for (const v of value) responseHeaders.append(key, v) + } else { + responseHeaders.set(key, value) + } } }