From ade54104396ed296588e4a4fc7e661da5bd630de Mon Sep 17 00:00:00 2001 From: Manfred Moser Date: Thu, 3 Sep 2026 15:44:07 -0700 Subject: [PATCH] Move to the renamed @trinodb/trino-js-client The Trino client was republished under the trinodb scope. Versions up to 0.2.9 shipped as the unscoped trino-client, and the scoped name @trinodb/trino-js-client starts at 0.3.0. The unscoped package is no longer maintained and will not receive further updates. This is a rename of the dependency and its require specifier. The declaration files of 0.2.9 and 0.3.2 are identical byte for byte, so there is no API change. Note that the axios override in this package pins axios below what the client declares. 0.3.2 asks for axios 1.19.0, while the "^1.7.9" override keeps the resolution at 1.15.0. That still works, but it is worth a look, since 1.19.0 carries several security fixes. Assisted-by: Claude Code Opus 5 --- package-lock.json | 24 ++++++++++++------------ package.json | 2 +- src/driver.ts | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 49d1df3..e8eaae7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,15 @@ { "name": "sqlnotebook-pro", - "version": "3.3.0", + "version": "3.4.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "sqlnotebook-pro", - "version": "3.3.0", + "version": "3.4.3", "dependencies": { "@tanstack/react-table": "^8.21.3", + "@trinodb/trino-js-client": "^0.3.2", "@vscode/webview-ui-toolkit": "^1.4.0", "flatpickr": "^4.6.13", "icons-react": "^3.7.1", @@ -19,7 +20,6 @@ "react-dom": "^17.0.2", "sql-formatter": "^15.4.0", "sql.js": "^1.10.3", - "trino-client": "^0.2.9", "xlsx": "https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz" }, "devDependencies": { @@ -1375,6 +1375,15 @@ "@textlint/ast-node-types": "15.5.0" } }, + "node_modules/@trinodb/trino-js-client": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@trinodb/trino-js-client/-/trino-js-client-0.3.2.tgz", + "integrity": "sha512-TNFOXkk2wp/SSgNtRdfArKZSR78ebYR7zxTobu+o01C+KJO7ELWcti90DeCw4WJDh0YbjZGT0XuXV48n7TEyoQ==", + "license": "Apache-2.0", + "dependencies": { + "axios": "1.19.0" + } + }, "node_modules/@types/emscripten": { "version": "1.41.5", "resolved": "https://registry.npmjs.org/@types/emscripten/-/emscripten-1.41.5.tgz", @@ -6930,15 +6939,6 @@ "node": ">=8.0" } }, - "node_modules/trino-client": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/trino-client/-/trino-client-0.2.9.tgz", - "integrity": "sha512-bINcQxDH5v9DR1zqXtoNqnRJ5leYMyYzRuFZLsoqg4irWYPDh/4wBndC8c2x+QfNIOr6c35BtHKOwotelqSATg==", - "license": "Apache-2.0", - "dependencies": { - "axios": "1.13.2" - } - }, "node_modules/ts-api-utils": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", diff --git a/package.json b/package.json index 99d97a8..7034271 100644 --- a/package.json +++ b/package.json @@ -442,6 +442,7 @@ }, "dependencies": { "@tanstack/react-table": "^8.21.3", + "@trinodb/trino-js-client": "^0.3.2", "@vscode/webview-ui-toolkit": "^1.4.0", "flatpickr": "^4.6.13", "icons-react": "^3.7.1", @@ -452,7 +453,6 @@ "react-dom": "^17.0.2", "sql-formatter": "^15.4.0", "sql.js": "^1.10.3", - "trino-client": "^0.2.9", "xlsx": "https://cdn.sheetjs.com/xlsx-latest/xlsx-latest.tgz" }, "overrides": { diff --git a/src/driver.ts b/src/driver.ts index 3b60f25..0efab6c 100644 --- a/src/driver.ts +++ b/src/driver.ts @@ -6,7 +6,7 @@ import * as fs from 'fs/promises'; import type { Database as SqliteDatabase } from 'sql.js'; import * as path from 'path'; import * as vscode from 'vscode'; -const trinoLib = require('trino-client'); +const trinoLib = require('@trinodb/trino-js-client'); const supportedDrivers = ['mysql', 'postgres', 'mssql', 'sqlite', 'trino'] as const; export type DriverKey = typeof supportedDrivers[number]; export type TableSchema = { @@ -1043,7 +1043,7 @@ async function runTrinoQuery(client: any, q: string): Promise { try { if (!client || typeof client.query !== 'function') { console.error('Trino client object:', client); - throw new Error('Trino client does not have a query method. Check trino-client version and usage.'); + throw new Error('Trino client does not have a query method. Check @trinodb/trino-js-client version and usage.'); } const iterator = await client.query(q); if (!iterator || typeof iterator[Symbol.asyncIterator] !== 'function') {