The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 25, 07:30 UTC
fix: tighten node engine range for node:sqlite compat (#206) (#1096)
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Etan Heyman committed
Mar 15, 2026 at 04:22 UTC
6d76865e742e24f93ae2dd3a33fadb90e9ee4e09
2 files changed
+25
-1
apps/server/package.json
+1
-1
@@ -44,6 +44,6 @@
44
"vitest": "catalog:"
45
},
46
"engines": {
47
- "node": "^22.13 || ^23.4 || >=24.10"
47
+ "node": "^22.16 || ^23.11 || >=24.10"
48
}
49
}
apps/server/src/persistence/NodeSqliteClient.ts
+24
@@ -50,11 +50,35 @@ export interface SqliteMemoryClientConfig extends Omit<
50
"filename" | "readonly"
51
> {}
52
53
+/**
54
+ * Verify that the current Node.js version includes the `node:sqlite` APIs
55
+ * used by `NodeSqliteClient` — specifically `StatementSync.columns()` (added
56
+ * in Node 22.16.0 / 23.11.0).
57
+ *
58
+ * @see https://github.com/nodejs/node/pull/57490
59
+ */
60
+const checkNodeSqliteCompat = () => {
61
+ const parts = process.versions.node.split(".").map(Number);
62
+ const major = parts[0] ?? 0;
63
+ const minor = parts[1] ?? 0;
64
+ const supported = (major === 22 && minor >= 16) || (major === 23 && minor >= 11) || major >= 24;
65
+
66
+ if (!supported) {
67
+ return Effect.die(
68
+ `Node.js ${process.versions.node} is missing required node:sqlite APIs ` +
69
+ `(StatementSync.columns). Upgrade to Node.js >=22.16, >=23.11, or >=24.`,
70
+ );
71
+ }
72
+ return Effect.void;
73
+};
74
+
75
const makeWithDatabase = (
76
options: SqliteClientConfig,
77
openDatabase: () => DatabaseSync,
78
): Effect.Effect<Client.SqlClient, never, Scope.Scope | Reactivity.Reactivity> =>
79
Effect.gen(function* () {
80
+ yield* checkNodeSqliteCompat();
81
+
82
const compiler = Statement.makeCompilerSqlite(options.transformQueryNames);
83
const transformRows = options.transformResultNames
84
? Statement.defaultTransforms(options.transformResultNames).array