Repository navigation
chore: upgrade database drivers and replace sqlite3 with node:sqlite - #262
Merged
Merged
Conversation
- sqlite3 adapter uses the built-in node:sqlite (read-only) instead of the native sqlite3 package; remove the electron-rebuild based "Rebuild SQLite3 Client" command. VS Code 1.101 (Electron 35 / Node 22.15) is required. - mysql2 2 -> 3 and pg 8.10 -> 8.23 using their promise APIs; drop the temporary pg / pg-protocol pins - @google-cloud/bigquery 5 -> 9 (only Node version requirements changed) - Replace node-ssh-forward with a small ssh2 based tunnel. ssh.remotePort was not passed before, and "~/" in identityFile was not expanded. The tunnel is now also closed when connecting to the database fails. - Pass table names as parameters / escaped identifiers instead of interpolating them into SQL - Fix inverted "Null" column in sqlite3 / postgres column descriptions - Add sqlite3 tests and opt-in MySQL / Postgres integration tests (SQLLS_TEST_MYSQL / SQLLS_TEST_POSTGRES), run in a CI job with service containers - docker-compose: postgres 10 -> 17, mysql -> 8.4
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
Phase 5 of the maintenance plan: database drivers.
sqlite3 ->
node:sqlitenode:sqlite(DatabaseSync, read-only). The nativesqlite3package,electron-rebuild, and the "Rebuild SQLite3 Client" command are removed.node:sqliteis loaded lazily viaprocess.getBuiltinModule, so its experimental warning only appears for sqlite3 users.node:sqliteworks underELECTRON_RUN_AS_NODE=1on Electron 35.5.1 (Node 22.15, VS Code 1.101) and Electron 39.8.8 (VS Code 1.120). The extension now requires VS Code 1.101+.Failed to open sqlite3 database: <reason>instead of the misleading "Need to rebuild sqlite3 module."Other drivers
SSH tunnel
node-ssh-forwardwith a smallssh2based tunnel (sshTunnel.ts). ssh2's optional native addons are excluded from the bundle; it falls back to pure JS.ssh.remotePortwas never passed (always 22),~/inssh.identityFilewas not expanded (the README examples use it), and the tunnel leaked when the DB connection failed.Bug fixes found along the way
Nullcolumn in column descriptions was inverted for sqlite3, and postgres returnedtrue/falsefor NOT NULL. Both now match mysql (Yes= nullable).Tests / CI
SQLLS_TEST_MYSQL/SQLLS_TEST_POSTGRES; a newdb-integrationCI job runs them withmysql:8.4/postgres:17service containersTest plan
remotePort,~/identityFile and a passphrase-protected keyinitializeover node-ipcKnown issue (not changed here)
The server reads only the deprecated
InitializeParams.rootPath, so clients that send onlyrootUri/workspaceFoldersdo not get project config loaded. Worth a separate fix.