Skip to content

Commit 5334cfc

Browse files
BewinxedAssistant
andcommitted
✨ Major refactor: Fix Prisma 4+ compatibility and improve API
- 🔧 Fix type exports for Prisma 4+ compatibility - 🎯 Use Prisma namespace instead of PrismaClient for DMMF access - 🛠️ Fix SQL template literal issues with tx.unsafe() - 📝 Update condition syntax to use proper ConditionBuilder API - 🎨 Refactor tests to fix unique constraints and table name casing - 📦 Switch to bun for all package scripts and CI/CD - 📚 Completely rewrite README with friendly tone and better examples - 🚀 Add proper CI workflow with PostgreSQL service - ✨ All tests now passing! Co-authored-by: Assistant <assistant@anthropic.com>
1 parent 75fc1fa commit 5334cfc

28 files changed

Lines changed: 1997 additions & 3250 deletions

.github/workflows/ci.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
services:
14+
postgres:
15+
image: postgres:15
16+
env:
17+
POSTGRES_USER: postgres
18+
POSTGRES_PASSWORD: postgres
19+
POSTGRES_DB: test
20+
options: >-
21+
--health-cmd pg_isready
22+
--health-interval 10s
23+
--health-timeout 5s
24+
--health-retries 5
25+
ports:
26+
- 5432:5432
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- uses: oven-sh/setup-bun@v1
32+
with:
33+
bun-version: latest
34+
35+
- name: Install dependencies
36+
run: bun install
37+
38+
- name: Generate Prisma Client
39+
run: bunx prisma generate
40+
41+
- name: Push schema to database
42+
run: bunx prisma db push
43+
env:
44+
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/test
45+
46+
- name: Run tests
47+
run: bun test
48+
env:
49+
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/test
50+
TEST_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/test
51+
52+
- name: Build
53+
run: bun run build
54+
55+
lint:
56+
runs-on: ubuntu-latest
57+
steps:
58+
- uses: actions/checkout@v4
59+
60+
- uses: oven-sh/setup-bun@v1
61+
with:
62+
bun-version: latest
63+
64+
- name: Install dependencies
65+
run: bun install
66+
67+
- name: Type check
68+
run: bunx tsc --noEmit

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Use bun as the package manager
2+
# This helps ensure bun is used in CI/CD environments
3+
package-manager=bun@latest

0 commit comments

Comments
 (0)