fix(desktop): upgrade better-sqlite3 to 13 so the Electron 43 installer builds and opens its database

better-sqlite3 12.8.0 has no prebuild for Electron 43 (ABI 148) and does not compile against
its V8 API, so the v1.18.0 installer build stopped in fix-native-abi and was never published.
13.2.0 ships Node-API prebuilds in the package; one binary runs on Node and Electron.

- fix-native-abi.mjs: nothing to swap when the packaged module is a Node-API prebuild.
- verify-native-abi.mjs: require the target prebuild, fail on a shadowing build/Release binary,
  and open a database through the packaged module.
- electron-builder: leave out the linux prebuilds we do not ship.

Verified: desktop 2,933 tests on Node 24, and WAL/transaction/FTS5 queries in an Electron
43.8.10 main process.
This commit is contained in:
Yun Chan 2026-11-20 15:30:08 +09:00
parent a117bc0d09
commit fb5f76f57f
9 changed files with 88 additions and 255 deletions

View file

@ -22,6 +22,8 @@ files:
- "!out/**/*.map"
# ffmpeg 정적 바이너리(61MB)는 설치본에 넣지 않는다 — 필요할 때 런타임으로 내려받는다
- "!node_modules/@ffmpeg-installer/**"
# better-sqlite3 13 은 모든 플랫폼의 Node-API 프리빌드를 싣는다 — 내지 않는 플랫폼(linux)은 뺀다
- "!node_modules/better-sqlite3/prebuilds/linux*"
# ────────────────────────────────────────────────────────────────────
# 자동 업데이트 feed — 이 설정이 있어야 electron-builder가

View file

@ -59,7 +59,7 @@
"@mui/material": "^7.0.0",
"@nut-tree-fork/nut-js": "^4.2.6",
"@supabase/supabase-js": "^2.45.0",
"better-sqlite3": "^12.8.0",
"better-sqlite3": "^13.2.0",
"docx": "^9.6.1",
"drizzle-orm": "^0.45.2",
"electron-log": "^5.2.0",