From 2b9f7cacc52e7b489dd2d5508e162257a34f7421 Mon Sep 17 00:00:00 2001 From: Simon Gagnon Date: Thu, 8 Oct 2026 14:40:06 -0400 Subject: [PATCH] chore(release): 0.3.0 Cut @cedarjs/pg 0.3.0 off the beta dist-tag. Role / clone naming for long worktree names (#44) and cedarpg run signal exit codes (#46) change, so this is a 0.x minor bump rather than 0.2.0-beta.2; 1.0.0 comes once the API settles. - package.json: version 0.3.0, publishConfig.tag latest (publish.yml derives latest from a plain version and requires the two to match) - CHANGELOG: Unreleased -> 0.3.0 with a dist-tag note; "this release" -> 0.3.0 - README / AGENTS.md: pre-1.0 0.x wording, plain @cedarjs/pg install commands Refs: cedar-pg-js5 Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 2 +- CHANGELOG.md | 9 +++++---- README.md | 8 ++++---- package.json | 4 ++-- src/core/lifecycle.ts | 2 +- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index b251b21..fe6a318 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,7 +15,7 @@ Worktree-isolated local Postgres for Vite+, Nx, and CedarJS, on top of [autopg]( Mental model: autopg is the host; cedar-pg is the lease + naming + policy layer so parallel git worktrees do not share one DB. -Published npm package: `@cedarjs/pg` (CLI binary: `cedarpg`). Beta (`0.2.0-beta.x`, `beta` dist-tag) — public APIs may still change; treat renames and export surface as intentional product decisions, not drive-by churn. +Published npm package: `@cedarjs/pg` (CLI binary: `cedarpg`). Pre-1.0 (`0.x`, `latest` dist-tag; minor bumps may break) — public APIs may still change; treat renames and export surface as intentional product decisions, not drive-by churn. ## Commands diff --git a/CHANGELOG.md b/CHANGELOG.md index ec5bc34..e53f227 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,16 @@ ## Unreleased +## 0.3.0 + +First release off the `beta` dist-tag: `npm install @cedarjs/pg` now installs it as a normal 0.x release (`latest`). Public APIs may still change before 1.0. This is a 0.x minor bump because role / clone naming for long worktree names and `cedarpg run` exit codes on signals change (see below). + ### Added - CLI: `cedarpg run --attach --mode=dev|test -- `, attach-only run. It reads the existing lease and sets child `DATABASE_URL` (+ `TEST_DATABASE_URL` in test). It never acquires, never runs role/database DDL, and never starts the host. It fails before the child starts when there is no lease or nothing listens on the leased port. - `acquire({ fresh: true })` / `acquireIfNeeded({ fresh: true })` drop every database owned by this worktree's role for that mode first. That covers the leased DB, TEMPLATE clones, and leftovers from crashed runs, and it works even when the lease file is gone. The database is then created again empty. - `cloneWorkerDatabase({ reset })` (Jest / Vitest TEMPLATE) resets the worker clone at the start of every test file. The default `"truncate"` runs `TRUNCATE ... RESTART IDENTITY` over every user table, skipping system schemas, temp tables, and extension-owned tables. Rows from earlier files in the worker are gone, and `serial` / identity IDs restart at 1, so suites that expect `id = 1` work on a reused clone. This also clears rows that `migrate` seeded into the TEMPLATE. Pass `reset: "none"` to keep the clone's rows and reset on your own. A skipped clone (external URL, `CEDAR_PG=0`) is never truncated. - `cloneFromTemplate({ reuse: true })` keeps an existing `