fix: clarify SQLite version error message to prevent user confusion (#108382)

* fix: clarify SQLite version error message to prevent user confusion

The error message "3.44.6+" was misinterpreted by users as meaning "3.44.6 and above",
when it actually means "3.44.6+ for the 3.44.x series only". This commit clarifies the
error message to explicitly state that only specific patched versions (3.44.6+, 3.50.7+,
and 3.51.3+) are safe, and that SQLite 3.46.1 is not among them.

Changes:
- Update error message in src/infra/node-sqlite.ts to clarify version requirements
- Update test expectations in src/infra/node-sqlite.test.ts to match new error format
- Fix unnecessary template literal expressions flagged by oxlint

The code logic remains unchanged - SQLite 3.46.1 is correctly rejected as unsafe.

* fix: clarify SQLite version error message to prevent user confusion

The previous error message stated '3.44.6+' which users misinterpreted as
'3.44.6 and above', leading to confusion when versions like 3.46.1 were rejected.

The new message explicitly states '3.44.6+ in the 3.44.x series' and
'3.50.7+ in the 3.50.x series' to make it clear that only specific
minor version series received the WAL-reset bug fix.

This matches the SQLite team's actual fix announcement which only
backported the fix to 3.44.x and 3.50.x series, plus 3.51.3+.

* fix(sqlite): align unsafe version diagnostics

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
lybnnnn
2026-07-16 20:24:14 +08:00
committed by GitHub
parent 16d1f487fe
commit 02f494b51e
6 changed files with 12 additions and 8 deletions

View File

@@ -701,7 +701,7 @@ describe("install-cli.sh", () => {
expect(result.status).toBe(1);
expect(readFileSync(apkLog, "utf8")).toContain("add --no-cache nodejs npm");
expect(result.stdout).toContain(
"Alpine Node package must provide Node >= 22.22.3 with WAL-reset-safe SQLite",
"Alpine Node package must provide Node >= 22.22.3 with WAL-reset-safe SQLite 3.51.3+, 3.50.7+ within 3.50.x, or 3.44.6+ within 3.44.x",
);
expect(result.stdout).toContain("found Node v22.18.0, SQLite unavailable");
} finally {