Skip to content

fix: tighten node engine range for node:sqlite compat (#206)#1096

Merged
juliusmarminge merged 2 commits intopingdotgg:mainfrom
EtanHey:fix/node-engine-range-206
Mar 15, 2026
Merged

fix: tighten node engine range for node:sqlite compat (#206)#1096
juliusmarminge merged 2 commits intopingdotgg:mainfrom
EtanHey:fix/node-engine-range-206

Conversation

@EtanHey
Copy link
Contributor

@EtanHey EtanHey commented Mar 15, 2026

What Changed

Tightened engines.node from ^22.13 || ^23.4 to ^22.16 || ^23.11 || >=24.10 and added a runtime version check in Sqlite.ts before loading node:sqlite.

Why

StatementSync.columns() (used in NodeSqliteClient.ts) was only added in Node 22.16 / 23.11. The previous engine range allowed 22.13+, so users on those versions crash with TypeError: statement.columns is not a function.

The runtime check is needed because npx t3@alpha skips engine checks. Gated on runtime === "node" so Bun is untouched.

Addresses #206

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • bun lint — clean
  • bun typecheck — server clean
  • bun run test — 446 passed

Note

Enforce minimum Node.js versions for node:sqlite compatibility in NodeSqliteClient

  • Updates the engines.node constraint in package.json from ^22.13 || ^23.4 || >=24.10 to ^22.16 || ^23.11 || >=24.10 to match the versions where node:sqlite APIs are stable.
  • Adds a checkNodeSqliteCompat helper in NodeSqliteClient.ts that parses process.versions.node at runtime and calls Effect.die with a descriptive message if the version is unsupported.
  • makeWithDatabase now runs this check before opening the database, aborting initialization on incompatible Node versions.
  • Behavioral Change: servers running Node 22.13–22.15 or 23.4–23.10 will now fail fast with a clear error instead of attempting to use unavailable SQLite APIs.

Macroscope summarized b2a41a9.

@coderabbitai
Copy link

coderabbitai bot commented Mar 15, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c8c8f7df-6490-4375-88a9-3b4b660a77bd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 15, 2026
@github-actions github-actions bot added size:S 10-29 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Mar 15, 2026
@juliusmarminge juliusmarminge merged commit 6d76865 into pingdotgg:main Mar 15, 2026
9 checks passed
gabrielMalonso pushed a commit to gabrielMalonso/t3code that referenced this pull request Mar 15, 2026
gabrielMalonso added a commit to gabrielMalonso/t3code that referenced this pull request Mar 15, 2026
* chore: add .idea/ to .gitignore (pingdotgg#1077)

* Fixed Typos in Agents.md (pingdotgg#1120)

* fix: tighten node engine range for node:sqlite compat (pingdotgg#206) (pingdotgg#1096)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

* fix(web): unify focus ring styles across sidebar and app (pingdotgg#1079)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(web): add scroll to bottom pill in chat view (pingdotgg#619)

* chore: adiciona skill upstream-sync para monitorar atualizacoes do repositorio

* fix: format upstream-sync skill file for oxfmt check

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Stefan Wintergerst <wintergerst.stefan@googlemail.com>
Co-authored-by: Ivor <harshgamer6351@gmail.com>
Co-authored-by: Etan Heyman <93338119+EtanHey@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Xanacas <53140620+Xanacas@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Sai Shankar <saishankar2803@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants