diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f83bc43..23a1017 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,9 +4,16 @@ updates: - package-ecosystem: 'github-actions' directory: '.github/workflows' schedule: - interval: 'daily' + interval: 'weekly' + day: 'monday' + groups: + workflows: + dependency-type: 'development' - package-ecosystem: 'npm' directory: '/' schedule: interval: 'weekly' day: 'monday' + groups: + dev-dependencies: + dependency-type: 'development' diff --git a/package.json b/package.json index fac4680..b142f21 100644 --- a/package.json +++ b/package.json @@ -43,25 +43,25 @@ "prepare": "husky" }, "devDependencies": { - "@faker-js/faker": "^8.4.1", + "@faker-js/faker": "^9.0.2", "@istanbuljs/nyc-config-typescript": "^1.0.2", "@types/jasmine": "^5.1.4", - "@types/node": "^20.11.30", + "@types/node": "^22.7.0", "@types/sinon": "^17.0.3", "@types/split2": "^4.2.3", - "@types/uuid": "^9.0.8", - "@typescript-eslint/eslint-plugin": "^7.3.1", - "@typescript-eslint/parser": "^7.3.1", - "apache-arrow": "^15.0.2", - "eslint": "^8.57.0", + "@types/uuid": "^10.0.0", + "@typescript-eslint/eslint-plugin": "^8.7.0", + "@typescript-eslint/parser": "^8.7.0", + "apache-arrow": "^17.0.0", + "eslint": "^8.57.1", "eslint-config-prettier": "^9.1.0", - "eslint-plugin-expect-type": "^0.3.0", - "eslint-plugin-prettier": "^5.1.3", - "husky": "^9.0.11", - "jasmine": "^5.1.0", - "jasmine-core": "^5.1.2", + "eslint-plugin-expect-type": "^0.4.3", + "eslint-plugin-prettier": "^5.2.1", + "husky": "^9.1.6", + "jasmine": "^5.3.0", + "jasmine-core": "^5.3.0", "jasmine-expect": "^5.0.0", - "karma": "^6.4.3", + "karma": "^6.4.4", "karma-chrome-launcher": "^3.2.0", "karma-firefox-launcher": "^2.1.3", "karma-jasmine": "^5.1.0", @@ -69,24 +69,24 @@ "karma-sourcemap-loader": "^0.4.0", "karma-typescript": "^5.5.4", "karma-webpack": "^5.0.1", - "lint-staged": "^15.2.2", - "nyc": "^15.1.0", - "parquet-wasm": "0.6.0-beta.2", - "prettier": "3.2.5", - "sinon": "^17.0.1", + "lint-staged": "^15.2.10", + "nyc": "^17.1.0", + "parquet-wasm": "0.6.1", + "prettier": "3.3.3", + "sinon": "^19.0.2", "source-map-support": "^0.5.21", "split2": "^4.2.0", "terser-webpack-plugin": "^5.3.10", - "ts-jest": "^29.1.2", + "ts-jest": "^29.2.5", "ts-loader": "^9.5.1", "ts-node": "^10.9.2", "tsconfig-paths": "^4.2.0", "tsconfig-paths-webpack-plugin": "^4.1.0", - "typescript": "^5.4.3", - "uuid": "^9.0.1", - "webpack": "^5.91.0", + "typescript": "^5.6.2", + "uuid": "^10.0.0", + "webpack": "^5.95.0", "webpack-cli": "^5.1.4", - "webpack-merge": "^5.10.0" + "webpack-merge": "^6.0.1" }, "workspaces": [ "./packages/*" diff --git a/packages/client-common/__tests__/utils/client.ts b/packages/client-common/__tests__/utils/client.ts index 758b579..59f8795 100644 --- a/packages/client-common/__tests__/utils/client.ts +++ b/packages/client-common/__tests__/utils/client.ts @@ -64,6 +64,7 @@ export function createTestClient( clickhouse_settings: clickHouseSettings, } if (process.env.browser) { + // eslint-disable-next-line @typescript-eslint/no-require-imports return require('../../../client-web/src/client').createClient(cloudConfig) } else { // props to https://stackoverflow.com/a/41063795/4575540 @@ -80,6 +81,7 @@ export function createTestClient( clickhouse_settings: clickHouseSettings, } if (process.env.browser) { + // eslint-disable-next-line @typescript-eslint/no-require-imports return require('../../../client-web/src/client').createClient(localConfig) // eslint-disable-line @typescript-eslint/no-var-requires } else { // @ts-expect-error diff --git a/packages/client-common/src/config.ts b/packages/client-common/src/config.ts index 64de20d..e29871e 100644 --- a/packages/client-common/src/config.ts +++ b/packages/client-common/src/config.ts @@ -276,6 +276,7 @@ export function createUrl(configURL: string | URL | undefined): URL { } catch (err) { throw new Error( 'ClickHouse URL is malformed. Expected format: http[s]://[username:password@]hostname:port[/database][?param1=value1¶m2=value2]', + { cause: err }, ) } if (url.protocol !== 'http:' && url.protocol !== 'https:') { diff --git a/packages/client-node/__tests__/integration/node_query_format_types.test.ts b/packages/client-node/__tests__/integration/node_query_format_types.test.ts index 649005a..e19a33f 100644 --- a/packages/client-node/__tests__/integration/node_query_format_types.test.ts +++ b/packages/client-node/__tests__/integration/node_query_format_types.test.ts @@ -8,6 +8,8 @@ import { guid } from '@test/utils' import type { ClickHouseClient } from '../../src' import { createNodeTestClient } from '../utils/node_client' +/* eslint-disable @typescript-eslint/no-unused-expressions */ + // Ignored and used only as a source for ESLint checks with $ExpectType // See also: https://www.npmjs.com/package/eslint-plugin-expect-type xdescribe('[Node.js] Query and ResultSet types', () => { diff --git a/packages/client-node/src/connection/node_base_connection.ts b/packages/client-node/src/connection/node_base_connection.ts index 0608cdb..5c4b1ec 100644 --- a/packages/client-node/src/connection/node_base_connection.ts +++ b/packages/client-node/src/connection/node_base_connection.ts @@ -390,8 +390,8 @@ export abstract class NodeBaseConnection const tryDecompressResponseStream = params.op === 'Exec' ? // allows to disable stream decompression for the `Exec` operation only - params.decompress_response_stream ?? - this.params.compression.decompress_response + (params.decompress_response_stream ?? + this.params.compression.decompress_response) : // there is nothing useful in the response stream for the `Command` operation, // and it is immediately destroyed; never decompress it false