Enable npm workspaces and update dependencies

This commit is contained in:
Gregor Vostrak
2026-02-02 03:19:22 +01:00
parent 72662727c5
commit 1597b5490a
31 changed files with 2502 additions and 7953 deletions

View File

@@ -264,17 +264,17 @@ function prefetchProjectMembers(queryClient: QueryClient, projectId: string) {
*/
function findPrefetcher(url: string): ((queryClient: QueryClient) => void) | undefined {
// Extract pathname from URL
const pathname = url.startsWith('http') ? new URL(url).pathname : url.split('?')[0];
const pathname = url.startsWith('http') ? new URL(url).pathname : url.split('?')[0]!;
// Try exact match first
if (routePrefetchers[pathname]) {
if (pathname && routePrefetchers[pathname]) {
return routePrefetchers[pathname];
}
// Try pattern matching for dynamic routes like /projects/{id}
const projectMatch = pathname.match(/^\/projects\/([^/]+)$/);
const projectMatch = pathname?.match(/^\/projects\/([^/]+)$/);
if (projectMatch) {
const projectId = projectMatch[1];
const projectId = projectMatch[1]!;
return (queryClient) => {
prefetchProjects(queryClient);
prefetchTasks(queryClient);

View File

@@ -349,8 +349,8 @@ export function useCommandPalette() {
if (cmd.permission && !cmd.permission()) continue;
if (cmd.condition && !cmd.condition()) continue;
if (grouped[cmd.group]) {
grouped[cmd.group].push(cmd);
if (grouped[cmd.group] !== undefined) {
grouped[cmd.group]!.push(cmd);
}
}

View File

@@ -41,7 +41,7 @@ export function useTimeEntriesInfiniteQuery() {
if (!lastPage?.data || lastPage.data.length === 0) {
return undefined;
}
const latestTimeEntry = lastPage.data[lastPage.data.length - 1];
const latestTimeEntry = lastPage.data[lastPage.data.length - 1]!;
return dayjs(latestTimeEntry.start).utc().format();
},
enabled: computed(() => !!organizationId.value),