Skip to content

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

Description

@os-zhuang

packages/plugins/driver-sql/package.json declares peerDependencies.sqlite3: "^5.0.0", but the SQLite driver actually loads better-sqlite3 at runtime (client: 'better-sqlite3' — e.g. sqlite-driver-fallback.ts and the driver test suite).

The docs' install guidance (pnpm add @objectstack/driver-sql better-sqlite3) is correct; the mismatch is in the package's declared peer dependency.

Impact: a consumer relying on peerDependency resolution could install sqlite3 (unused) and still be missing the real requirement, better-sqlite3.

Fix: change the SQLite peerDependency from sqlite3 to better-sqlite3 (or mark it optional and document both). Full current peerDeps: {mysql2, pg, sqlite3, tedious}.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions