Skip to content

fix: Node 24 CI support with cross-platform SQLite driver selection#764

Closed
roseonlineownz-lab wants to merge 1 commit into
mksglu:nextfrom
roseonlineownz-lab:main
Closed

fix: Node 24 CI support with cross-platform SQLite driver selection#764
roseonlineownz-lab wants to merge 1 commit into
mksglu:nextfrom
roseonlineownz-lab:main

Conversation

@roseonlineownz-lab
Copy link
Copy Markdown

Summary

Fixes 15 test failures on Node 24+ by switching to loadDatabase() from the cross-platform driver selection layer, and adds Node 24 to the CI test matrix.

Changes

  • src/db-base.ts: Try node:sqlite on all non-Bun platforms (not just Linux), fallback to better-sqlite3
  • tests/analytics/metrics.test.ts: Replace direct better-sqlite3 import with loadDatabase() for cross-driver compatibility
  • .github/workflows/ci.yml: Add Node 24 to the test matrix
  • .github/workflows/bundle.yml: Rebuild CLI/server bundles with the cross-platform fix
  • cli.bundle.mjs, server.bundle.mjs: Rebuilt output reflects the cross-platform SQLite fix

Motivation

Node 24 ships with built-in node:sqlite, but the previous code only tried it on Linux. On other platforms, the direct better-sqlite3 import would fail when native bindings weren't compiled. This fix uses the same loadDatabase() driver selection in tests that production already uses.

Testing

  • Verified npm test passes with the new loadDatabase() approach
  • CI matrix now includes Node 24, 22, and 20

- db-base: try node:sqlite on all non-Bun platforms (not just Linux), fallback to better-sqlite3

- metrics.test: replace direct better-sqlite3 import with loadDatabase() for cross-driver compat

- ci.yml: add Node 24 to test matrix

- bundle.yml: rebuild CLI and server bundles with node:sqlite fix

- Rebuilt cli.bundle.mjs and server.bundle.mjs to include the cross-platform fix
@mksglu mksglu changed the base branch from main to next June 2, 2026 08:15
@mksglu mksglu closed this Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants