Skip to content

1.23.1 beta1#936

Merged
peter-leonov-ch merged 5 commits into
releasefrom
main
Jul 2, 2026
Merged

1.23.1 beta1#936
peter-leonov-ch merged 5 commits into
releasefrom
main

Conversation

@peter-leonov-ch

Copy link
Copy Markdown
Collaborator

Summary

A short description of the changes with a link to an open issue.

Checklist

Delete items not relevant to your PR:

  • Unit and integration tests covering the common scenarios were added
  • A human-readable changelog entry was added to every affected package's CHANGELOG.md (e.g. packages/client-node/CHANGELOG.md; a shared/common change updates both client packages — client-node and client-web; the root CHANGELOG.md is frozen)
  • For significant changes, documentation in https://github.com/ClickHouse/clickhouse-docs was updated with further explanations or tutorials

Copilot AI and others added 5 commits June 29, 2026 21:49
## Summary

The web Vitest suite (`vitest.web.config.ts`) left `browser.headless`
unset, so Vitest launched a visible browser window when run locally and
only fell back to headless in CI. This makes the web tests open a
browser window on every local run.

## Changes

- **Default to headless**: set `browser.headless` based on a new
`BROWSER_HEADED` env var, so the runner stays headless unless explicitly
opted out.

```ts
browser: {
  enabled: true,
  // headless by default; set BROWSER_HEADED=true for a visible browser (debugging)
  headless: process.env.BROWSER_HEADED !== "true",
  provider: playwright(),
  instances: [{ browser }],
},
```

## Checklist

Delete items not relevant to your PR:

