Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

chore(deps-dev): bump typescript from 5.5.4 to 5.8.3 in /packages/libs (#170)

dependabot[bot]80a771cd667b
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c91e59ac7..dbef27e2b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -2,7 +2,6 @@ name: Code quality
on:
push:
- pull_request:
jobs:
quality:
diff --git a/apps/api/src/project/controllers/get-project.ts b/apps/api/src/project/controllers/get-project.ts
index 4bba70b50..ef92aa578 100644
--- a/apps/api/src/project/controllers/get-project.ts
+++ b/apps/api/src/project/controllers/get-project.ts
@@ -1,4 +1,5 @@
import { and, eq } from "drizzle-orm";
+import { HTTPException } from "hono/http-exception";
import db from "../../database";
import { projectTable, workspaceTable } from "../../database/schema";
@@ -18,6 +19,12 @@ async function getProject(id: string, workspaceId: string) {
and(eq(projectTable.id, id), eq(projectTable.workspaceId, workspaceId)),
);
+ if (!project) {
+ throw new HTTPException(404, {
+ message: "Project not found",
+ });
+ }
+
return project;
}
diff --git a/apps/api/src/time-entry/controllers/update-time-entry.ts b/apps/api/src/time-entry/controllers/update-time-entry.ts
index 946957bb1..932f69d97 100644
--- a/apps/api/src/time-entry/controllers/update-time-entry.ts
+++ b/apps/api/src/time-entry/controllers/update-time-entry.ts
@@ -7,7 +7,6 @@ async function updateTimeEntry(
timeEntryId: string,
endTime: Date,
duration: number,
- userEmail: string,
) {
const [existingTimeEntry] = await db
.select()
diff --git a/apps/api/src/workspace-user/controllers/get-workspace-user.ts b/apps/api/src/workspace-user/controllers/get-workspace-user.ts
new file mode 100644
index 000000000..9c1db877b
--- /dev/null
+++ b/apps/api/src/workspace-user/controllers/get-workspace-user.ts
@@ -0,0 +1,20 @@
+import { eq } from "drizzle-orm";
+import { HTTPException } from "hono/http-exception";
+import db from "../../database";
+import { workspaceUserTable } from "../../database/schema";
+
+async function getWorkspaceUser(id: string) {
+ const workspaceUser = await db.query.workspaceUserTable.findFirst({
+ where: eq(workspaceUserTable.id, id),
+ });
+
+ if (!workspaceUser) {
+ throw new HTTPException(404, {
+ message: "Workspace user not found",
+ });
+ }
+
+ return workspaceUser;
+}
+
+export default getWorkspaceUser;
diff --git a/apps/api/src/workspace-user/controllers/invite-workspace-user.ts b/apps/api/src/workspace-user/controllers/invite-workspace-user.ts
index 85953244c..abfc76d3d 100644
--- a/apps/api/src/workspace-user/controllers/invite-workspace-user.ts
+++ b/apps/api/src/workspace-user/controllers/invite-workspace-user.ts
@@ -1,11 +1,7 @@
import { and, eq } from "drizzle-orm";
import { HTTPException } from "hono/http-exception";
import db from "../../database";
-import {
- userTable,
- workspaceTable,
- workspaceUserTable,
-} from "../../database/schema";
+import { workspaceTable, workspaceUserTable } from "../../database/schema";
async function inviteWorkspaceUser(workspaceId: string, userEmail: string) {
const [workspace] = await db
diff --git a/apps/api/src/workspace-user/index.ts b/apps/api/src/workspace-user/index.ts
index 87d9ef141..059e35c9d 100644
--- a/apps/api/src/workspace-user/index.ts
+++ b/apps/api/src/workspace-user/index.ts
@@ -5,6 +5,7 @@ import { subscribeToEvent } from "../events";
import createRootWorkspaceUser from "./controllers/create-root-workspace-user";
import deleteWorkspaceUser from "./controllers/delete-workspace-user";
import getActiveWorkspaceUsers from "./controllers/get-active-workspace-users";
+import getWorkspaceUser from "./controllers/get-workspace-user";
import getWorkspaceUsers from "./controllers/get-workspace-users";
import inviteWorkspaceUser from "./controllers/invite-workspace-user";
import updateWorkspaceUser from "./controllers/update-workspace-user";
@@ -14,6 +15,13 @@ const workspaceUser = new Hono<{
userEmail: string;
};
}>()
+ .get("/:id", zValidator("param", z.object({ id: z.string() })), async (c) => {
+ const { id } = c.req.valid("param");
+
+ const workspaceUser = await getWorkspaceUser(id);
+
+ return c.json(workspaceUser);
+ })
.post(
"/root",
zValidator(
diff --git a/apps/web/package.json b/apps/web/package.json
index e401545dc..ca622d17a 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite",
- "build": "vite build",
+ "build": "tsc -b && vite build",
"preview": "vite preview"
},
"dependencies": {
@@ -69,4 +69,4 @@
"typescript": "~5.8.2",
"vite": "^6.2.6"
}
-}
+}
\ No newline at end of file
diff --git a/apps/web/src/components/common/logo.tsx b/apps/web/src/components/common/logo.tsx
index 2a47f419a..88dd132b0 100644
--- a/apps/web/src/components/common/logo.tsx
+++ b/apps/web/src/components/common/logo.tsx
@@ -14,8 +14,8 @@ export function Logo({ className = "" }: LogoProps) {
return (
<Link
onClick={() => {
- setWorkspace(null);
- setProject(null);
+ setWorkspace(undefined);
+ setProject(undefined);
}}
to="/dashboard"
className={`flex items-center gap-2 ${className}`}
diff --git a/apps/web/src/components/team/members-table.tsx b/apps/web/src/components/team/members-table.tsx
index dc942e9e3..67bcce33f 100644
--- a/apps/web/src/components/team/members-table.tsx
+++ b/apps/web/src/components/team/members-table.tsx
@@ -48,7 +48,7 @@ function MembersTable({ users }: { users: WorkspaceUser[] }) {
<div className="flex items-center">
<Avatar className="h-8 w-8 mr-3">
<AvatarFallback className="bg-indigo-100 dark:bg-indigo-900/50 text-indigo-600 dark:text-indigo-400">
- {member.userEmail.charAt(0)}
+ {member.userEmail?.charAt(0)}
</AvatarFallback>
</Avatar>
<span className="text-sm text-zinc-900 dark:text-zinc-100">
@@ -125,7 +125,7 @@ function MembersTable({ users }: { users: WorkspaceUser[] }) {
{selectedMember && (
<DeleteTeamMemberModal
- userEmail={selectedMember.userEmail}
+ userEmail={selectedMember.userEmail ?? ""}
open={isRemoveMemberModalOpen}
onClose={() => {
setIsRemoveMemberModalOpen(false);
diff --git a/apps/web/src/fetchers/project/update-project.ts b/apps/web/src/fetchers/project/update-project.ts
index 1d6c33b93..c26a33059 100644
--- a/apps/web/src/fetchers/project/update-project.ts
+++ b/apps/web/src/fetchers/project/update-project.ts
@@ -6,10 +6,16 @@ export type UpdateProjectRequest = InferRequestType<
>["json"] &
InferRequestType<(typeof client)["project"][":id"]["$put"]>["param"];
-async function updateProject({ id, name, icon, slug }: UpdateProjectRequest) {
+async function updateProject({
+ id,
+ name,
+ icon,
+ slug,
+ description,
+}: UpdateProjectRequest) {
const response = await client.project[":id"].$put({
param: { id },
- json: { name, icon, slug },
+ json: { name, icon, slug, description },
});
const data = await response.json();
diff --git a/apps/web/src/fetchers/workspace-user/get-workspace-users.ts b/apps/web/src/fetchers/workspace-user/get-workspace-users.ts
index 76861691e..17b91b701 100644
--- a/apps/web/src/fetchers/workspace-user/get-workspace-users.ts
+++ b/apps/web/src/fetchers/workspace-user/get-workspace-users.ts
@@ -5,9 +5,9 @@ export type GetWorkspaceUsersRequest = InferRequestType<
(typeof client)["workspace-user"][":workspaceId"]["$get"]
>;
-async function getWorkspaceUsers({ workspaceId }: GetWorkspaceUsersRequest) {
+async function getWorkspaceUsers({ param }: GetWorkspaceUsersRequest) {
const response = await client["workspace-user"][":workspaceId"].$get({
- param: { workspaceId },
+ param,
});
const data = await response.json();
diff --git a/apps/web/src/hooks/queries/workspace-users/use-get-workspace-users.ts b/apps/web/src/hooks/queries/workspace-users/use-get-workspace-users.ts
index ecd5c8d52..a4a6a84db 100644
--- a/apps/web/src/hooks/queries/workspace-users/use-get-workspace-users.ts
+++ b/apps/web/src/hooks/queries/workspace-users/use-get-workspace-users.ts
@@ -4,7 +4,7 @@ import { useQuery } from "@tanstack/react-query";
function useGetWorkspaceUsers({ workspaceId }: { workspaceId: string }) {
return useQuery({
queryKey: ["workspace-users", workspaceId],
- queryFn: () => getActiveWorkspaceUsers({ workspaceId }),
+ queryFn: () => getActiveWorkspaceUsers({ param: { workspaceId } }),
});
}
diff --git a/apps/web/src/routes/dashboard/workspace-settings/$workspaceId/index.tsx b/apps/web/src/routes/dashboard/workspace-settings/$workspaceId/index.tsx
index 2ce68323f..67408860e 100644
--- a/apps/web/src/routes/dashboard/workspace-settings/$workspaceId/index.tsx
+++ b/apps/web/src/routes/dashboard/workspace-settings/$workspaceId/index.tsx
@@ -1,5 +1,4 @@
import PageTitle from "@/components/page-title";
-import useAuth from "@/components/providers/auth-provider/hooks/use-auth";
import { Button } from "@/components/ui/button";
import {
Form,
@@ -37,7 +36,6 @@ export const Route = createFileRoute(
});
function RouteComponent() {
- const { user } = useAuth();
const navigate = useNavigate();
const { workspaceId } = Route.useParams();
const [confirmWorkSpaceName, setConfirmWorkSpaceName] = useState("");
@@ -61,8 +59,7 @@ function RouteComponent() {
const onSubmit = async (data: WorkspaceFormValues) => {
try {
await updateWorkspace({
- workspaceId: workspaceId ?? "",
- userEmail: workspace?.ownerEmail ?? "",
+ id: workspaceId ?? "",
name: data.name,
description: data.description ?? "",
});
diff --git a/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/settings.tsx b/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/settings.tsx
index cff9577be..d4d6c436e 100644
--- a/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/settings.tsx
+++ b/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/settings.tsx
@@ -64,6 +64,7 @@ function ProjectSettings() {
name: data.name,
icon: data.icon,
slug: data.slug,
+ description: project?.description ?? "",
});
queryClient.invalidateQueries({
diff --git a/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/task/$taskId.tsx b/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/task/$taskId.tsx
index 0bff91e0e..4a77ec24e 100644
--- a/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/task/$taskId.tsx
+++ b/apps/web/src/routes/dashboard/workspace/$workspaceId/project/$projectId/task/$taskId.tsx
@@ -5,7 +5,6 @@ import TaskDescription from "@/components/task/task-description";
import TaskInfo from "@/components/task/task-info";
import TaskTimeTracking from "@/components/task/task-time-tracking";
import TaskTitle from "@/components/task/task-title";
-import useGetProject from "@/hooks/queries/project/use-get-project";
import useGetTask from "@/hooks/queries/task/use-get-task";
import useGetTasks from "@/hooks/queries/task/use-get-tasks";
import useProjectStore from "@/store/project";
diff --git a/apps/web/src/types/project/index.ts b/apps/web/src/types/project/index.ts
index 8f064c59e..b6e0a25f1 100644
--- a/apps/web/src/types/project/index.ts
+++ b/apps/web/src/types/project/index.ts
@@ -1,10 +1,15 @@
import type { client } from "@kaneo/libs";
import type { InferResponseType } from "hono/client";
-export type Project = InferResponseType<
- (typeof client)["project"][":id"]["$get"]
+export type Project = Extract<
+ InferResponseType<(typeof client)["project"][":id"]["$get"], 200>,
+ { id: string }
>;
-export type ProjectWithTasks = InferResponseType<
- (typeof client)["task"]["tasks"][":projectId"]["$get"]
+export type ProjectWithTasks = Extract<
+ InferResponseType<
+ (typeof client)["task"]["tasks"][":projectId"]["$get"],
+ 200
+ >,
+ { id: string }
>;
diff --git a/apps/web/src/types/task/index.ts b/apps/web/src/types/task/index.ts
index b426e73be..c15e4992d 100644
--- a/apps/web/src/types/task/index.ts
+++ b/apps/web/src/types/task/index.ts
@@ -1,6 +1,9 @@
import type { client } from "@kaneo/libs";
import type { InferResponseType } from "hono/client";
-type Task = InferResponseType<(typeof client)["task"][":id"]["$get"]>;
+type Task = Extract<
+ InferResponseType<(typeof client)["task"][":id"]["$get"]>,
+ { id: string }
+>;
export default Task;
diff --git a/apps/web/src/types/user.ts b/apps/web/src/types/user.ts
index 2e3c4d6c4..33ec5022b 100644
--- a/apps/web/src/types/user.ts
+++ b/apps/web/src/types/user.ts
@@ -1,7 +1,10 @@
import type { client } from "@kaneo/libs";
import type { InferResponseType } from "hono";
-export type User = InferResponseType<typeof client.me.$get>;
+export type User = Extract<
+ InferResponseType<typeof client.me.$get>,
+ { user: { id: string } }
+>["user"];
export type LoggedInUser = {
name: string;
diff --git a/apps/web/src/types/workspace-user/index.ts b/apps/web/src/types/workspace-user/index.ts
index f58c0d22c..1efe6badb 100644
--- a/apps/web/src/types/workspace-user/index.ts
+++ b/apps/web/src/types/workspace-user/index.ts
@@ -1,8 +1,9 @@
-import type { client } from "@kaneo/libs";
-import type { InferResponseType } from "hono/client";
-
-export type WorkspaceUser = NonNullable<
- InferResponseType<(typeof client)["workspace-user"]["$get"]>
->[number];
+export type WorkspaceUser = {
+ userEmail: string | null;
+ userName: string | null;
+ joinedAt: string;
+ status: string;
+ role: string;
+};
export default WorkspaceUser;
diff --git a/apps/web/src/types/workspace/index.ts b/apps/web/src/types/workspace/index.ts
index 0061b2957..bb9c317b6 100644
--- a/apps/web/src/types/workspace/index.ts
+++ b/apps/web/src/types/workspace/index.ts
@@ -1,8 +1,9 @@
import type { client } from "@kaneo/libs";
import type { InferResponseType } from "hono/client";
-export type Workspace = InferResponseType<
- (typeof client)["workspace"][":id"]["$get"]
+export type Workspace = Extract<
+ InferResponseType<(typeof client)["workspace"][":id"]["$get"]>,
+ { id: string }
>;
export default Workspace;
diff --git a/package.json b/package.json
index 13cea72fe..0aeb5e69a 100644
--- a/package.json
+++ b/package.json
@@ -13,7 +13,7 @@
"@commitlint/config-conventional": "^19.6.0",
"husky": "^9.1.7",
"turbo": "^2.4.2",
- "typescript": "5.5.4"
+ "typescript": "5.7.2"
},
"engines": {
"node": ">=18"
diff --git a/packages/libs/package.json b/packages/libs/package.json
index 480e90a44..0abe0167d 100644
--- a/packages/libs/package.json
+++ b/packages/libs/package.json
@@ -14,6 +14,6 @@
"hono": "^4.7.7",
"react": "^19.0.0",
"@kaneo/typescript-config": "workspace:*",
- "typescript": "^5.5.4"
+ "typescript": "^5.8.3"
}
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 921a84bdc..1f87f4696 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -13,7 +13,7 @@ importers:
version: 1.9.4
'@commitlint/cli':
specifier: ^19.6.1
- version: 19.8.0(@types/[email protected])([email protected])
+ version: 19.8.0(@types/[email protected])([email protected])
'@commitlint/config-conventional':
specifier: ^19.6.0
version: 19.8.0
@@ -24,8 +24,8 @@ importers:
specifier: ^2.4.2
version: 2.4.4
typescript:
- specifier: 5.5.4
- version: 5.5.4
+ specifier: 5.7.2
+ version: 5.7.2
apps/api:
dependencies:
@@ -183,7 +183,7 @@ importers:
'@radix-ui/react-tooltip':
specifier: ^1.2.3
'@tanstack/react-query':
specifier: ^5.64.2
version: 5.70.0([email protected])
@@ -336,7 +336,7 @@ importers:
specifier: ^19.0.0
version: 19.1.0
typescript:
- specifier: ^5.5.4
+ specifier: ^5.8.3
version: 5.8.3
packages/typescript-config: {}
@@ -1600,6 +1600,19 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-ueDqRbdc4/bkaQT3GIpLQssRlFgWaL/U2z/S31qRwwLWoxHLgry3SIfCwhxeQNbirEUXFa+lq3RL3oBYXtcmIA==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-Ec/0d38EIuvDF+GZjcMU/Ze6MxntVJYO/fRlCPhCaVUyPY9WTalHJw54tp9sXeJo3tlShWpy41vQRgLRGOuz+w==}
peerDependencies:
@@ -1722,8 +1735,8 @@ packages:
'@types/react-dom':
optional: true
- '@radix-ui/[email protected]':
- resolution: {integrity: sha512-0KX7jUYFA02np01Y11NWkk6Ip6TqMNmD4ijLelYAzeIndl2aVeltjJFJ2gwjNa1P8U/dgjQ+8cr9Y3Ni+ZNoRA==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-DyW8VVeeMSSLFvAmnVnCwvI3H+1tpJFHT50r+tdOoMse9XqYDBCcyux8u3G2y+LOpt7fPQ6KKH0mhs+ce1+Z5w==}
peerDependencies:
'@types/react': '*'
'@types/react-dom': '*'
@@ -4432,8 +4445,8 @@ packages:
resolution: {integrity: sha512-N9FDOVaY3yz0YCOhYIgOGYad7+m2ptvinXygw27WPLQvcZDl3+0Sa77KGVlLSiuPDChOUEnTKE9VJwLSi9BPGQ==}
hasBin: true
- resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==}
+ resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==}
engines: {node: '>=14.17'}
hasBin: true
@@ -4805,11 +4818,11 @@ snapshots:
'@biomejs/[email protected]':
optional: true
dependencies:
'@commitlint/format': 19.8.0
'@commitlint/lint': 19.8.0
- '@commitlint/load': 19.8.0(@types/[email protected])([email protected])
+ '@commitlint/load': 19.8.0(@types/[email protected])([email protected])
'@commitlint/read': 19.8.0
'@commitlint/types': 19.8.0
tinyexec: 0.3.2
@@ -4856,15 +4869,15 @@ snapshots:
'@commitlint/rules': 19.8.0
'@commitlint/types': 19.8.0
dependencies:
'@commitlint/config-validator': 19.8.0
'@commitlint/execute-rule': 19.8.0
'@commitlint/resolve-extends': 19.8.0
'@commitlint/types': 19.8.0
chalk: 5.4.1
- cosmiconfig: 9.0.0([email protected])
- cosmiconfig-typescript-loader: 6.1.0(@types/[email protected])([email protected]([email protected]))([email protected])
+ cosmiconfig: 9.0.0([email protected])
+ cosmiconfig-typescript-loader: 6.1.0(@types/[email protected])([email protected]([email protected]))([email protected])
lodash.isplainobject: 4.0.6
lodash.merge: 4.6.2
lodash.uniq: 4.5.0
@@ -5881,16 +5894,6 @@ snapshots:
'@types/react': 19.0.12
'@types/react-dom': 19.0.4(@types/[email protected])
- dependencies:
- '@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])
- '@radix-ui/react-use-layout-effect': 1.1.1(@types/[email protected])([email protected])
- react: 19.1.0
- react-dom: 19.1.0([email protected])
- optionalDependencies:
- '@types/react': 19.0.12
- '@types/react-dom': 19.0.4(@types/[email protected])
-
dependencies:
'@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])
@@ -5901,6 +5904,16 @@ snapshots:
'@types/react': 19.1.2
'@types/react-dom': 19.1.2(@types/[email protected])
+ dependencies:
+ '@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])
+ '@radix-ui/react-use-layout-effect': 1.1.1(@types/[email protected])([email protected])
+ react: 19.1.0
+ react-dom: 19.1.0([email protected])
+ optionalDependencies:
+ '@types/react': 19.0.12
+ '@types/react-dom': 19.0.4(@types/[email protected])
+
dependencies:
'@radix-ui/react-slot': 1.1.2(@types/[email protected])([email protected])
@@ -6060,7 +6073,7 @@ snapshots:
'@types/react': 19.1.2
'@types/react-dom': 19.1.2(@types/[email protected])
dependencies:
'@radix-ui/primitive': 1.1.2
'@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])
@@ -6069,7 +6082,7 @@ snapshots:
'@radix-ui/react-id': 1.1.1(@types/[email protected])([email protected])
'@radix-ui/react-slot': 1.2.0(@types/[email protected])([email protected])
'@radix-ui/react-use-controllable-state': 1.2.2(@types/[email protected])([email protected])
@@ -7184,21 +7197,21 @@ snapshots:
dependencies:
'@types/node': 22.14.1
- cosmiconfig: 9.0.0([email protected])
+ cosmiconfig: 9.0.0([email protected])
jiti: 2.4.2
- typescript: 5.5.4
+ typescript: 5.7.2
dependencies:
env-paths: 2.2.1
import-fresh: 3.3.1
js-yaml: 4.1.0
parse-json: 5.2.0
optionalDependencies:
- typescript: 5.5.4
+ typescript: 5.7.2
@@ -9136,7 +9149,7 @@ snapshots:
turbo-windows-64: 2.4.4
turbo-windows-arm64: 2.4.4