Skip to content

fix(driver-sql): drop vestigial sqlite3 peerDependency; SQLite uses better-sqlite3 (#3277)#3283

Merged
os-zhuang merged 2 commits into
mainfrom
fix/driver-sql-sqlite3-peer
Jul 19, 2026
Merged

fix(driver-sql): drop vestigial sqlite3 peerDependency; SQLite uses better-sqlite3 (#3277)#3283
os-zhuang merged 2 commits into
mainfrom
fix/driver-sql-sqlite3-peer

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Fixes #3277.

Problem

packages/plugins/driver-sql/package.json declared peerDependencies.sqlite3: "^5.0.0", but the driver never loads sqlite3 at runtime. Every first-party SQLite construction site builds a client: 'better-sqlite3' Knex driver:

better-sqlite3 is already an optionalDependency (auto-installed, with the wasm/memory fallback covering a failed native build), so the SQLite requirement was already satisfied without the consumer installing anything. The README already documents pnpm add @objectstack/driver-sql better-sqlite3.

Impact of the stale peer: a consumer resolving peer deps could pnpm add sqlite3 (never used) while believing they'd satisfied the SQLite requirement.

Fix

  • Remove sqlite3 from peerDependencies + peerDependenciesMeta. better-sqlite3 stays an optionalDependency — the intentional default-engine design (pg/mysql2/tedious remain peer-provided production opt-ins).
  • Regenerate pnpm-lock.yaml: the sqlite3 → node-gyp native-build subtree drops out (−548 lines), and packages shared with better-sqlite3's prebuild-install are retained. Verified idempotent.
  • Patch changeset (driver-sql is in the fixed group).

No source/behavior change: the sqlite3 string alias still maps to better-sqlite3 in the driver factory and isSqlite dialect detection, so driver: 'sqlite3' config keeps working — it just resolves to better-sqlite3 like everything else.

Found during the #1880 docs implementation-accuracy audit (PR #3243); out of scope for that docs-only PR.

🤖 Generated with Claude Code

os-zhuang and others added 2 commits July 18, 2026 22:38
feat(evaluator): route CEL-dialect component/action predicates to the canonical engine (#2664)

objectui@2e7d7f0f7ee76b838f580e8a36b74f1309b204fc
…etter-sqlite3 (#3277)

driver-sql declared peerDependencies.sqlite3 ^5.0.0, but nothing loads sqlite3 at
runtime — every SQLite path builds a `client: 'better-sqlite3'` Knex driver
(resolveSqliteDriver, the datasource driver factory, the whole test suite), and
better-sqlite3 is already an optionalDependency (auto-installed, with the #2229
native→wasm→memory fallback covering a failed native build). The README already
documents `pnpm add better-sqlite3`.

The stale peer only misled: a consumer resolving peer deps could `pnpm add sqlite3`
(never used) believing they'd satisfied the SQLite requirement. Removing it aligns
the manifest with the code and docs and drops the sqlite3→node-gyp build subtree
from the lockfile. The `sqlite3` string alias still maps to better-sqlite3 in the
driver factory and dialect detection, so `driver: 'sqlite3'` config keeps working.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jul 19, 2026 2:01pm

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file tooling size/s labels Jul 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/driver-sql.

8 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/data-modeling/drivers.mdx (via @objectstack/driver-sql)
  • content/docs/getting-started/glossary.mdx (via @objectstack/driver-sql)
  • content/docs/plugins/anatomy.mdx (via @objectstack/driver-sql)
  • content/docs/plugins/packages.mdx (via @objectstack/driver-sql)
  • content/docs/protocol/kernel/index.mdx (via @objectstack/driver-sql)
  • content/docs/protocol/kernel/lifecycle.mdx (via @objectstack/driver-sql)
  • content/docs/protocol/objectql/query-syntax.mdx (via @objectstack/driver-sql)
  • content/docs/releases/implementation-status.mdx (via @objectstack/driver-sql)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

@os-zhuang
os-zhuang merged commit 47d923c into main Jul 19, 2026
17 checks passed
@os-zhuang
os-zhuang deleted the fix/driver-sql-sqlite3-peer branch July 19, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation size/s tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

driver-sql: SQLite peerDependency is sqlite3 but the driver loads better-sqlite3 at runtime

1 participant