fix: Node 24 CI support with cross-platform SQLite driver selection#764
Closed
roseonlineownz-lab wants to merge 1 commit into
Closed
fix: Node 24 CI support with cross-platform SQLite driver selection#764roseonlineownz-lab wants to merge 1 commit into
roseonlineownz-lab wants to merge 1 commit into
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: Trynode:sqliteon all non-Bun platforms (not just Linux), fallback tobetter-sqlite3tests/analytics/metrics.test.ts: Replace directbetter-sqlite3import withloadDatabase()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 fixcli.bundle.mjs,server.bundle.mjs: Rebuilt output reflects the cross-platform SQLite fixMotivation
Node 24 ships with built-in
node:sqlite, but the previous code only tried it on Linux. On other platforms, the directbetter-sqlite3import would fail when native bindings weren't compiled. This fix uses the sameloadDatabase()driver selection in tests that production already uses.Testing
npm testpasses with the newloadDatabase()approach