- [ ] A human-readable description of the changes was provided to
include in CHANGELOG

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
…/web (#931)

## Summary

The common package is now just a shared source folder, but it still
carried its own test wiring (configs, scripts, CI jobs). This moves the
Node.js and Web Vitest configs into their respective packages and runs
the common specs as part of each client's `unit`/`integration` suites,
dropping the standalone common test path entirely.

- **Configs embedded in packages**: `vitest.{node,web}.config.ts`,
setup, and otel files moved from repo root to `packages/client-node/`
and `packages/client-web/`. Each config is repo-rooted so shared
`client-common` sources/specs stay reachable; coverage confirms 16
`client-common/src` files are instrumented by each client run.
- **Common folded into node/web collections**: `unit`/`integration` (+
`tls`/`jwt`/`all`) now include the common specs; the `common` and
`common-integration` modes are removed. `client-common` has no test
command.
- **Scripts run from package folders**: `test:unit`, `test:integration`,
etc. live in each client package; root `test:node:*`/`test:web:*`
delegate via `npm --prefix`. All `test:common:*` scripts removed.
- **Wiring removed**: deleted `common-unit-tests` jobs (`tests-node`,
`tests-web`, `tests-bun`), updated CI path filters, `codecov.yml` flags
(9→7), and `CONTRIBUTING.md`.

## Checklist

- [ ] For significant changes, documentation in
https://github.com/ClickHouse/clickhouse-docs was updated with further
explanations or tutorials

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Peter Leonov <peter.leonov@clickhouse.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
## What

Adds `.github/workflows/bench-skill-rowbinary.yml`, a dedicated workflow
that runs the `@clickhouse/rowbinary` skill's benchmark suite (`npm run
bench`) against a ClickHouse service container.

It prints the tinybench summary to the job log (per-bench `hz` + the "Nx
faster" lines, including the ledger **RowBinary vs JSONEachRow**
comparison and the **monomorphized vs API-combinator** reader
comparisons) and uploads the same numbers as a JSON artifact
(`rowbinary-bench-results`).

## Why

Numbers from this suite are cited externally (an upcoming
`@clickhouse/rowbinary` blog post: RowBinary-vs-JSON throughput on
numeric-heavy schemas, and the monomorphized-vs-naive parser speedup).
Today those numbers can only be produced on a maintainer's laptop — `npm
run bench` needs a live server and isn't run anywhere in CI. This gives
them a **timestamped, third-party-reproducible CI artifact** instead.

The "Record environment" step logs Node version, CPU, and `SELECT
version()` so each run's log is self-describing.

## Design notes

- **Decoupled from the correctness suite**
(`tests-skill-rowbinary.yml`): benchmarks are slower and their
throughput numbers are noisy, so they shouldn't gate every PR. Triggers
on `workflow_dispatch` + PRs touching the skill / this workflow.
- Reuses the existing `docker-compose.yml` `clickhouse` service and the
local-`@clickhouse/datatype-parser` pack/install pattern from
`tests-skill-rowbinary.yml`, so the skill is benchmarked against this
checkout, not the published parser.
- Single cell (Node 24, ClickHouse `latest`) — enough for a reference
artifact without a full matrix.

Draft: opened to produce the first CI bench log/artifact and let
maintainers decide whether to keep it as-is.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…934)

## Summary

Packages are now published independently, but `prepack` copied the root
README into every package, so the npm pages for `@clickhouse/client`,
`@clickhouse/client-web`, and `@clickhouse/client-common` were all
identical. This adds dedicated READMEs per package and keeps the root
README as the combined overview.

- **`prepack` no longer overwrites READMEs** — dropped `cp
../../README.md` from `client-node`, `client-web`, and `client-common`;
they still copy `LICENSE` (and `client-node` still bundles skills). npm
always ships a package's own `README.md`, so no `files` change is
needed.
- **`.gitignore`** — removed `packages/*/README.md` so committed
per-package READMEs survive (LICENSE/skills copies stay ignored).
- **`client-node` / `client-web` READMEs** — runtime-specific overviews
(APIs, environment requirements, quick start, links).
- **`client-common` README** — leads with a deprecation warning;
explains it *was* the shared base for building custom/alternative
clients, why it's deprecated (each runtime package is now
self-contained), and points to the fork-an-in-tree-package workflow in
`ALTERNATIVE_CLIENTS.md`.
- **Root README** unchanged — remains the summary for both main
packages.

## Checklist

- [ ] For significant changes, documentation in
https://github.com/ClickHouse/clickhouse-docs was updated with further
explanations or tutorials

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Peter Leonov <peter.leonov@clickhouse.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…eEndOfChunk (#935)

## Summary

The 1.23.0 migration ([#845]) deprecated `@clickhouse/client-common` and
bundled its shared code into `@clickhouse/client` (Node.js) and
`@clickhouse/client-web` (Web), re-exporting the public surface from
each so users could switch their imports over.

Two runtime values that are part of `@clickhouse/client-common`'s public
index were missed:

- `EXCEPTION_TAG_HEADER_NAME`
- `extractErrorAtTheEndOfChunk`

Downstream users import these directly. This was the first "missing
re-export" report, from Langfuse:
langfuse/langfuse#14686

## Changes

Re-export both symbols from `@clickhouse/client` and
`@clickhouse/client-web` using the same local-binding pattern as the
other runtime values in `src/index.ts`. (Neither carries an
`@deprecated` tag in the common index, so consumers importing them from
the client packages get the clean, recommended path.)

## Verification

- `npm run typecheck` (node + web) — clean
- `npm run lint` (node + web) — clean
- Built the node package and confirmed both symbols resolve at runtime:
  - `EXCEPTION_TAG_HEADER_NAME === "x-clickhouse-exception-tag"`
  - `typeof extractErrorAtTheEndOfChunk === "function"`

[#845]: #845

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 2, 2026 08:15
@peter-leonov-ch
peter-leonov-ch requested a review from mshustov as a code owner July 2, 2026 08:15
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ peter-leonov-ch
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Prepares the 1.23.1 release line by restoring a couple of missed public re-exports from the deprecated @clickhouse/client-common surface, and by restructuring the Vitest setup so common specs run via the Node/Web client packages (with updated CI/scripts/docs).

Changes:

  • Re-export EXCEPTION_TAG_HEADER_NAME and extractErrorAtTheEndOfChunk from both @clickhouse/client and @clickhouse/client-web.
  • Move/standardize Vitest configuration and setup into packages/client-node and packages/client-web, and update root scripts + GitHub workflows accordingly.
  • Add/adjust package-level READMEs and packaging (prepack) behavior; update Codecov flag expectations; add an on-demand RowBinary benchmark workflow.

Reviewed changes

Copilot reviewed 24 out of 29 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/client-web/vitest.setup.ts Adds web Vitest setup glue (global client factory + env bridging for shared specs).
packages/client-web/vitest.otel.js Adds a browser OTEL SDK initializer (currently not enabled in config).
packages/client-web/vitest.config.ts Embeds web Vitest config; includes common tests; updates OTEL paths; defaults to headless.
packages/client-web/src/index.ts Re-exports the missed common symbols from the web client entrypoint.
packages/client-web/README.md Adds a package README for @clickhouse/client-web.
packages/client-web/package.json Adds package-local test scripts and adjusts prepack.
packages/client-web/eslint.config.mjs Updates ESLint ignores for the new Vitest files.
packages/client-web/CHANGELOG.md Adds 1.23.1 changelog entry describing the re-export fix.
packages/client-node/vitest.setup.ts Adds node Vitest setup glue (global client factory).
packages/client-node/vitest.otel.js Adds node OTEL SDK initializer for Vitest.
packages/client-node/vitest.config.ts Embeds node Vitest config; runs common tests under node modes; pins cwd to repo root.
packages/client-node/src/index.ts Re-exports the missed common symbols from the node client entrypoint.
packages/client-node/README.md Adds a package README for @clickhouse/client (node).
packages/client-node/package.json Adds package-local test scripts and adjusts prepack.
packages/client-node/eslint.config.mjs Updates ESLint ignores for the new Vitest files.
packages/client-node/CHANGELOG.md Adds 1.23.1 changelog entry describing the re-export fix.
packages/client-common/README.md Adds a deprecation README for @clickhouse/client-common.
packages/client-common/package.json Adjusts prepack to stop copying root README.
package.json Repoints root test scripts to package-local scripts.
CONTRIBUTING.md Updates contributor docs for the new Vitest config locations and commands.
codecov.yml Updates expected upload counts/flags after removing separate “common unit” jobs.
.gitignore Stops ignoring packages/*/README.md now that package READMEs are committed.
.github/workflows/tests-web.yml Updates watched paths and removes the separate web common-unit job.
.github/workflows/tests-oss-dependents.yml Updates watched paths for new Vitest config locations.
.github/workflows/tests-node.yml Updates watched paths and removes the separate node common-unit job.
.github/workflows/tests-dist.yml Updates watched paths for new Vitest config locations.
.github/workflows/tests-bun.yml Updates watched paths and removes the separate bun common-unit job.
.github/workflows/examples.yml Updates watched paths for new Vitest config locations.
.github/workflows/bench-skill-rowbinary.yml Adds an on-demand benchmark workflow for the RowBinary skill.
Comments suppressed due to low confidence (2)

packages/client-web/vitest.config.ts:173

  • Using a string base like `file://${root}/` to construct URLs is not portable (e.g. Windows paths contain : and backslashes, which produce invalid file:// URLs). Since import.meta.url is already a file URL, build these paths relative to new URL('../..', import.meta.url) instead.
    packages/client-web/vitest.config.ts:129
  • Browser OTEL is intentionally disabled here (browserSdkPath is commented out), but test.env above still forwards OTEL_EXPORTER_OTLP_HEADERS into the browser runner via import.meta.env. Since this value typically contains an auth header/API key, consider not injecting it into browser-side test code unless browser OTEL is actually enabled.

@peter-leonov-ch
peter-leonov-ch merged commit 71b2e8a into release Jul 2, 2026
143 of 144 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants