Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
9a1d7ba
fix(database): run effectdb CLI on Node.js
relsunkaev Jul 22, 2026
cc72112
test(pack): verify effect-db runs without Bun
relsunkaev Jul 22, 2026
4ae4880
chore(beads): close Node CLI runtime fix
relsunkaev Jul 22, 2026
2c5045d
chore(repo): document branch naming convention
relsunkaev Jul 22, 2026
90b4d4f
chore(repo): record esbuild runtime boundary
relsunkaev Jul 22, 2026
e3b9f8d
fix(database): generate valid extension-only pull sources
relsunkaev Jul 22, 2026
aa246e4
fix(database): decode Postgres migration identifiers
relsunkaev Jul 22, 2026
1aa447b
refactor(database): route CLI output through Effect Terminal
relsunkaev Jul 22, 2026
70565f6
test(database): exercise built CLI with Node
relsunkaev Jul 22, 2026
c32ca0d
build(repo): add Node-native package verification
relsunkaev Jul 22, 2026
5e458f4
docs(repo): prefer Effect Platform runtime services
relsunkaev Jul 22, 2026
a7d8167
chore(beads): close Node-native verification
relsunkaev Jul 22, 2026
0051f2d
chore(beads): claim Effect Platform migration
relsunkaev Jul 22, 2026
ded9444
refactor(database): route I/O through Effect Platform services
relsunkaev Jul 22, 2026
0a3650d
test(database): cover injected platform services
relsunkaev Jul 22, 2026
9380db9
docs(database): explain portable runtime services
relsunkaev Jul 22, 2026
09abe5f
chore(beads): close Effect Platform migration
relsunkaev Jul 22, 2026
3079f1c
chore(beads): claim CLI logging migration
relsunkaev Jul 22, 2026
683ff47
feat(database): add level-aware CLI logging
relsunkaev Jul 22, 2026
c4c4da3
docs(database): document CLI log levels
relsunkaev Jul 22, 2026
5491998
chore(beads): close CLI logging migration
relsunkaev Jul 22, 2026
ec2be3f
chore(beads): track Node release hardening
relsunkaev Jul 23, 2026
dd38ebf
fix(database): report CLI failures on stderr
relsunkaev Jul 23, 2026
15a54e5
test(database): cover portable write services
relsunkaev Jul 23, 2026
7a26662
test(pack): exercise installed CLI against Postgres
relsunkaev Jul 23, 2026
42e9c00
ci: run Node integration across supported versions
relsunkaev Jul 23, 2026
c793150
fix(ci): preserve required check names
relsunkaev Jul 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .beads/issues.jsonl

Large diffs are not rendered by default.

69 changes: 35 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
bun-version: 1.3.5

- name: Install dependencies
run: bun install --frozen-lockfile
Expand All @@ -46,70 +46,71 @@ jobs:
bunx npm pack --dry-run ./packages/querybuilder
bunx npm pack --dry-run ./packages/database

- name: Smoke test packed querybuilder package
run: bun run test:pack

verify-node:
name: Verify Node 22
name: ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- node: 22
name: Verify Node 22
- node: 24
name: Verify Node 24
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Build package
run: bun run build
bun-version: 1.3.5

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22.0.0
node-version: ${{ matrix.node }}

- name: Smoke test published entrypoints
run: |
node --input-type=module <<'EOF'
import * as Root from "./packages/querybuilder/dist/index.js"
import * as Postgres from "./packages/querybuilder/dist/postgres.js"
import * as Database from "./packages/database/dist/index.js"
- name: Install dependencies
run: bun install --frozen-lockfile

if (typeof Root.Query?.select !== "function") {
throw new Error("querybuilder root entrypoint did not load")
}
- name: Build package
run: bun run build

if (typeof Postgres.Renderer?.make !== "function" || typeof Postgres.Executor?.make !== "function") {
throw new Error("querybuilder postgres entrypoint did not load")
}
- name: Typecheck production sources without Bun globals
run: bun run test:types:node

if (typeof Database.defineConfig !== "function") {
throw new Error("database entrypoint did not load")
}
EOF
- name: Smoke test packed packages
run: bun run test:pack

integration:
name: Integration
name: ${{ matrix.name }}
runs-on: ubuntu-latest
needs: verify
strategy:
fail-fast: false
matrix:
include:
- node: 22
name: Integration
- node: 24
name: Integration Node 24
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
bun-version: 1.3.5

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Build package
run: bun run build

