fix(server): upgrade better-sqlite3 to 12.x for Node 24 compatibility (#41)

better-sqlite3 11.x removes its environment cleanup hook from Statement::~Statement() after the Node environment is torn down. Node 24.19.0 asserts on the null environment and aborts the worker, so vitest reported 'Worker exited unexpectedly' and exited non-zero on a fully green test run — failing the required check on every PR.

11.x also ships no prebuild for Node 24, so CI compiled it from source on every run. 12.x has prebuilds for that ABI and the V8 13.9 shims 11.x lacks. drizzle-orm declares better-sqlite3 >=7, so the major bump is in range.

Supersedes #26.
This commit is contained in:
TheZwiss
2026-08-25 15:41:43 +02:00
committed by GitHub
parent 8e13aaa057
commit 89467d6f93
2 changed files with 12 additions and 10 deletions
+1 -1
View File
@@ -25,7 +25,7 @@
"@tus/file-store": "^1.5.1",
"@tus/server": "^1.10.2",
"bcryptjs": "^2.4.3",
"better-sqlite3": "^11.3.0",
"better-sqlite3": "^12.11.1",
"cheerio": "^1.0.0",
"dotenv": "^16.4.5",
"drizzle-orm": "^0.33.0",
+11 -9
View File
@@ -78,8 +78,8 @@ importers:
specifier: ^2.4.3
version: 2.4.3
better-sqlite3:
specifier: ^11.3.0
version: 11.10.0
specifier: ^12.11.1
version: 12.11.1
cheerio:
specifier: ^1.0.0
version: 1.2.0
@@ -88,7 +88,7 @@ importers:
version: 16.6.1
drizzle-orm:
specifier: ^0.33.0
version: 0.33.0(@types/better-sqlite3@7.6.13)(@types/react@18.3.28)(better-sqlite3@11.10.0)(react@18.3.1)
version: 0.33.0(@types/better-sqlite3@7.6.13)(@types/react@18.3.28)(better-sqlite3@12.11.1)(react@18.3.1)
fastify:
specifier: ^4.28.1
version: 4.29.1
@@ -834,7 +834,7 @@ packages:
engines: {node: '>=12'}
'@electron/node-gyp@https://codeload.github.com/electron/node-gyp/tar.gz/06b29aafb7708acef8b3669835c8a7857ebc92d2':
resolution: {tarball: https://codeload.github.com/electron/node-gyp/tar.gz/06b29aafb7708acef8b3669835c8a7857ebc92d2}
resolution: {gitHosted: true, integrity: sha512-MXgzlTDEEndJB3TBbvd5uFQO/8gaINo1Hfen8vef5rq/VHVPeB63uuv/uO5+8GFsAJ/rauu6XB79S6K4+aXc+w==, tarball: https://codeload.github.com/electron/node-gyp/tar.gz/06b29aafb7708acef8b3669835c8a7857ebc92d2}
version: 10.2.0-electron.1
engines: {node: '>=12.13.0'}
hasBin: true
@@ -2374,8 +2374,9 @@ packages:
bcryptjs@2.4.3:
resolution: {integrity: sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==}
better-sqlite3@11.10.0:
resolution: {integrity: sha512-EwhOpyXiOEL/lKzHz9AW1msWFNzGc/z+LzeB3/jnFJpxu+th2yqvzsSWas1v9jgs9+xiXJcD5A8CJxAG2TaghQ==}
better-sqlite3@12.11.1:
resolution: {integrity: sha512-dq9AtApgg5PGFtBzPFSBl3HZQjHok5gaQCM6zh2Yk0aSmDCs1CbnVI8/HgASQkNKsWFpseIO9beg5xxpYhbIfA==}
engines: {node: 20.x || 22.x || 23.x || 24.x || 25.x || 26.x}
bidi-js@1.0.3:
resolution: {integrity: sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==}
@@ -4426,6 +4427,7 @@ packages:
prebuild-install@7.1.3:
resolution: {integrity: sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==}
engines: {node: '>=10'}
deprecated: No longer maintained. Please contact the author of the relevant native addon; alternatives are available.
hasBin: true
pretty-bytes@5.6.0:
@@ -7658,7 +7660,7 @@ snapshots:
bcryptjs@2.4.3: {}
better-sqlite3@11.10.0:
better-sqlite3@12.11.1:
dependencies:
bindings: 1.5.0
prebuild-install: 7.1.3
@@ -8197,11 +8199,11 @@ snapshots:
transitivePeerDependencies:
- supports-color
drizzle-orm@0.33.0(@types/better-sqlite3@7.6.13)(@types/react@18.3.28)(better-sqlite3@11.10.0)(react@18.3.1):
drizzle-orm@0.33.0(@types/better-sqlite3@7.6.13)(@types/react@18.3.28)(better-sqlite3@12.11.1)(react@18.3.1):
optionalDependencies:
'@types/better-sqlite3': 7.6.13
'@types/react': 18.3.28
better-sqlite3: 11.10.0
better-sqlite3: 12.11.1
react: 18.3.1
dunder-proto@1.0.1: