refactor: migrate monorepo from pnpm to Bun runtime and workspaces

- root: bun workspaces via package.json, packageManager bun@1.4.0, scripts use bun --filter
- backend: Bun.serve, bun test (vitest removed), bun --watch dev script, tsconfig types bun
- tests: migrate 6 test files from vitest to bun:test (mock.module)
- validate: replace @hono/zod-validator with hono validator + zod safeParse (fixes TS2589)
- lockfile: bunfig.toml saveTextLockfile, regenerated bun.lock (text) for turbo
- docs: AGENTS.md, README.md, stack.md updated to Bun stack
This commit is contained in:
Jose Selesan
2026-09-14 10:58:56 -03:00
parent 4b1f356fab
commit 6246bf2341
21 changed files with 1125 additions and 4936 deletions

View File

@@ -1,14 +1,14 @@
import { beforeEach, describe, expect, it, mock, vi } from 'bun:test';
import { Hono } from 'hono';
import { beforeEach, describe, expect, it, vi } from 'vitest';
vi.mock('@/lib/prisma', () => ({
mock.module('@/lib/prisma', () => ({
default: {
waitlistEntry: {
findMany: vi.fn(),
count: vi.fn(),
findMany: mock(),
count: mock(),
},
},
getPrismaClient: vi.fn(),
getPrismaClient: mock(),
UnitOfWork: class {},
}));
@@ -33,8 +33,8 @@ describe('waitlist routes', () => {
});
it('lists waitlist entries with pagination', async () => {
vi.mocked(prisma.waitlistEntry.findMany).mockResolvedValue([entry]);
vi.mocked(prisma.waitlistEntry.count).mockResolvedValue(1);
prisma.waitlistEntry.findMany.mockResolvedValue([entry]);
prisma.waitlistEntry.count.mockResolvedValue(1);
const res = await app.request('/waitlist');