From 9ed47c0758587ce529a2bfce4064b37312af2cb0 Mon Sep 17 00:00:00 2001 From: Peter Leonov Date: Wed, 7 Jan 2026 11:08:58 +0100 Subject: [PATCH 1/3] npm pkg fix --- package.json | 2 +- packages/client-common/package.json | 2 +- packages/client-node/package.json | 2 +- packages/client-web/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 672caeee1..e09e0f8b1 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ ], "repository": { "type": "git", - "url": "https://github.com/ClickHouse/clickhouse-js.git" + "url": "git+https://github.com/ClickHouse/clickhouse-js.git" }, "private": false, "engines": { diff --git a/packages/client-common/package.json b/packages/client-common/package.json index ca6bd8cf1..71b8c3f0a 100644 --- a/packages/client-common/package.json +++ b/packages/client-common/package.json @@ -11,7 +11,7 @@ ], "repository": { "type": "git", - "url": "https://github.com/ClickHouse/clickhouse-js.git" + "url": "git+https://github.com/ClickHouse/clickhouse-js.git" }, "private": false, "main": "dist/index.js", diff --git a/packages/client-node/package.json b/packages/client-node/package.json index 20b91ed88..bc2eac634 100644 --- a/packages/client-node/package.json +++ b/packages/client-node/package.json @@ -11,7 +11,7 @@ ], "repository": { "type": "git", - "url": "https://github.com/ClickHouse/clickhouse-js.git" + "url": "git+https://github.com/ClickHouse/clickhouse-js.git" }, "private": false, "engines": { diff --git a/packages/client-web/package.json b/packages/client-web/package.json index 470617d24..6392ef409 100644 --- a/packages/client-web/package.json +++ b/packages/client-web/package.json @@ -11,7 +11,7 @@ ], "repository": { "type": "git", - "url": "https://github.com/ClickHouse/clickhouse-js.git" + "url": "git+https://github.com/ClickHouse/clickhouse-js.git" }, "private": false, "main": "dist/index.js", From f1c5c5e3c739b4ccd4ed4809c04da5a79e195ed3 Mon Sep 17 00:00:00 2001 From: Peter Leonov Date: Wed, 7 Jan 2026 11:12:17 +0100 Subject: [PATCH 2/3] disable accidental publishing of the root package --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e09e0f8b1..28cc4fdea 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "type": "git", "url": "git+https://github.com/ClickHouse/clickhouse-js.git" }, - "private": false, + "private": true, "engines": { "node": ">=16" }, From 202c5c8548653d7f24c9eeff2ce88190dabdc8ee Mon Sep 17 00:00:00 2001 From: Peter Leonov Date: Wed, 7 Jan 2026 11:07:42 +0100 Subject: [PATCH 3/3] update the release script --- CONTRIBUTING.md | 44 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f0a9753eb..9ecd695a1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -230,7 +230,8 @@ npm i ``` ```bash -.scripts/update_version.sh [new_version] +export NEW_VERSION=[new_version] +.scripts/update_version.sh $NEW_VERSION ``` Then build the packages: @@ -239,18 +240,45 @@ Then build the packages: npm --workspaces run build ``` -Now we're ready to publish. +Now we're ready to publish the beta version for testing: ```bash -npm --workspaces pack -npm --workspaces publish +npm login +npm --workspaces publish --tag=beta ``` -After that you can commit the changes, create a new Git tag and push it to the repository: +After the package is published it can be tests in a separate project by installing it with the `beta` tag: + +```bash +npm install @clickhouse/client@beta +``` + +After the beta testing is done, you can commit the changes, create a new Git tag and push it to the repository: ```bash git add . -git commit -m "chore: bump version to [new_version]" -git tag v[new_version] -git push origin v[new_version] +git commit -m "chore: bump version to $NEW_VERSION" +``` + +Promote the `beta` tag to `latest`: + +```bash +npm dist-tag add @clickhouse/client-common@$NEW_VERSION latest +npm dist-tag add @clickhouse/client@$NEW_VERSION latest +npm dist-tag add @clickhouse/client-web@$NEW_VERSION latest ``` + +Check that the packages have been published correctly: + +Create a PR and merge it after review. + +The last step is to create a new Git tag and push it to the repository: + +```bash +git tag "$NEW_VERSION" +git push origin tag "$NEW_VERSION" +``` + +Then create a new release in GitHub using the created tag and the corresponding changelog notes. + +All done, thanks!