Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
- package-ecosystem: "bun" # See documentation for possible values
directory: "/" # Location of package manifests
versioning-strategy: increase
# Group all updates into a single PR
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/fly-staging.yml

This file was deleted.

39 changes: 12 additions & 27 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,47 +9,32 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up PNPM
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'
- name: Set up Bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: pnpm install --ignore-scripts --frozen-lockfile
run: bun install --frozen-lockfile
- name: Build the project
run: pnpm build
run: bun run build
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up PNPM
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'
- name: Set up Bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: pnpm install --frozen-lockfile # We can't use --ignore-scripts here
run: bun install --frozen-lockfile
- name: Run tests
run: pnpm test:ci
run: bun run test:ci
type-check:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up PNPM
uses: pnpm/action-setup@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'
- name: Set up Bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: pnpm install --ignore-scripts --frozen-lockfile
run: bun install --frozen-lockfile
- name: Type check
run: pnpm nuxt typecheck
run: bun run nuxt typecheck
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

13 changes: 5 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
FROM node:22-alpine AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
FROM oven/bun:1-alpine AS base
COPY . /app
WORKDIR /app

FROM base AS prod-deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile --ignore-scripts
RUN --mount=type=cache,id=bun,target=/root/.bun bun install --production --frozen-lockfile --ignore-scripts

FROM base AS build
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --ignore-scripts
RUN pnpm run build
RUN --mount=type=cache,id=bun,target=/root/.bun bun install --frozen-lockfile --ignore-scripts
RUN bun run build --preset=bun

FROM base
COPY --from=prod-deps /app/node_modules /app/node_modules
COPY --from=build /app/.output /app/.output

EXPOSE 3000
CMD [ "node", ".output/server/index.mjs" ]
CMD [ "bun", ".output/server/index.mjs" ]
2 changes: 1 addition & 1 deletion app/composables/useBoardFilters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const boardFiltersSchema = z.object({
assignees: z
.string()
.transform((str) => (str === "" ? [] : str.split(",")))
.pipe(z.array(z.string().uuid()))
.pipe(z.array(z.uuid()))
.optional(),
});

Expand Down
2 changes: 1 addition & 1 deletion app/composables/useCollapsedColumns.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { z } from "zod";

const schema = z.array(z.string().uuid());
const schema = z.array(z.uuid());

type CollapsedColumns = z.infer<typeof schema>;

Expand Down
28 changes: 14 additions & 14 deletions app/lib/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const updateWorkspaceSchema = z.object({

export const createBoardSchema = z.object({
name: z.string().min(5).max(255),
workspaceId: z.string().uuid(),
workspaceId: z.uuid(),
});

export const updateBoardSchema = z.object({
Expand All @@ -19,7 +19,7 @@ export const updateBoardSchema = z.object({

export const createStatusColumnSchema = z.object({
name: z.string().min(5).max(255),
workspaceId: z.string().uuid(),
workspaceId: z.uuid(),
});

export const updateStatusColumnSchema = createStatusColumnSchema
Expand All @@ -46,7 +46,7 @@ export const updateTaskSchema = z
.string()
.nullable()
.transform((v) => (v?.trim() === "" ? null : v)),
statusColumnId: z.string().uuid(),
statusColumnId: z.uuid(),
order: z.number().int(),
})
.partial();
Expand All @@ -57,46 +57,46 @@ export const searchUsersSchema = z.object({
});

export const publicUserSchema = z.object({
id: z.string().uuid(),
id: z.uuid(),
fullName: z.string(),
email: z.string().email().optional(),
profilePictureUrl: z.string().url().optional(),
});

export const createInvitationSchema = z
.object({
boardId: z.string().uuid(),
boardId: z.uuid(),
})
.or(z.object({ workspaceId: z.string().uuid() }));
.or(z.object({ workspaceId: z.uuid() }));

export const deactivateInvitationSchema = z
.object({
invitationId: z.string().uuid(),
boardId: z.string().uuid(),
invitationId: z.uuid(),
boardId: z.uuid(),
})
.or(
z.object({
invitationId: z.string().uuid(),
workspaceId: z.string().uuid(),
invitationId: z.uuid(),
workspaceId: z.uuid(),
}),
);

export const addAssigneeSchema = z.object({
userId: z.string().uuid(),
userId: z.uuid(),
});

export const createBoardLabelSchema = z.object({
name: z.string().min(3).max(255),
color: z.string(),
boardId: z.string().uuid(),
boardId: z.uuid(),
});

export const updateBoardLabelSchema = createBoardLabelSchema
.omit({ boardId: true })
.partial();

export const addTaskLabelSchema = z.object({
labelId: z.string().uuid(),
labelId: z.uuid(),
});

export const uploadAttachmentSchema = z.object({
Expand Down Expand Up @@ -135,4 +135,4 @@ export type UpdateBoardLabelInput = z.infer<typeof updateBoardLabelSchema>;
export type AddTaskLabelInput = z.infer<typeof addTaskLabelSchema>;

export const validateId = <T extends string>(id: T) =>
z.object({ [id]: z.string().uuid() });
z.object({ [id]: z.uuid() });
Loading
Loading