fix: resolve type errors from dev merge

- Fix URL/RequestInfo/RequestInit type conflicts with Node 24.18
- Fix optional repository.id type mismatch in releases router
This commit is contained in:
Thomas Camlong committed 2026-07-02 18:28:28 +02:00
1 parent 356fadb9d6
commit 5ea902d260
3 files changed
+7 -6

No files matched your search

+3 -2
View File
@@ -78,10 +78,11 @@ export const releasesRouter = createTRPCRouter({
return await Promise.all(
input.repositories.map(async (repository) => {
try {
const useToken = allowedRepoIds === null || allowedRepoIds.has(repository.id);
const repoId = repository.id ?? repository.identifier;
const useToken = allowedRepoIds === null || allowedRepoIds.has(repoId);
const response = await releasesRequestHandler
.handler({
id: repository.id,
id: repoId,
provider: repository.provider,
identifier: repository.identifier,
versionRegex: formatVersionFilterRegex(repository.versionFilter),
@@ -9,8 +9,8 @@ import { createLogger } from "@homarr/core/infrastructure/logs";
const logger = createLogger({ module: "releaseProviders" });
const PROVIDER_TIMEOUT_MS = 10_000;
const fetchProvider = (url: URL | RequestInfo, options?: RequestInit & { timeout?: number }) =>
fetchWithTrustedCertificatesAsync(url, { timeout: PROVIDER_TIMEOUT_MS, ...options });
const fetchProvider = (url: string, options?: RequestInit & { timeout?: number }) =>
fetchWithTrustedCertificatesAsync(url, { timeout: PROVIDER_TIMEOUT_MS, ...options } as Parameters<typeof fetchWithTrustedCertificatesAsync>[1]);
export interface ReleasesRepositoryRequest extends Record<string, unknown> {
id: string;
@@ -127,7 +127,7 @@ const parseOwnerPackageName = (identifier: string) => {
const removeTrailingSlash = (url: string) => url.replace(/\/$/, "");
const buildUrl = (baseUrl: string, path: `/${string}`) => new URL(`${baseUrl}${path}`);
const buildUrl = (baseUrl: string, path: `/${string}`) => new URL(`${baseUrl}${path}`).toString();
const getGithubApi = (baseUrl: string, userAgent: string, token?: string) =>
new Octokit({
+1 -1
View File
@@ -51,7 +51,7 @@ const buildUrl = (baseUrl: string, path: `/${string}`, queryParams: Record<strin
for (const [key, value] of Object.entries(queryParams)) {
url.searchParams.set(key, value.toString());
}
return url;
return url.toString();
};
const searchStationsAsync = async (baseUrl: string, query: string): Promise<Station[]> => {