Skip to content

Two majors of sqlite3, and the upstream is unmaintained #962

Description

@macterra

Six manifests depend on sqlite3, split across two major versions. Nobody chose the split, and the package has since declared itself unmaintained — so this is worth settling deliberately rather than letting a bot finish it.

The split, and why it exists

Added Package Version
2024-09 packages/gatekeeper ^5.1.7
2025-01 packages/keymaster ^5.1.7
2025-02 services/mediators/satoshi ^5.1.7
2026-05-15 services/mediators/zcash ^5.1.7 → later ^6.0.1
2026-05-21 services/mediators/ethereum ^6.0.1
2026-05-21 services/mediators/solana ^6.0.1

sqlite3@5.1.7 was published 2024-01-05 and 6.0.1 on 2026-03-12. Everything written before March took 5.1.7 because that is what npm install sqlite3 had given for two years; everything written after took 6.0.1. The split is nothing but the date each service was created, either side of an upstream major.

zcash is the exception that confirms it: added at ^5.1.7 on 15 May, moved to ^6.0.1 within a fortnight by dependabot in a bump the npm_and_yarn group across N directories PR. The bot took one straggler and left the other three, presumably because they carried no advisory to trigger on.

So there is no design intent to recover here.

Why it is not merely untidy

The prebuild seeding in scripts/prefetch-prebuilds.mjs resolves a version and downloads an asset whose filename contains it. Until #961 it read only the root lockfile, so it seeded 5.1.7 and silently missed the three services on 6.0.1 — they fell back to prebuild-install's un-retried network fetch, which is the failure #879 was written to remove.

That failure is invisible: the build still succeeds, just over the network. It surfaced only because removing a forced source build made someone check which prebuild was actually being used. #961 makes the script seed every installed version, which is correct defensively — but it is scaffolding around a split that should not exist.

The wrinkle that changes the question

node-sqlite3 marked itself unmaintained at v6.0.0. From the release notes:

Mark repository as unmaintained (#1844)

So "align on 6.0.1" means standardising on an abandoned package. The two majors are otherwise near-identical — same dependency list, same API, and the only real change in 6.0.0 is engines: node >=20.17.0, which this repo satisfies at 22.23.2.

Options

Align on 6.0.1. Cheapest. Three manifests move, the seeding special-case becomes redundant, and the repo standardises on a package nobody maintains.

Move to node:sqlite. Built into the Node 22 this repo already runs — confirmed available, currently flagged experimental. It would remove a native module from six services entirely: no prebuilds, no prebuild-install, no python3 make g++ in those Dockerfiles, and no emulated source builds when publishing for arm64. Larger change, and the experimental flag is a real consideration for a database.

Move to better-sqlite3. Maintained, synchronous API, still a native module — so the prebuild machinery stays.

Scope

The usage is contained, which makes any of these tractable: one file per package.

packages/gatekeeper/src/db/sqlite.ts
packages/keymaster/src/db/sqlite.ts
services/mediators/{satoshi,zcash,ethereum,solana}/src/db/sqlite.ts

Two of those are published npm packages — @didcid/gatekeeper and @didcid/keymaster — so whichever way this goes, it changes a dependency for anyone installing them, and belongs in a release rather than a cleanup.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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