Skip to content

Feat/2.0 config rename reconnect - #19

Closed
revxshafi wants to merge 3 commits into
mainfrom
feat/2.0-config-rename-reconnect
Closed

Feat/2.0 config rename reconnect#19
revxshafi wants to merge 3 commits into
mainfrom
feat/2.0-config-rename-reconnect

Conversation

@revxshafi

Copy link
Copy Markdown
Collaborator

Summary

Related issue

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior or the public API)
  • Documentation only
  • Refactor / internal (no behavior change)
  • Build, CI, or tooling

How it was tested

pnpm test# Vitest over test/ (Postgres files skip themselves without DATABASE_URL)
pnpm typecheck # tsc --noEmit on src/ + scripts
pnpm smoke # end to end check against real SQLite files, always runnable

And, when you have a throwaway Postgres to point at:

DATABASE_URL=postgres://... pnpm swap-test # creates & drops a swaptest schema

Checklist

  • Tests added or updated for the change
  • Docs / TSDoc updated where relevant
  • TypeDoc still builds at zero warnings (pnpm docs)
  • Public API surface (src/database/index.ts) changes are intentional and called out above
  • Follows the conventions in CLAUDE.md (comment mechanics, variable naming, tone)

Restructure README example-first (quick start leads, Postgres switch as
proof) and add a visual system: a pure-SVG hero (name, tagline, engine-swap
motif) and a how-it-works architecture diagram, both self-backgrounded for
light/dark GitHub themes. Add real npm/types/node/license badges. Content
tables (reliability, migration guarantees, API, limits) preserved, repeated
prose trimmed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
BREAKING CHANGE: DALConfig.db is now a 'local' | 'cloud' selector with
local?/cloud? blocks declared alongside it; the per-block `mode` field is
removed. Every declared block is validated eagerly at connect(), and a
db: 'cloud' with no cloud block throws ConfigurationError.
- rename createDAL() -> sqlSwitch() (factory + default export); createDAL
kept as a one-line @deprecated alias, removed in 3.0
- add db.reconnect(target?): restart / recover a wedged connection, or
repoint to the other declared engine without moving data. fail-safe
(new engine built + validated before the old one is torn down) and
flushes pending writes first. engineSwap() stays a pure data-mover.
- bump to 2.0.0 across root + scoped package (version + dep pin)
- docs: README, CHANGELOG 2.0.0 entry, CLAUDE.md public-API invariant
- tests: reconnect.test.ts + factory-rename.test.ts
@revxshafi
revxshafi enabled auto-merge (squash) August 26, 2026 10:21
- architecture.svg: shrink the engineSwap caption to 13px so "resumable"
stops overflowing the box; "collapses repeats" -> "collapse repeats" so
the "w" in "now" no longer touches the card edge
- hero.svg: replace the hardcoded "npm 1.0.1" (had to be hand-edited every
release) with the always-true "ESM + CJS"; a live version belongs in a
shields.io README badge, not a static committed SVG
- hero.svg: mode: 'local'/'cloud' -> db: 'local'/'cloud' to match the 2.0
both-engines config shape
@revxshafi

Copy link
Copy Markdown
CollaboratorAuthor

Superseded by #20 — same changes rebased onto current main to drop the duplicate README-redesign commit that was making this branch conflict. Closing in favour of the clean PR.

auto-merge was automatically disabled August 26, 2026 10:47

Pull request was closed

@revxshafi
revxshafi deleted the feat/2.0-config-rename-reconnect branch August 26, 2026 10:47
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@revxshafi