Skip to content

Evaluate the SQLite driver: node-sqlite3 is now unmaintained upstream #848

Description

@rmyndharis

Context

node-sqlite3 — the driver behind the default SQLite backend, and behind the always-SQLite main connection that stores auth and audit data — is now formally marked unmaintained upstream. The README carries a deprecation banner, and 6.0.1 (2026-03-12) is plausibly the last release the package will receive.

This is not urgent and nothing is broken. #846 moved us to 6.0.1, which resolved the node-tar advisory chain and left the tree with zero known advisories. The concern is forward-looking: with the package unmaintained, the next advisory in that dependency chain has no upstream fix path, and we would be choosing between an overrides pin and a driver migration under time pressure.

Three specifics worth recording while they are fresh:

  • The bundled SQLite is 3.52.0, which upstream withdrew, folding its features into 3.53.0. The pin-back PR in node-sqlite3 (#1858) is open and unlikely to merge. This is a hygiene issue rather than a correctness one for us: the bundled wal.c is byte-identical to fixed 3.51.3 and carries the WAL-reset guard, and we never set journal_mode=WAL, so we run the default rollback journal regardless.
  • prebuild-install, the install path, is itself deprecated. Prebuilt binaries currently exist for all six platform/arch targets including musl, so installs need no toolchain — but that is a snapshot, not a guarantee.
  • npm RFC chore(deps): bump the major group across 1 directory with 3 updates #868 would block package install scripts by default. It is warn-only today (npm warn allow-scripts … sqlite3@6.0.1), and npm 12 does not document a hard block. If it ever becomes one, npm install would leave sqlite3 without a native binary. Worth watching for CI and Docker.

What to evaluate

  • better-sqlite3 — actively maintained, synchronous API, widely used. Needs a check against TypeORM's driver support.
  • node:sqlite — built into Node, no native install step at all. Needs a check on whether TypeORM can drive it, and on our Node floor (currently >=22.12).
  • Staying put — legitimate if the dependency chain stays quiet. The cost is reactive rather than planned migration.

Constraints for whoever picks this up

  • SQLite is not only the dev default: the main connection (auth + audit) is always SQLite, on every deployment including PostgreSQL ones.
  • FTS5 is load-bearing — the AddMessagesFts migration and the cross-session message search depend on it. Any replacement must compile it in.
  • The 19 existing migrations must apply unchanged, and PostgreSQL deployments must be unaffected.
  • Prebuilt binaries for linux amd64/arm64 and musl are effectively required; needing a C++ toolchain to install would be a real regression for self-hosters.

No action needed for the current release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions