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.
This commit is contained in:
+1
-1
@@ -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 \
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user