Skip to content

Commit 5645b28

Browse files
committed
refactor(build): finish bun workflow cutover
1 parent 9f49019 commit 5645b28

31 files changed

+179
-1137
lines changed

.github/workflows/test-e2e.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Install Bun
2424
uses: oven-sh/setup-bun@v2
2525
with:
26-
bun-version: 1.2.18
26+
bun-version: 1.3.11
2727

2828
- name: Cache Bun dependencies
2929
uses: actions/cache@v5
@@ -42,6 +42,6 @@ jobs:
4242
- name: Run e2e tests
4343
env:
4444
TZ: Etc/UTC
45-
GOOGLE_CLIENT_ID: test-client-id
46-
API_BASEURL: http://localhost:3000/api
45+
COMPASS_PUBLIC_GOOGLE_CLIENT_ID: test-client-id
46+
COMPASS_PUBLIC_API_BASEURL: http://localhost:3000/api
4747
run: bun run test:e2e

.github/workflows/test-unit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Install Bun
2323
uses: oven-sh/setup-bun@v2
2424
with:
25-
bun-version: 1.2.18
25+
bun-version: 1.3.11
2626

2727
- name: Cache Bun dependencies
2828
uses: actions/cache@v5

AGENTS.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ Example: `import { foo } from '@compass/core'` not `import { foo } from '../../.
7171

7272
- Install dependencies: `bun install`
7373
- Takes ~3.5 minutes. Set timeout to 10+ minutes.
74-
- Bun is the primary install/runtime entrypoint. `bun run cli`, `bun run dev:backend`, core tests, and build packaging now execute through Bun directly.
75-
- Node 24+ is still required for retained tooling: the web/backend/scripts Jest suites and the production Node build output.
74+
- Bun is the primary install/runtime entrypoint. `bun run cli`, `bun run dev:web`, `bun run dev:backend`, core tests, and package builds now execute through Bun directly.
75+
- Node 24+ is still required for retained tooling: the web/backend/scripts Jest suites.
7676
- Copy environment template: `cp packages/backend/.env.local.example packages/backend/.env.local`
7777

7878
### Development Servers
@@ -106,8 +106,8 @@ Run `bun run test:core`, `bun run test:web`, and `bun run test:backend` after ma
106106

107107
### Building
108108

109-
- **Web Build**: `bun run cli build web --environment staging --clientId "test-client-id"`
110-
- **Node Build**: `bun run cli build nodePckgs --environment staging`
109+
- **Web Build**: `BUILD_ENV=staging bun run build:web`
110+
- **Backend Build**: `BUILD_ENV=staging bun run build:backend`
111111

112112
### Linting
113113

@@ -127,7 +127,7 @@ This is a Typescript project with a monorepo structure.
127127
### Packages Overview
128128

129129
- `@compass/backend` - Express.js REST API with MongoDB, Google Calendar sync, Server-Sent Events (SSE)
130-
- `@compass/web` - React/TypeScript frontend with Redux, styled-components, webpack bundling
130+
- `@compass/web` - React/TypeScript frontend with Redux, styled-components, Bun HTML bundling
131131
- `@compass/core` - Shared utilities, types, and business logic
132132
- `@compass/scripts` - CLI tools for building, database operations, user management
133133

@@ -209,7 +209,7 @@ packages/core/src/
209209
- **Test failures**: Run `bun run test:core`, `bun run test:web`, `bun run test:backend`, and `bun run test:scripts` individually to narrow the scope of the failure
210210
- **Backend won't start**: Missing environment variables in `packages/backend/.env.local`, use web-only development (`bun run dev:web`)
211211
- Environment: Copy from `packages/backend/.env.local.example` to `packages/backend/.env.local` (there is no `.env.example`).
212-
- Webpack dev server warns about a missing `.env.local` file; this is harmless—it falls back to `process.env`.
212+
- Bun HTML serving reads frontend public values from the backend env file loaded via `--env-file`.
213213
- Husky pre-push hook runs `bunx prettier . --write`, which can modify files. Ensure working tree is clean or committed before pushing.
214214

215215
### Network Limitations
@@ -227,9 +227,11 @@ packages/core/src/
227227

228228
### Root Level Commands
229229

230-
- `bun run cli [command]` - Access CLI tools for build, seed, delete operations
231-
- `bun run dev:web` - Start the Bun-wrapped webpack dev server
232-
- `bun run dev:backend` - Start the backend directly with Bun watch mode (requires full environment)
230+
- `bun run cli [command]` - Access CLI tools for delete, migrate, and seed operations
231+
- `bun run dev:web` - Start the Bun HTML dev server
232+
- `bun run dev:backend` - Start the backend directly with Bun hot reload (requires full environment)
233+
- `bun run build:web` - Build the web app into `build/web`
234+
- `bun run build:backend` - Build the backend into `build/backend`
233235
- `bun run test` - Run all tests (fails in restricted environments)
234236
- `bun run test:core` - Run core package tests only
235237
- `bun run test:web` - Run web package tests only

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ We're actively working on improvements – check out our [roadmap](https://githu
4747

4848
## Tech Stack
4949

50-
- **Frontend**: React, Redux, Tailwind CSS, TypeScript, Webpack
51-
- **Backend**: Node.js, Express, TypeScript, MongoDB
50+
- **Frontend**: React, Redux, Tailwind CSS, TypeScript, Bun HTML bundling
51+
- **Backend**: Bun runtime, Express, TypeScript, MongoDB
5252
- **Integrations**: Google Calendar API, Google OAuth2, Socket.io
5353
- **Testing**: Bun test (core), retained Jest suites (web/backend/scripts), React Testing Library, Playwright
54-
- **Other**: Bun is the primary install/runtime/build entrypoint; webpack and Playwright are intentionally retained
54+
- **Other**: Bun is the primary install/runtime/build entrypoint; Playwright is retained for e2e coverage
5555

5656
## Getting Started
5757

@@ -65,7 +65,7 @@ Want to poke around or self-host?
6565

6666
[Read the technical docs](https://github.com/SwitchbackTech/compass/tree/main/docs): All the info you'd need to get started, including guides on how to install, test, build, deploy, and contribute.
6767

68-
Use Bun for dependency installation and the default repo commands. Bun now runs the CLI, backend dev flow, core tests, and package builds directly. Node.js 24+ is still required for retained tooling such as the web/backend/scripts Jest suites and the production Node build output.
68+
Use Bun for dependency installation and the default repo commands. Bun now runs the CLI, web/backend dev flows, core tests, and package builds directly. Node.js 24+ is still required for retained tooling such as the web/backend/scripts Jest suites.
6969

7070
### Development Workflow
7171

@@ -76,6 +76,10 @@ cp packages/backend/.env.local.example packages/backend/.env.local
7676
bun run dev:web # Frontend on http://localhost:9080
7777
bun run dev:backend # Backend on http://localhost:3000
7878

79+
# Production-style builds
80+
bun run build:web
81+
bun run build:backend
82+
7983
# Testing
8084
bun run test:core && bun run test:web && bun run test:backend
8185
bun run test:e2e

0 commit comments

Comments
 (0)