Compare commits

..
Author SHA1 Message Date
Thomas Camlong dc5eb260d4 chore: regenerate lockfile for typescript v7 2026-07-13 18:54:50 +02:00
Thomas Camlong f9fd3dac5a fix(docker): remove pnpm fetch to fix CI build with patched deps
pnpm fetch in pnpm 11.10.0 tries to apply patches during the fetch phase,
failing because packages aren't installed to node_modules yet.
Consolidated back to COPY . . + pnpm install.

Also bumps: docker/dockerfile 1.10->1.25, typescript ^6->^7,
actions/cache@v4->v6, actions/upload-artifact@v4->v7,
actions/github-script@v8->v9
2026-07-13 18:51:46 +02:00
11 changed files with 3914 additions and 4513 deletions

No files matched your search

+7 -7
View File
@@ -60,7 +60,7 @@ jobs:
TURBO_PLATFORM: linux/amd64 TURBO_PLATFORM: linux/amd64
steps: steps:
- uses: actions/checkout@v7 - uses: actions/checkout@v7
if: '!env.ACT' if: "!env.ACT"
with: with:
fetch-depth: 0 fetch-depth: 0
persist-credentials: false persist-credentials: false
@@ -111,7 +111,7 @@ jobs:
packages: write packages: write
steps: steps:
- uses: actions/checkout@v7 - uses: actions/checkout@v7
if: '!env.ACT' if: "!env.ACT"
with: with:
persist-credentials: false persist-credentials: false
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || '' }} ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || '' }}
@@ -120,11 +120,11 @@ jobs:
uses: ./tooling/github/setup uses: ./tooling/github/setup
- name: Set up Docker Buildx - name: Set up Docker Buildx
if: '!env.ACT' if: "!env.ACT"
uses: docker/setup-buildx-action@v4 uses: docker/setup-buildx-action@v4
- name: Build container once - name: Build container once
if: '!env.ACT' if: "!env.ACT"
uses: docker/build-push-action@v7 uses: docker/build-push-action@v7
with: with:
context: . context: .
@@ -165,7 +165,7 @@ jobs:
--tag homarr-ci --tag homarr-e2e "${secret_args[@]}" . --tag homarr-ci --tag homarr-e2e "${secret_args[@]}" .
- name: Cache Playwright browsers - name: Cache Playwright browsers
if: '!env.ACT' if: "!env.ACT"
id: playwright-cache id: playwright-cache
uses: actions/cache@v6 uses: actions/cache@v6
with: with:
@@ -316,8 +316,8 @@ jobs:
run: test -n "$PR_NUMBER" || { echo "pr_number is required for cleanup"; exit 1; } run: test -n "$PR_NUMBER" || { echo "pr_number is required for cleanup"; exit 1; }
- name: Delete GHCR package version - name: Delete GHCR package version
if: '!env.ACT' if: "!env.ACT"
uses: actions/github-script@v8 uses: actions/github-script@v9
with: with:
script: | script: |
const packageName = "homarr-test"; const packageName = "homarr-test";
+1 -18
View File
@@ -7,26 +7,9 @@ WORKDIR /app
RUN apk add --no-cache libc6-compat curl bash && apk update RUN apk add --no-cache libc6-compat curl bash && apk update
RUN corepack enable pnpm RUN corepack enable pnpm
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json ./
COPY patches ./patches
# Workaround for pnpm/pnpm#5268: pnpm fetch crashes when patchedDependencies
# are configured with nodeLinker: hoisted. The applyPatchToDir function tries
# to chdir into node_modules/<pkg> which doesn't exist during fetch (only the
# content-addressable store is populated). By temporarily switching to the
# isolated linker, patches apply inside the virtual store (node_modules/.pnpm/...)
# which IS created by pnpm fetch. The original hoisted linker is restored
# before the install step so the final node_modules layout stays flat.
RUN --mount=type=cache,id=pnpm-store,target=/pnpm/store \
pnpm config set store-dir /pnpm/store && \
sed -i 's/nodeLinker: hoisted/nodeLinker: isolated/' pnpm-workspace.yaml && \
pnpm fetch && \
sed -i 's/nodeLinker: isolated/nodeLinker: hoisted/' pnpm-workspace.yaml
COPY . . COPY . .
# Follow the pnpm fetch pattern from https://pnpm.io/cli/fetch
# --frozen-lockfile is omitted as recommended by the pnpm fetch docs
RUN --mount=type=cache,id=pnpm-store,target=/pnpm/store \ RUN --mount=type=cache,id=pnpm-store,target=/pnpm/store \
pnpm install --recursive pnpm config set store-dir /pnpm/store && pnpm install --recursive --frozen-lockfile
ARG SKIP_ENV_VALIDATION='true' ARG SKIP_ENV_VALIDATION='true'
ARG CI='true' ARG CI='true'
@@ -1,17 +1,9 @@
"use client"; "use client";
import type { MutableRefObject, ReactNode } from "react"; import type { MutableRefObject, ReactNode } from "react";
import { useCallback, useMemo } from "react"; import { useCallback, useEffect, useMemo, useState } from "react";
import { Group, Loader, Menu, Switch, Text, Tooltip } from "@mantine/core"; import { Group, Loader, Menu, Switch, Text } from "@mantine/core";
import { import { IconCopy, IconLayoutKanban, IconRefresh, IconSettings, IconTrash } from "@tabler/icons-react";
IconAlertTriangle,
IconCircleCheck,
IconCopy,
IconLayoutKanban,
IconRefresh,
IconSettings,
IconTrash,
} from "@tabler/icons-react";
import type { QueryClient, QueryKey } from "@tanstack/react-query"; import type { QueryClient, QueryKey } from "@tanstack/react-query";
import { useIsFetching, useQueryClient } from "@tanstack/react-query"; import { useIsFetching, useQueryClient } from "@tanstack/react-query";
@@ -19,12 +11,10 @@ import { clientApi } from "@homarr/api/client";
import { useSession } from "@homarr/auth/client"; import { useSession } from "@homarr/auth/client";
import { useRequiredBoard } from "@homarr/boards/context"; import { useRequiredBoard } from "@homarr/boards/context";
import { useEditMode } from "@homarr/boards/edit-mode"; import { useEditMode } from "@homarr/boards/edit-mode";
import { useTimeAgo } from "@homarr/common";
import { useConfirmModal, useModalAction } from "@homarr/modals"; import { useConfirmModal, useModalAction } from "@homarr/modals";
import { useSettings } from "@homarr/settings"; import { useSettings } from "@homarr/settings";
import { translateIfNecessary } from "@homarr/translation"; import { translateIfNecessary } from "@homarr/translation";
import { useI18n, useScopedI18n } from "@homarr/translation/client"; import { useI18n, useScopedI18n } from "@homarr/translation/client";
import type { TranslationFunction } from "@homarr/translation";
import type { WidgetContextMenuAction } from "@homarr/widgets"; import type { WidgetContextMenuAction } from "@homarr/widgets";
import { reduceWidgetOptionsWithDefaultValues, widgetImports } from "@homarr/widgets"; import { reduceWidgetOptionsWithDefaultValues, widgetImports } from "@homarr/widgets";
import { WidgetEditModal } from "@homarr/widgets/modals"; import { WidgetEditModal } from "@homarr/widgets/modals";
@@ -242,14 +232,11 @@ export const WidgetContextMenu = ({ item, widgetStateRef, children }: WidgetCont
onClick={handleRefetch} onClick={handleRefetch}
disabled={isWidgetFetching} disabled={isWidgetFetching}
> >
<Group justify="space-between" wrap="nowrap" gap="sm"> <Group justify="space-between" wrap="nowrap">
{tMenu("refresh")} {tMenu("refresh")}
<WidgetQueryStatus <Text size="xs" c="dimmed">
queryClient={queryClient} <WidgetCacheAge queryClient={queryClient} queryKey={widgetQueryKey} isFetching={isWidgetFetching} />
queryKey={widgetQueryKey} </Text>
isFetching={isWidgetFetching}
t={t}
/>
</Group> </Group>
</Menu.Item> </Menu.Item>
<Menu.Item <Menu.Item
@@ -286,65 +273,34 @@ export const WidgetContextMenu = ({ item, widgetStateRef, children }: WidgetCont
); );
}; };
interface WidgetQueryStatusProps { const WidgetCacheAge = ({
queryClient,
queryKey,
isFetching,
}: {
queryClient: QueryClient; queryClient: QueryClient;
queryKey: QueryKey; queryKey: QueryKey;
isFetching: boolean; isFetching: boolean;
t: TranslationFunction; }) => {
} // 1s tick for "just now" → "1s ago" label transition; isFetching prop handles refetch reactivity
const [, setTick] = useState(0);
useEffect(() => {
const id = setInterval(() => setTick((n) => n + 1), 1000);
return () => clearInterval(id);
}, []);
const WidgetQueryStatus = ({ queryClient, queryKey, isFetching, t }: WidgetQueryStatusProps) => { if (isFetching) return <Loader size={12} />;
const queries = queryClient.getQueryCache().findAll({ queryKey });
const timestamps = queries.map((query) => query.state.dataUpdatedAt).filter(Boolean);
const latest = timestamps.length > 0 ? Math.max(...timestamps) : 0;
const ageLabel = useTimeAgo(new Date(latest));
if (isFetching) { const timestamps = queryClient
return ( .getQueryCache()
<Group gap={4} wrap="nowrap"> .findAll({ queryKey })
<Loader size={12} /> .map((q) => q.state.dataUpdatedAt)
<Text size="xs" c="dimmed"> .filter(Boolean);
{t("item.menu.status.loading")} if (timestamps.length === 0) return null;
</Text>
</Group>
);
}
if (queries.length === 0) { const latest = Math.max(...timestamps);
return ( const seconds = Math.floor((Date.now() - latest) / 1000);
<Text size="xs" c="dimmed"> if (seconds < 5) return "just now";
{t("item.menu.status.idle")} if (seconds < 60) return `${seconds}s ago`;
</Text> return `${Math.floor(seconds / 60)}m ago`;
);
}
const hasError = queries.some((q) => q.state.status === "error");
if (hasError) {
const errorQuery = queries.find((q) => q.state.status === "error");
const errorMessage =
errorQuery?.state.error instanceof Error
? errorQuery.state.error.message
: String(errorQuery?.state.error ?? "Unknown error");
return (
<Tooltip label={errorMessage} multiline position="left" w={250}>
<Group gap={4} wrap="nowrap">
<IconAlertTriangle size={12} color="var(--mantine-color-red-6)" />
<Text size="xs" c="red.6">
{t("item.menu.status.error")} · {ageLabel}
</Text>
</Group>
</Tooltip>
);
}
return (
<Group gap={4} wrap="nowrap">
<IconCircleCheck size={12} color="var(--mantine-color-green-6)" />
<Text size="xs" c="dimmed">
{t("item.menu.status.success")} · {ageLabel}
</Text>
</Group>
);
}; };
@@ -153,9 +153,9 @@ export class OverseerrIntegration
); );
} else if (pendingResults.length > 0) requests = pendingResults; } else if (pendingResults.length > 0) requests = pendingResults;
else if (allResults.length > 0) requests = allResults; else if (allResults.length > 0) requests = allResults;
else return []; else return Promise.all([]);
const settled = await Promise.allSettled( return await Promise.all(
requests.map(async (request): Promise<MediaRequest> => { requests.map(async (request): Promise<MediaRequest> => {
const information = await this.getItemInformationAsync(request.media.tmdbId, request.type); const information = await this.getItemInformationAsync(request.media.tmdbId, request.type);
@@ -184,10 +184,6 @@ export class OverseerrIntegration
}; };
}), }),
); );
return settled
.filter((result): result is PromiseFulfilledResult<MediaRequest> => result.status === "fulfilled")
.map((result) => result.value);
} }
protected mapRequestStatus(status: UpstreamMediaRequestStatus): MediaRequestStatus { protected mapRequestStatus(status: UpstreamMediaRequestStatus): MediaRequestStatus {
@@ -305,10 +301,6 @@ export class OverseerrIntegration
}, },
}); });
if (!response.ok) {
throw new Error(`Failed to fetch ${type} information for id ${id}: ${response.status} ${response.statusText}`);
}
if (type === "tv") { if (type === "tv") {
const series = (await response.json()) as TvInformation; const series = (await response.json()) as TvInformation;
return { return {
@@ -13,7 +13,6 @@ type IntegrationOfKind<TKind extends IntegrationKind> = Omit<Integration, "kind"
interface Options<TData, TKind extends IntegrationKind, TInput extends Record<string, unknown>> { interface Options<TData, TKind extends IntegrationKind, TInput extends Record<string, unknown>> {
requestAsync: (integration: IntegrationOfKind<TKind>, input: TInput) => Promise<TData>; requestAsync: (integration: IntegrationOfKind<TKind>, input: TInput) => Promise<TData>;
cacheTtlMs?: number; cacheTtlMs?: number;
fallbackToStaleOnError?: boolean;
} }
export const createIntegrationRequestHandler = < export const createIntegrationRequestHandler = <
@@ -33,7 +32,6 @@ export const createIntegrationRequestHandler = <
return options.requestAsync(integration, input.options); return options.requestAsync(integration, input.options);
}, },
cacheTtlMs: options.cacheTtlMs, cacheTtlMs: options.cacheTtlMs,
fallbackToStaleOnError: options.fallbackToStaleOnError,
}); });
return { return {
@@ -1,7 +1,6 @@
interface Options<TData, TInput extends Record<string, unknown>> { interface Options<TData, TInput extends Record<string, unknown>> {
requestAsync: (input: TInput) => Promise<TData>; requestAsync: (input: TInput) => Promise<TData>;
cacheTtlMs?: number; cacheTtlMs?: number;
fallbackToStaleOnError?: boolean;
} }
type CacheEntry<TData> = { data: TData; timestamp: Date; expiresAt: number }; type CacheEntry<TData> = { data: TData; timestamp: Date; expiresAt: number };
@@ -36,6 +35,7 @@ export const createRequestHandler = <TData, TInput extends Record<string, unknow
if (cached && Date.now() < cached.expiresAt) { if (cached && Date.now() < cached.expiresAt) {
return { data: cached.data, timestamp: cached.timestamp }; return { data: cached.data, timestamp: cached.timestamp };
} }
if (cached) cache.delete(key);
const existing = inflight.get(key); const existing = inflight.get(key);
if (existing) return existing; if (existing) return existing;
@@ -55,9 +55,6 @@ export const createRequestHandler = <TData, TInput extends Record<string, unknow
}) })
.catch((err) => { .catch((err) => {
inflight.delete(key); inflight.delete(key);
if (options.fallbackToStaleOnError && cached) {
return cached;
}
throw err; throw err;
}); });
@@ -13,6 +13,4 @@ export const mediaRequestListRequestHandler = createIntegrationRequestHandler<
const integrationInstance = await createIntegrationAsync(integration); const integrationInstance = await createIntegrationAsync(integration);
return await integrationInstance.getRequestsAsync(); return await integrationInstance.getRequestsAsync();
}, },
cacheTtlMs: 60_000,
fallbackToStaleOnError: true,
}); });
+1 -7
View File
@@ -1598,16 +1598,10 @@
}, },
"menu": { "menu": {
"label": { "label": {
"settings": "", "settings": "Settings",
"refresh": "", "refresh": "",
"options": "", "options": "",
"actions": "" "actions": ""
},
"status": {
"success": "",
"error": "",
"loading": "",
"idle": ""
} }
}, },
"create": { "create": {
-6
View File
@@ -1622,12 +1622,6 @@
"refresh": "Refresh", "refresh": "Refresh",
"options": "Options", "options": "Options",
"actions": "Actions" "actions": "Actions"
},
"status": {
"success": "OK",
"error": "Error",
"loading": "Loading",
"idle": "Idle"
} }
}, },
"create": { "create": {
+3859 -4370
View File
File diff suppressed because it is too large. Load diff
+12 -12
View File
@@ -18,7 +18,7 @@ catalog:
"@gitbeaker/rest": ^43.8.0 "@gitbeaker/rest": ^43.8.0
"@homarr/gridstack": ^1.12.0 "@homarr/gridstack": ^1.12.0
"@homarr/node-unifi": ^2.6.0 "@homarr/node-unifi": ^2.6.0
"@immich/sdk": ^3.0.2 "@immich/sdk": ^3.0.1
"@jellyfin/sdk": ^0.13.0 "@jellyfin/sdk": ^0.13.0
"@kubernetes/client-node": ^1.4.0 "@kubernetes/client-node": ^1.4.0
"@modelcontextprotocol/sdk": 1.29.0 "@modelcontextprotocol/sdk": 1.29.0
@@ -93,11 +93,11 @@ catalog:
"@types/video.js": ^7.3.58 "@types/video.js": ^7.3.58
"@types/ws": ^8.18.1 "@types/ws": ^8.18.1
"@types/xml2js": ^0.4.14 "@types/xml2js": ^0.4.14
posthog-js: ^1.399.0 posthog-js: ^1.398.2
posthog-node: ^5.40.0 posthog-node: ^5.39.2
"@vitejs/plugin-react": ^6.0.3 "@vitejs/plugin-react": ^6.0.3
"@vitest/coverage-v8": ^4.1.10 "@vitest/coverage-v8": ^4.1.9
"@vitest/ui": ^4.1.10 "@vitest/ui": ^4.1.9
"@xterm/addon-canvas": ^0.7.0 "@xterm/addon-canvas": ^0.7.0
"@xterm/addon-fit": 0.11.0 "@xterm/addon-fit": 0.11.0
"@xterm/xterm": ^6.0.0 "@xterm/xterm": ^6.0.0
@@ -139,20 +139,20 @@ catalog:
jsonpath-plus: ^10.4.0 jsonpath-plus: ^10.4.0
ldapts: 8.1.8 ldapts: 8.1.8
lodash.clonedeep: ^4.5.0 lodash.clonedeep: ^4.5.0
lucide-react: ^1.24.0 lucide-react: ^1.23.0
"mantine-contextmenu": ^9.3.1 "mantine-contextmenu": ^9.3.1
mantine-datatable: ^9.3.1 mantine-datatable: ^9.3.1
mantine-react-table: npm:mantine-react-table-open@9.0.3 mantine-react-table: npm:mantine-react-table-open@9.0.3
mcp-handler: ^1.1.0 mcp-handler: ^1.1.0
maria2: ^0.4.1 maria2: ^0.4.1
mysql2: 3.22.6 mysql2: 3.22.5
next: 16.2.10 next: 16.2.10
next-auth: 5.0.0-beta.31 next-auth: 5.0.0-beta.31
next-intl: 4.13.1 next-intl: 4.13.1
node-loader: ^2.1.0 node-loader: ^2.1.0
octokit: ^5.0.5 octokit: ^5.0.5
oxfmt: ^0.58.0 oxfmt: ^0.58.0
oxlint: ^1.73.0 oxlint: ^1.72.0
pg: ^8.22.0 pg: ^8.22.0
postcss-preset-mantine: ^1.18.0 postcss-preset-mantine: ^1.18.0
prismjs: ^1.30.0 prismjs: ^1.30.0
@@ -177,13 +177,13 @@ catalog:
tsdav: ^2.3.0 tsdav: ^2.3.0
tsx: 4.20.4 tsx: 4.20.4
turbo: ^2.10.4 turbo: ^2.10.4
typescript: "npm:@typescript/typescript6@^6.0.2" typescript: ^7.0.0
vite: ^8.1.4 vite: ^8.1.2
undici: 7.28.0 undici: 7.28.0
use-deep-compare-effect: ^1.8.1 use-deep-compare-effect: ^1.8.1
video.js: ^8.23.9 video.js: ^8.23.9
vite-tsconfig-paths: ^6.1.1 vite-tsconfig-paths: ^6.1.1
vitest: ^4.1.10 vitest: ^4.1.9
winston: 3.19.0 winston: 3.19.0
ws: ^8.21.0 ws: ^8.21.0
xml2js: ^0.6.2 xml2js: ^0.6.2
@@ -229,7 +229,7 @@ overrides:
"tar-fs@>=3.0.0 <3.0.9": ">=3.1.3" "tar-fs@>=3.0.0 <3.0.9": ">=3.1.3"
"tar-fs@>=2.0.0 <2.1.3": ">=3.1.3" "tar-fs@>=2.0.0 <2.1.3": ">=3.1.3"
"tmp@<=0.2.3": ">=0.2.7" "tmp@<=0.2.3": ">=0.2.7"
"vite@>=5.0.0 <=5.4.18": ">=8.1.4" "vite@>=5.0.0 <=5.4.18": ">=8.1.3"
patchedDependencies: patchedDependencies:
"@types/node-unifi": "patches/@types__node-unifi.patch" "@types/node-unifi": "patches/@types__node-unifi.patch"
"trpc-to-openapi": "patches/trpc-to-openapi.patch" "trpc-to-openapi": "patches/trpc-to-openapi.patch"