From 66b4efba094856d0dd8db570250608c7b620d31a Mon Sep 17 00:00:00 2001 From: wass08 Date: Fri, 20 Feb 2026 19:45:15 +0900 Subject: [PATCH] fix build --- .../features/community/lib/auth/actions.ts | 3 +-- apps/editor/package.json | 1 + bun.lock | 8 +++++- package.json | 5 +++- packages/db/src/index.ts | 25 +++++++++++++++++++ 5 files changed, 38 insertions(+), 4 deletions(-) diff --git a/apps/editor/features/community/lib/auth/actions.ts b/apps/editor/features/community/lib/auth/actions.ts index 756b4b13..0e306d6e 100644 --- a/apps/editor/features/community/lib/auth/actions.ts +++ b/apps/editor/features/community/lib/auth/actions.ts @@ -2,8 +2,7 @@ import { revalidatePath } from 'next/cache' import { redirect } from 'next/navigation' -import { db, schema } from '@pascal-app/db' -import { eq, and, ne, sql } from 'drizzle-orm' +import { and, db, eq, ne, schema, sql } from '@pascal-app/db' import { auth } from '@/lib/auth' import { getSession } from './server' import { createServerSupabaseClient } from '../database/server' diff --git a/apps/editor/package.json b/apps/editor/package.json index b99df7db..c37b28a7 100644 --- a/apps/editor/package.json +++ b/apps/editor/package.json @@ -14,6 +14,7 @@ "@pascal-app/auth": "*", "@pascal-app/core": "*", "@pascal-app/db": "*", + "drizzle-orm": "0.39.3", "@pascal-app/viewer": "*", "@radix-ui/react-alert-dialog": "^1.1.15", "@radix-ui/react-context-menu": "^2.2.16", diff --git a/bun.lock b/bun.lock index 03c89f47..f6880f10 100644 --- a/bun.lock +++ b/bun.lock @@ -53,6 +53,7 @@ "better-auth": "^1.4.18", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", + "drizzle-orm": "0.39.3", "howler": "^2.2.4", "lucide-react": "^0.562.0", "motion": "^12.26.2", @@ -120,7 +121,6 @@ "version": "0.0.0", "dependencies": { "@supabase/supabase-js": "^2.95.3", - "drizzle-orm": "^0.39.0", "drizzle-zod": "^0.5.1", "nanoid": "^5.0.9", "postgres": "^3.4.5", @@ -130,6 +130,9 @@ "drizzle-kit": "^0.30.0", "typescript": "5.9.2", }, + "peerDependencies": { + "drizzle-orm": ">=0.39.0", + }, }, "packages/eslint-config": { "name": "@repo/eslint-config", @@ -190,6 +193,9 @@ }, }, }, + "overrides": { + "drizzle-orm": "0.39.3", + }, "packages": { "@alloc/quick-lru": ["@alloc/quick-lru@5.2.0", "", {}, "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw=="], diff --git a/package.json b/package.json index 386ef6dc..a8aa5595 100644 --- a/package.json +++ b/package.json @@ -48,5 +48,8 @@ "workspaces": [ "apps/*", "packages/*" - ] + ], + "overrides": { + "drizzle-orm": "0.39.3" + } } diff --git a/packages/db/src/index.ts b/packages/db/src/index.ts index d3123e43..8cde72c4 100644 --- a/packages/db/src/index.ts +++ b/packages/db/src/index.ts @@ -10,6 +10,31 @@ export type { Database as SupabaseDatabase } from './types' export { type Database, db } from './drizzle' export * from './schema' +// Re-export drizzle-orm query operators so consumers can import everything +// from '@pascal-app/db' and avoid duplicate-instance type mismatches. +export { + and, + asc, + between, + count, + desc, + eq, + gt, + gte, + ilike, + inArray, + isNotNull, + isNull, + like, + lt, + lte, + ne, + not, + notInArray, + or, + sql, +} from 'drizzle-orm' + import * as dbSchema from './schema' export const schema = dbSchema export {