- name: Run integration tests
run: bun run test:integration
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ jobs:
with:
bun-version: 1.3.5

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 24

- name: Install dependencies
run: bun install --frozen-lockfile

Expand Down
14 changes: 14 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,20 @@ bun --hot ./index.ts

For more information, read the Bun API docs in `node_modules/bun-types/docs/**.md`.

## Git

- Do not prefix branch names with `codex/`.

## Runtime and build boundaries

- Keep Bun as the workspace package manager and tooling runtime.
- Keep published `effect-qb` and `effect-db` runtime behavior Node.js-native.
- Prefer Effect Platform services for filesystem, path, terminal, process, and
other host capabilities. Keep Node-specific implementations at the runtime
assembly boundary with `NodeServices` and `NodeRuntime`.
- Assume consumer code is bundled or built with esbuild. Do not add a runtime
TypeScript loader solely to support unbuilt TypeScript syntax.

<!-- BEGIN BEADS INTEGRATION v:1 profile:minimal hash:ca08a54f -->
## Beads Issue Tracker

Expand Down
45 changes: 41 additions & 4 deletions bun.lock

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

13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{
"name": "effect-qb-workspace",
"version": "0.20.0",
"private": true,
"type": "module",
"packageManager": "bun@1.3.5",
"engines": {
"bun": ">=1.3.5"
},
"workspaces": [
"packages/*"
],
Expand All @@ -20,9 +25,10 @@
"generate:readme-types": "bun scripts/generate-readme-type-tests.ts",
"release": "bun scripts/release.ts",
"test:pack": "bun scripts/check-packed-querybuilder.ts",
"test": "bun --config ./bunfig.test.toml test",
"test:types": "bun run generate:readme-types && bunx tsgo -p tsconfig.type-tests.json",
"test:integration": "bun scripts/test-integration.ts",
"test": "bun test",
"test:types": "bun run generate:readme-types && bunx tsgo -p tsconfig.type-tests.json && bun run test:types:node",
"test:types:node": "bunx tsgo -p tsconfig.node.json",
"test:integration": "bun run build && bun scripts/test-integration.ts",
"test:integration:datatypes": "bun scripts/test-datatype-matrix-integration.ts"
},
"devDependencies": {
Expand All @@ -31,6 +37,7 @@
"@effect/sql-pg": "4.0.0-beta.98",
"@effect/sql-sqlite-bun": "4.0.0-beta.98",
"@types/bun": "latest",
"@types/node": "^22.0.0",
"@typescript/native-preview": "beta",
"effect": "4.0.0-beta.98",
"effect-db": "workspace:*",
Expand Down
13 changes: 13 additions & 0 deletions packages/database/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,19 @@ effectdb migrate generate
effectdb migrate up
```

`effectdb` uses Effect CLI's global `--log-level` flag. Operational logs are
written to stderr and default to `info`; use `--log-level debug` for config
diagnostics or `--log-level none` to suppress logs. Plans and status
output remain on stdout.

## Runtime services

The CLI obtains file-system, path, crypto, and terminal capabilities from
`@effect/platform-node`. The core workflows also export `*Effect` variants that
accept the corresponding Effect Platform services, so another runtime can
provide its own implementations. Existing Promise APIs remain Node-backed for
compatibility.

## Operational Notes

`effectdb` manages canonical table and enum declarations, not the entire Postgres catalog.
Expand Down
7 changes: 3 additions & 4 deletions packages/database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
},
"homepage": "https://github.com/relsunkaev/effect-qb#readme",
"engines": {
"node": ">=22",
"bun": ">=1.3.5"
"node": ">=22"
},
"bin": {
"effectdb": "./dist/cli.js"
Expand Down Expand Up @@ -56,10 +55,10 @@
"prepack": "bun run build"
},
"dependencies": {
"@effect/platform-bun": "4.0.0-beta.98",
"@effect/platform-node-shared": "4.0.0-beta.98",
"@effect/platform-node": "4.0.0-beta.98",
"@effect/sql-pg": "4.0.0-beta.98",
"effect-qb": "workspace:*",
"tinyglobby": "0.2.17",
"typescript": "^6.0.2"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/database/scripts/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const main = async () => {
"--skipLibCheck",
"--allowImportingTsExtensions",
"--types",
"bun",
"node",
"src/index.ts",
"src/postgres/pull.ts",
"src/postgres/push.ts",
Expand Down
Loading
Loading