Skip to content

Commit

Permalink
pin drizzle version across packages
Browse files Browse the repository at this point in the history
  • Loading branch information
aabassiouni committed Nov 12, 2024
1 parent 25f105f commit f5cdd40
Show file tree
Hide file tree
Showing 13 changed files with 59 additions and 42 deletions.
1 change: 0 additions & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"clsx": "^2.0.0",
"csv": "^6.3.6",
"dotenv": "^16.3.1",
"drizzle-orm": "^0.33.0",
"embla-carousel-react": "8.0.0-rc17",
"framer-motion": "^11.2.6",
"isomorphic-dompurify": "^2.3.0",
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/app/(authenticated)/success/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { clerkClient, currentUser } from "@clerk/nextjs";
import type { Workspace } from "@entrybase/db";
import { workspaces } from "@entrybase/db";
import { newId } from "@entrybase/id";
import { eq } from "drizzle-orm";
import Link from "next/link";
import { redirect } from "next/navigation";
import React from "react";
Expand Down
5 changes: 2 additions & 3 deletions apps/web/src/lib/db/db.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import "server-only";

import { email_templates, invites, signups, waitlists, workspaces } from "@entrybase/db";
import { drizzle, email_templates, invites, signups, waitlists, workspaces } from "@entrybase/db";
import { neon, neonConfig } from "@neondatabase/serverless";
import { drizzle } from "drizzle-orm/neon-http";
import { dbEnv, env } from "../env";
import { dbEnv } from "../env";

neonConfig.fetchConnectionCache = true;
if (process.env.NODE_ENV === "development") {
Expand Down
3 changes: 1 addition & 2 deletions apps/web/src/lib/db/invites.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { invites, signups } from "@entrybase/db";
import { and, desc, eq, inArray, invites, signups } from "@entrybase/db";
import { newId } from "@entrybase/id";
import { and, desc, eq, inArray } from "drizzle-orm";
import { db } from "./db";

export async function createInvite(
Expand Down
3 changes: 1 addition & 2 deletions apps/web/src/lib/db/signups.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import "server-only";

import type { DBResult, Entry, EntryResponse } from "@/types";
import { signups } from "@entrybase/db";
import { and, asc, desc, eq, sql } from "drizzle-orm";
import { and, asc, desc, eq, signups, sql } from "@entrybase/db";
import { db } from "./db";

export async function getInvitesListByCount(selectionMethod: string, count: number, waitlistID: string) {
Expand Down
3 changes: 1 addition & 2 deletions apps/web/src/lib/db/templates.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import "server-only";

import { email_templates } from "@entrybase/db";
import { and, email_templates, eq } from "@entrybase/db";
import { newId } from "@entrybase/id";
import { and, eq } from "drizzle-orm";
import { unstable_noStore as noStore } from "next/cache";
import { db } from "./db";

Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/lib/db/waitlists.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { waitlists } from "@entrybase/db";
import { and, desc, eq, isNotNull, isNull } from "@entrybase/db";
import { newId } from "@entrybase/id";
import { and, desc, eq, isNotNull, isNull } from "drizzle-orm";
import { unstable_noStore as noStore, revalidatePath } from "next/cache";
import { utapi } from "../uploadthing/server";
import { selectRandomTwColor } from "../utils";
Expand Down
3 changes: 1 addition & 2 deletions apps/web/src/lib/db/workspaces.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { db } from "./db";

import { type Workspace, workspaces } from "@entrybase/db";
import { type Workspace, and, eq, isNull, workspaces } from "@entrybase/db";
import { newId } from "@entrybase/id";
import { and, eq, isNull } from "drizzle-orm";

export async function getWorkspaceForTenant(tenantID: string) {
const workspace = await db.query.workspaces.findFirst({
Expand Down
1 change: 0 additions & 1 deletion apps/workers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"@entrybase/id": "workspace:^",
"@neondatabase/serverless": "^0.7.2",
"base-x": "^4.0.0",
"drizzle-orm": "^0.33.0",
"hono": "^3.12.7",
"typescript": "^5.3.3",
"zod": "^3.22.4"
Expand Down
2 changes: 1 addition & 1 deletion apps/workers/src/db/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type NeonHttpDatabase, drizzle } from "@entrybase/db";
import * as schema from "@entrybase/db/src/schema";
import { neon, neonConfig } from "@neondatabase/serverless";
import { type NeonHttpDatabase, drizzle } from "drizzle-orm/neon-http";

export let db: NeonHttpDatabase<typeof schema>;

Expand Down
4 changes: 2 additions & 2 deletions internal/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"@neondatabase/serverless": "^0.6.0",
"@types/node": "^20.11.5",
"dotenv": "^16.3.1",
"drizzle-orm": "^0.33.0"
"drizzle-orm": "^0.35.3"
},
"devDependencies": {
"drizzle-kit": "^0.24.2",
"drizzle-kit": "^0.26.2",
"tsx": "^4.7.0",
"typescript": "^5.2.2"
},
Expand Down
1 change: 1 addition & 0 deletions internal/db/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ export * from "./schema/invites";
export * from "./schema/workspaces";

export * from "drizzle-orm";
export { drizzle, type NeonHttpDatabase } from "drizzle-orm/neon-http";
72 changes: 48 additions & 24 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f5cdd40

Please sign in to comment.