Skip to content

Commit 2d0ef30

Browse files
feat(compute): use Bun for Compute templates (#8563)
1 parent fedbbeb commit 2d0ef30

20 files changed

Lines changed: 1491 additions & 8541 deletions

File tree

.github/workflows/test.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: test
22
on:
33
push:
44
paths:
5+
- compute/**
56
- orm/**
67
- databases/**
78
- tests/**
@@ -44,6 +45,9 @@ jobs:
4445
- uses: actions/setup-node@v4
4546
with:
4647
node-version: '22.22.1'
48+
- uses: oven-sh/setup-bun@v2
49+
with:
50+
bun-version: '1.3.14'
4751

4852
- name: Install root dependencies
4953
run: npm install

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ dist/
1313
.idea
1414
tmp-resolvers
1515
package-lock.json
16-
!compute/*/package-lock.json
1716
flow-typed
1817
yarn.lock
1918
bun.lock
19+
!compute/*/bun.lock
2020
pnpm-lock.yaml
2121
orm/**/migrations/
2222
misc/**/migrations/

compute/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ latest `@prisma/cli`.
1212
Each example includes Prisma ORM, a PostgreSQL schema, seed data, and scripts for
1313
local development and Prisma Compute deployment.
1414

15-
The Compute scripts call `npx @prisma/cli@latest` directly, so the examples do
15+
The Compute scripts call `bunx @prisma/cli@latest` directly, so the examples do
1616
not pin or install the Prisma CLI.

compute/hono/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ Prisma Compute with the latest `@prisma/cli`.
66
## Run locally
77

88
```bash
9-
npm install
9+
bun install
1010
cp .env.example .env
1111

1212
# Authenticate once, then create a Prisma Postgres database.
13-
npm run compute:login
14-
npm run compute:database:create
13+
bun run compute:login
14+
bun run compute:database:create
1515

1616
# Copy the printed DATABASE_URL into .env.
1717

18-
npm run db:generate
19-
npm run db:migrate -- --name init
20-
npm run db:seed
21-
npm run dev
18+
bun run db:generate
19+
bun run db:migrate --name init
20+
bun run db:seed
21+
bun run dev
2222
```
2323

2424
Open [http://localhost:8080](http://localhost:8080). The JSON endpoint is
@@ -30,12 +30,12 @@ Deploy the app. The script passes `.env` to Prisma Compute, so the deployed app
3030
uses the same seeded database.
3131

3232
```bash
33-
npm run compute:deploy
33+
bun run compute:deploy
3434
```
3535

3636
After a successful deploy, inspect the app with:
3737

3838
```bash
39-
npm run compute:open
40-
npm run compute:logs
39+
bun run compute:open
40+
bun run compute:logs
4141
```

compute/hono/bun.lock

Lines changed: 321 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)