diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml
index 22e71f6..108caaf 100644
--- a/.gitea/workflows/ci.yaml
+++ b/.gitea/workflows/ci.yaml
@@ -54,7 +54,7 @@ jobs:
run: |
pipx run --spec desloppify desloppify scan --profile ci --path . --no-badge
- name: Upload scorecard
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v3
with:
name: desloppify-scorecard
path: scorecard.png
diff --git a/app/api/discord-app/[id]/route.ts b/app/api/discord-app/[id]/route.ts
index dc7a97f..1cefdb7 100644
--- a/app/api/discord-app/[id]/route.ts
+++ b/app/api/discord-app/[id]/route.ts
@@ -22,7 +22,9 @@ export async function GET(
try {
info = await getDiscordAppInfo(id);
} catch (error) {
- warnDev(`discord-app upstream failed: ${id} -> ${error instanceof Error ? error.message : error}`);
+ warnDev(
+ `discord-app upstream failed: ${id} -> ${error instanceof Error ? error.message : error}`,
+ );
return jsonErrorWithCors({ error: "Upstream unavailable" }, 502, 60, origin);
}
if (!info) {
diff --git a/components/game-profile-modal.tsx b/components/game-profile-modal.tsx
index 1615458..c011dda 100644
--- a/components/game-profile-modal.tsx
+++ b/components/game-profile-modal.tsx
@@ -285,7 +285,9 @@ export function GameProfileModal({
) : null}
- {profile ? : null}
+ {profile ? (
+
+ ) : null}
{profile?.itad && (bestPrice || historyLow) ? (
{
it("renders nothing without review sources", () => {
const dict = getDictionary("en");
const { container } = render(
- ,
+ ,
);
expect(container.textContent).toBe("");
});
diff --git a/lib/api-route.ts b/lib/api-route.ts
index b19b561..6f7c403 100644
--- a/lib/api-route.ts
+++ b/lib/api-route.ts
@@ -22,10 +22,7 @@ export function isAllowedOrigin(request: Request): boolean {
}
function resolveAllowedOrigin(origin: string | null): string {
- if (
- origin !== null &&
- (origin === ALLOWED_ORIGIN || (isDev() && DEV_ORIGINS.has(origin)))
- ) {
+ if (origin !== null && (origin === ALLOWED_ORIGIN || (isDev() && DEV_ORIGINS.has(origin)))) {
return origin;
}
return ALLOWED_ORIGIN;
@@ -79,11 +76,7 @@ export function jsonErrorWithCors(
},
});
}
-export function jsonWithCors(
- data: unknown,
- sMaxage = 3600,
- origin?: string | null,
-): NextResponse {
+export function jsonWithCors(data: unknown, sMaxage = 3600, origin?: string | null): NextResponse {
return NextResponse.json(data, {
headers: {
"Cache-Control": `public, s-maxage=${sMaxage}, stale-while-revalidate=86400`,
diff --git a/lib/game/game-format.ts b/lib/game/game-format.ts
index 0567c06..e08e264 100644
--- a/lib/game/game-format.ts
+++ b/lib/game/game-format.ts
@@ -69,7 +69,11 @@ export function formatReleaseDate(value: string, localeTag: string): string {
return value;
}
-export function formatCount(value: number | null | undefined, localeTag: string, unit: string): string {
+export function formatCount(
+ value: number | null | undefined,
+ localeTag: string,
+ unit: string,
+): string {
if (value == null) {
return "—";
}
diff --git a/lib/game/game-profile.test.ts b/lib/game/game-profile.test.ts
index 68de67d..d516b4e 100644
--- a/lib/game/game-profile.test.ts
+++ b/lib/game/game-profile.test.ts
@@ -1,5 +1,10 @@
import { describe, expect, it } from "vitest";
-import { buildLinks, mergePeople, mergePlatforms, selectScreenshots } from "@/lib/game/game-profile";
+import {
+ buildLinks,
+ mergePeople,
+ mergePlatforms,
+ selectScreenshots,
+} from "@/lib/game/game-profile";
import type { IgdbGame } from "@/lib/game/game-profile-types";
describe("mergePeople", () => {
diff --git a/lib/game/game-profile.ts b/lib/game/game-profile.ts
index 4c25e52..458f40d 100644
--- a/lib/game/game-profile.ts
+++ b/lib/game/game-profile.ts
@@ -186,7 +186,9 @@ export function toPricePoint(p: ItadOverviewPrice["current"]): GamePricePoint |
export function mapItadBlock(
itadInfo: ItadGameInfo | null,
- priceEntry: { current?: ItadOverviewPrice["current"]; lowest?: ItadOverviewPrice["current"] } | undefined,
+ priceEntry:
+ | { current?: ItadOverviewPrice["current"]; lowest?: ItadOverviewPrice["current"] }
+ | undefined,
): NonNullable | null {
if (!process.env.ITAD_API_KEY || (!itadInfo && !priceEntry)) {
return null;
@@ -197,10 +199,7 @@ export function mapItadBlock(
pageUrl: itadInfo?.urls?.game ?? null,
playerCount: itadInfo?.players?.recent ?? null,
reviews: (itadInfo?.reviews ?? [])
- .filter(
- (r): r is ItadReview & { source: string; url: string } =>
- !!r.source && !!r.url,
- )
+ .filter((r): r is ItadReview & { source: string; url: string } => !!r.source && !!r.url)
.map((r) => ({
score: r.score ?? null,
source: r.source,
diff --git a/lib/game/lanyard.test.ts b/lib/game/lanyard.test.ts
index 2529d75..528f49c 100644
--- a/lib/game/lanyard.test.ts
+++ b/lib/game/lanyard.test.ts
@@ -25,9 +25,9 @@ describe("activityImageUrl", () => {
});
it("resolves Spotify keys", () => {
- expect(activityImageUrl(activity({ assets: { large_image: "spotify:img" } }), "large")).toBe(
- "https://i.scdn.co/image/img",
- );
+ expect(
+ activityImageUrl(activity({ assets: { large_image: "spotify:img" } }), "large"),
+ ).toBe("https://i.scdn.co/image/img");
});
it("resolves app assets with application id", () => {