From 1d4cfd58c51a4b15f21529a50cd83974fe706e87 Mon Sep 17 00:00:00 2001 From: Stan Runge Date: Sat, 24 Oct 2026 01:47:10 +0000 Subject: [PATCH] books: import zod as a namespace so tests pass under the Bun runtime in CI The Docker build runs vitest via bun (no Node in oven/bun), where the named `{ z }` import from zod 4 resolved to undefined; the rest of the repo already uses `import * as z from 'zod'`. --- src/lib/books/progress.ts | 2 +- src/lib/server/books/notes.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/books/progress.ts b/src/lib/books/progress.ts index 220e5f8..e02127c 100644 --- a/src/lib/books/progress.ts +++ b/src/lib/books/progress.ts @@ -1,5 +1,5 @@ // Validation and maths for the reader's progress API (pure, unit tested). -import { z } from 'zod'; +import * as z from 'zod'; export const progressPayload = z.object({ fileId: z.number().int().positive().nullish(), diff --git a/src/lib/server/books/notes.ts b/src/lib/server/books/notes.ts index 40e293c..53219db 100644 --- a/src/lib/server/books/notes.ts +++ b/src/lib/server/books/notes.ts @@ -1,6 +1,6 @@ // Highlights and notes (books.notes). A row with `highlight` is a highlight from the reader // (optionally with a note); a row with only `note` is a free-form note on the book. -import { z } from 'zod'; +import * as z from 'zod'; import { and, eq } from 'drizzle-orm'; import { db } from '#lib/server/db/index.js'; import { bookFiles, bookNotes, bookWorks } from '#lib/server/db/schema/index.js';