Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# 1.23.0

## Migration Notes

- The `@clickhouse/client-common` package is deprecated. `@clickhouse/client` (Node.js) and `@clickhouse/client-web` (Web) no longer depend on it; the shared code is now bundled into each client package. Everything previously importable from `@clickhouse/client-common` should be imported from `@clickhouse/client` or `@clickhouse/client-web` instead. The `@clickhouse/client-common` package itself will no longer receive updates. ([#845])

## New features

- (Node.js) Added a RowBinary reader library and agent skill under [`skills/clickhouse-js-node-rowbinary-parser`](./skills/clickhouse-js-node-rowbinary-parser). It ships type-specific, monomorphizable building blocks for decoding `RowBinary` / `RowBinaryWithNames` / `RowBinaryWithNamesAndTypes` streams (full-buffer and chunked), plus a skill that guides an agent to generate bespoke high-performance parsers from a query's column types. The skill is bundled into `@clickhouse/client` (registered in `agents.skills`) and is also published independently as the [`@clickhouse/rowbinary`](https://www.npmjs.com/package/@clickhouse/rowbinary) package. A matching RowBinary writer is planned. ([#864])

# 1.22.0

## Migration Notes

- The `@clickhouse/client-common` package is deprecated. `@clickhouse/client` (Node.js) and `@clickhouse/client-web` (Web) no longer depend on it; the shared code is now bundled into each client package. Everything previously importable from `@clickhouse/client-common` should be imported from `@clickhouse/client` or `@clickhouse/client-web` instead. The `@clickhouse/client-common` package itself will no longer receive updates. ([#845])

## New features

- (Node.js) The `compression.request` / `compression.response` client options now accept an explicit codec via an object, in addition to the existing boolean: `true` keeps gzip (backwards compatible), and `{ codec: "zstd" }` selects zstd. The object form is intentionally extensible for future codecs and codec-specific options. zstd typically yields a similar-or-better ratio than gzip at noticeably lower CPU cost (gzip/DEFLATE is comparatively CPU-heavy and decompressed single-threaded by the ClickHouse server), and it uses the built-in `zlib` zstd support, so it requires **Node.js >= 22.15.0** (`@clickhouse/client` throws a clear error at client creation otherwise). Response decompression is driven by the server's actual `Content-Encoding`, so it degrades gracefully. The request object form also accepts an optional `level` (`{ codec, level }`) to set the codec-specific compression level (zlib level for gzip, zstd compression level for zstd); the response compression level is controlled by the server. Supported only by `@clickhouse/client` (Node.js); `@clickhouse/client-web` rejects the `zstd` codec at client creation.
Expand Down
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Tools required (for verifying a published build and promoting npm tags locally):

- Node.js >= `20.x`
- NPM >= `11.x`
- npm >= `11.x` — newer than the npm bundled with Node.js `20.x`/`22.x` (`10.x`). Either upgrade npm in place (`npm install -g npm@latest`) or use Node.js `24.x`, which already ships npm `11.x`.

Packages are versioned and released independently. Release one package at a time; to release several, repeat the steps below for each. Versions are bumped through the GitHub Actions workflows — there is no local version-bump script.

Expand Down
8 changes: 4 additions & 4 deletions tests/e2e/smoke/check.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ const {

const t = parseColumnType("Array(String)");
console.log('parseColumnType("Array(String)") =>', JSON.stringify(t));
assert.equal(t.type, "Array");
assert.equal(t.value.columnType, "String");
assert.strictEqual(t.type, "Array");
assert.strictEqual(t.value.columnType, "String");

const sm = SettingsMap.from({ max_block_size: "1000" });
console.log("SettingsMap.toString() =>", sm.toString());
assert.equal(typeof sm.toString(), "string");
assert.strictEqual(typeof sm.toString(), "string");

assert.equal(typeof ClickHouseError, "function");
assert.strictEqual(typeof ClickHouseError, "function");

console.log(
"OK (CJS): all common-origin imports resolved and executed from the installed package",
Expand Down
8 changes: 4 additions & 4 deletions tests/e2e/smoke/check.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ import assert from "node:assert";

const t = parseColumnType("Nullable(UInt64)");
console.log('parseColumnType("Nullable(UInt64)") =>', JSON.stringify(t));
assert.equal(t.type, "Nullable");
assert.equal(t.value.columnType, "UInt64");
assert.strictEqual(t.type, "Nullable");
assert.strictEqual(t.value.columnType, "UInt64");

const sm = SettingsMap.from({ max_block_size: "1000" });
console.log("SettingsMap.toString() =>", sm.toString());
assert.equal(typeof sm.toString(), "string");
assert.strictEqual(typeof sm.toString(), "string");

assert.equal(typeof ClickHouseError, "function");
assert.strictEqual(typeof ClickHouseError, "function");

console.log(
"OK (ESM): all common-origin imports resolved and executed from the installed package",
Expand Down