chore: upgrade to pnpm v12, vitest v5 and resolve deprecated subdependencies

This commit is contained in:
openhands committed 2026-09-27 19:42:34 +02:00
1 parent f187cd70a9
commit e4f83a8036
18 files changed
+1692 -1121

No files matched your search

+1
View File
@@ -79,6 +79,7 @@ export const POST = withAdmin(
headers: {
"Content-Type": "text/event-stream",
"Cache-Control": "no-cache",
"X-Accel-Buffering": "no",
Connection: "keep-alive",
},
});
@@ -343,6 +343,7 @@ export const POST = withAdmin(
headers: {
"Content-Type": "text/event-stream",
"Cache-Control": "no-cache",
"X-Accel-Buffering": "no",
Connection: "keep-alive",
},
});
@@ -529,6 +529,7 @@ export const POST = withAdmin(
headers: {
"Content-Type": "text/event-stream",
"Cache-Control": "no-cache",
"X-Accel-Buffering": "no",
Connection: "keep-alive",
},
});
@@ -40,6 +40,7 @@ export const POST = withAdmin({ permission: PERMS.ASSETS_IMPORT }, async () => {
headers: {
"Content-Type": "text/event-stream",
"Cache-Control": "no-cache",
"X-Accel-Buffering": "no",
Connection: "keep-alive",
},
});
@@ -124,6 +124,7 @@ export const POST = withAdmin(
headers: {
"Content-Type": "text/event-stream",
"Cache-Control": "no-cache",
"X-Accel-Buffering": "no",
Connection: "keep-alive",
},
});
@@ -125,6 +125,7 @@ export const GET = withAdmin(
headers: {
"Content-Type": "text/event-stream",
"Cache-Control": "no-cache",
"X-Accel-Buffering": "no",
Connection: "keep-alive",
},
});
+1
View File
@@ -103,6 +103,7 @@ export async function GET(req: Request) {
headers: {
"content-type": "text/event-stream; charset=utf-8",
"cache-control": "no-store, no-transform",
"x-accel-buffering": "no",
connection: "keep-alive",
},
});
+1
View File
@@ -61,6 +61,7 @@ export async function GET(req: Request) {
headers: {
"content-type": "text/event-stream; charset=utf-8",
"cache-control": "no-store, no-transform",
"x-accel-buffering": "no",
connection: "keep-alive",
},
});
File diff suppressed because it is too large. Load diff
+4 -2
View File
@@ -43,8 +43,10 @@ async function warm<T>(name: string, load: () => Promise<T>): Promise<void> {
}
export async function warmPublicCaches(): Promise<void> {
// Small delays between groups: a boot-time burst of COUNT(*) queries against
// a database that is still opening connections helps nobody.
// Elke `warm` wordt afgewacht voordat de volgende begint, dus de COUNT(*)
// queries gaan één voor één in plaats van als een burst op een database die
// nog aan het opstarten is. Dat is goed genoeg; kunstmatige sleeps zouden
// de warme start alleen maar vertragen zonder iets te winnen.
await warm("online_count", () =>
cached("online_count", ONLINE_TTL_MS, countOnline, { staleMs: 15_000 }),
);
+28 -5
View File
@@ -11,13 +11,30 @@ git() {
}
flock() { echo "lock" >> "$TEST_DIR/calls"; [ "$SCENARIO" != lock-failure ]; }
pnpm() {
echo "pnpm $*" >> "$TEST_DIR/calls"
# De env-prefix (bv. PLAYWRIGHT_BASE_URL) hoort bij het deploypad dat getest
# wordt, dus die loggen we mee: zo blijft zichtbaar dat de e2e-test tegen de
# juiste poort draait.
echo "${PLAYWRIGHT_BASE_URL:+PLAYWRIGHT_BASE_URL=$PLAYWRIGHT_BASE_URL }pnpm $*" >> "$TEST_DIR/calls"
if [ "$1" = db:migrate ] && [ "$SCENARIO" = migration-failure ]; then return 1; fi
if [ "$1" = test:e2e ] && [ "$SCENARIO" = smoke-failure ] && [ "$(cat "$TEST_DIR/epicnext-cms-app" 2>/dev/null)" = new ]; then return 1; fi
if [ "$1" = test:e2e ] && [ "$SCENARIO" = smoke-failure ] && candidate_is_new; then return 1; fi
return 0
}
# De kandidaat is het container dat het script zojuist heeft gestart. Bij
# blue/green is dat niet per se `epicnext-cms-app`.
candidate_is_new() {
for f in epicnext-cms-app epicnext-cms-green; do
if [ "$(cat "$TEST_DIR/$f" 2>/dev/null)" = new ]; then return 0; fi
done
return 1
}
nginx() {
echo "nginx $*" >> "$TEST_DIR/calls"
if [ "$SCENARIO" = nginx-reject ] && [ "$1" = "-t" ]; then return 1; fi
if [ "$SCENARIO" = nginx-reload-fail ] && [ "$1" = "-s" ]; then return 1; fi
return 0
}
curl() {
if [ "$SCENARIO" = health-failure ] && [ "$(cat "$TEST_DIR/epicnext-cms-app" 2>/dev/null)" = new ]; then return 1; fi
if [ "$SCENARIO" = health-failure ] && candidate_is_new; then return 1; fi
echo '{"database":true}'
}
sleep() { :; }
@@ -40,14 +57,20 @@ docker() {
stop) return 0 ;;
rename) mv "$TEST_DIR/$2" "$TEST_DIR/$3" ;;
run)
echo new > "$TEST_DIR/epicnext-cms-app"
run_name=epicnext-cms-app
prev=""
for arg in "$@"; do
if [ "$prev" = "--name" ]; then run_name="$arg"; fi
prev="$arg"
done
echo new > "$TEST_DIR/$run_name"
[ "$SCENARIO" != run-failure ] ;;
start) [ -f "$TEST_DIR/$2" ] ;;
rm) rm -f "$TEST_DIR/$name" ;;
*) return 0 ;;
esac
}
export -f git flock pnpm curl sleep docker
export -f git flock pnpm curl sleep docker nginx candidate_is_new
node() {
echo "node $*" >> "$TEST_DIR/calls"