Skip to content

fix(types): re-export public API types dropped in 1.23.0 - #998

Open
Saitgalin wants to merge 3 commits into
ClickHouse:mainfrom
Saitgalin:export-missing-public-types
Open

fix(types): re-export public API types dropped in 1.23.0#998
Saitgalin wants to merge 3 commits into
ClickHouse:mainfrom
Saitgalin:export-missing-public-types

Conversation

@Saitgalin

Copy link
Copy Markdown

Closes #997. The issue lists six of these; I found the other four (the ping ones and ResultStream) while preparing the change.

All ten were exported from the root of @clickhouse/client-common, and the ping ones sit in the block that its index.ts marks with /** Should be re-exported by the implementation */. The lower level exports (Connection*, LogWriter, the encoders and utils) are clearly internal, so I left them out. WithHttpStatusCode was never exported from client-common either, so it is not here; happy to add it if you want the whole intersection nameable.

Type-only re-exports: I built the tree with and without the change, dist/index.js is byte identical for both packages, only the .d.ts files differ. Locally green: typecheck, lint, prettier, build, test:node:unit (408 passed). test:web:unit needs Playwright browsers, which I don't have set up.

No test included, and I would rather ask than guess: a type level assertion would not fail anywhere in CI today, since the package tsconfigs include only src/** and vitest runs without typecheck.

Copilot AI lite review requested due to automatic review settings August 14, 2026 05:18
@Saitgalin
Saitgalin requested a review from mshustov as a code owner August 14, 2026 05:18
@CLAassistant

CLAassistant commented Aug 14, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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

Restores several type-only exports at the package roots of @clickhouse/client and @clickhouse/client-web that were previously part of the @clickhouse/client-common public surface, fixing downstream TypeScript import errors introduced after the 1.23.0 bundling change.

Changes:

  • Re-export QueryParamsWithFormat from both clients’ root entrypoints.
  • Re-export result and JSON typing helpers (ResultJSONType, RowJSONType, ResultStream) from both clients’ root entrypoints.
  • Re-export ping and summary-related public types (PingParams*, ClickHouseSummary, WithClickHouseSummary, WithResponseHeaders) from both clients’ root entrypoints.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/client-web/src/index.ts Adds missing type-only re-exports to restore the Web client’s public API typing surface.
packages/client-node/src/index.ts Adds missing type-only re-exports to restore the Node client’s public API typing surface.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 12 to 16
type BaseClickHouseClientConfigOptions,
type BaseQueryParams,
type QueryParams,
type QueryParamsWithFormat,
type ExecParams,
Comment on lines 11 to 15
type BaseClickHouseClientConfigOptions,
type BaseQueryParams,
type QueryParams,
type QueryParamsWithFormat,
type ExecParams,
@mshustov

Copy link
Copy Markdown
Member

@Saitgalin could you sign CLA pls?

@mshustov
mshustov enabled auto-merge (squash) August 14, 2026 08:07
Ten types that the clients use in their own public signatures are missing
from the root of @clickhouse/client and @clickhouse/client-web since the
common sources were bundled into the client packages. All of them were
exported from @clickhouse/client-common, which is now deprecated, so there
is no supported place left to import them from.

Type-only re-exports: the emitted JavaScript is unchanged.
auto-merge was automatically disabled August 15, 2026 03:02

Head branch was pushed to by a user without write access

@Saitgalin
Saitgalin force-pushed the export-missing-public-types branch from cc00e2f to 3ccd81c Compare August 15, 2026 03:02
@Saitgalin

Saitgalin commented Aug 15, 2026

Copy link
Copy Markdown
Author

Signed. CLA check is green now.

@mshustov
mshustov enabled auto-merge (squash) August 16, 2026 12:46
Addresses the Copilot review comments on ClickHouse#998: the re-exports change the
public API surface of both clients, so both CHANGELOGs get a matching
entry under the unreleased 1.24.0 "Bug fixes" section.
auto-merge was automatically disabled August 18, 2026 02:35

Head branch was pushed to by a user without write access

@mshustov
mshustov enabled auto-merge (squash) August 18, 2026 13:34
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.

Some public API types are not exported from @clickhouse/client since 1.23.0

4 participants