From 6b4740214558a29dbc3e3ae3734a8cdc5ee60a80 Mon Sep 17 00:00:00 2001 From: Peter Leonov Date: Mon, 22 Jun 2026 23:36:37 +0200 Subject: [PATCH] Address PR #876 review comments - CHANGELOG: move the @clickhouse/client-common deprecation Migration Notes from 1.22.0 to the unreleased 1.23.0 heading. - RELEASING: clarify that npm 11.x is newer than the npm bundled with Node.js 20.x/22.x and how to obtain it. - e2e smoke tests: use assert.strictEqual instead of loose assert.equal. Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 8 ++++---- RELEASING.md | 2 +- tests/e2e/smoke/check.cjs | 8 ++++---- tests/e2e/smoke/check.mjs | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f006bce2d..3140c1a67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/RELEASING.md b/RELEASING.md index 93f527df8..f1ffa5f6d 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -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. diff --git a/tests/e2e/smoke/check.cjs b/tests/e2e/smoke/check.cjs index 967450a21..024016fb5 100644 --- a/tests/e2e/smoke/check.cjs +++ b/tests/e2e/smoke/check.cjs @@ -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", diff --git a/tests/e2e/smoke/check.mjs b/tests/e2e/smoke/check.mjs index ee45713c0..b5dc82a5c 100644 --- a/tests/e2e/smoke/check.mjs +++ b/tests/e2e/smoke/check.mjs @@ -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",