books: import zod as a namespace so tests pass under the Bun runtime in CI
Some checks failed
Deploy production / deploy (push) Failing after 2m20s
Some checks failed
Deploy production / deploy (push) Failing after 2m20s
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'`.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
// Validation and maths for the reader's progress API (pure, unit tested).
|
// 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({
|
export const progressPayload = z.object({
|
||||||
fileId: z.number().int().positive().nullish(),
|
fileId: z.number().int().positive().nullish(),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// Highlights and notes (books.notes). A row with `highlight` is a highlight from the reader
|
// 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.
|
// (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 { and, eq } from 'drizzle-orm';
|
||||||
import { db } from '#lib/server/db/index.js';
|
import { db } from '#lib/server/db/index.js';
|
||||||
import { bookFiles, bookNotes, bookWorks } from '#lib/server/db/schema/index.js';
|
import { bookFiles, bookNotes, bookWorks } from '#lib/server/db/schema/index.js';
|
||||||
|
|||||||
Reference in New Issue
Block a user