Skip to content

Docs: guide for building alternative-runtime/protocol clients#788

Open
Copilot wants to merge 1 commit into
mainfrom
copilot/create-specialized-clients
Open

Docs: guide for building alternative-runtime/protocol clients#788
Copilot wants to merge 1 commit into
mainfrom
copilot/create-specialized-clients

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 1, 2026

Summary

Adds ALTERNATIVE_CLIENTS.md to encourage and streamline third-party clients for other runtimes (Bun, Cloudflare Workers, …) and protocols (native TCP, gRPC-over-proxy, …) now that @clickhouse/client-common is being deprecated and there is no replacement shared package.

  • New ALTERNATIVE_CLIENTS.md (root) covering:
    • Why @clickhouse/client-common is going away (versioning + bundling pain) and that shared code is being inlined into each runtime package rather than relocated to a new shared folder/package — new clients should copy what they need, not depend on a shared package.
    • Recommended workflow: fork packages/client-node or packages/client-web in place (whichever is closest to the target runtime), iterate until it works, then rename the directory to e.g. packages/my-native-client, update package.json#name, and open a PR.
    • Request to preserve commit history (no squash/rewrite) so the diff against the upstream package stays analyzable for reviewers and future syncs.
    • Strong nudge to open an issue and discuss the design first before significant work.
    • Pre-PR checklist (issue exists, no client-common dep, history preserved, tests, build/lint pass).
  • README.md: link the new doc from the Contributing section.

Checklist

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

@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 sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Comment thread ALTERNATIVE_CLIENTS.md
runtimes (Cloudflare Workers, Vercel Edge, Deno Deploy, browser
extensions, etc.).
2. Edit that package in place until you have something working end-to-end for
your target runtime/protocol. Run the existing tests against it, adjust
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
your target runtime/protocol. Run the existing tests against it, adjust
your target runtime/protocol. Run the existing tests (where applicable) against it, adjust

@peter-leonov-ch peter-leonov-ch marked this pull request as ready for review June 1, 2026 07:35
Copilot AI review requested due to automatic review settings June 1, 2026 07:35
@peter-leonov-ch peter-leonov-ch requested a review from mshustov as a code owner June 1, 2026 07:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds documentation to guide contributors who want to create specialized ClickHouse JS clients for alternative runtimes (e.g., Bun, Cloudflare Workers) and/or alternative protocols, and links that guide from the main README.

Changes:

  • Added a new root doc (ALTERNATIVE_CLIENTS.md) describing a recommended workflow for building and contributing alternative-runtime/protocol clients.
  • Updated README.md to link to the new guide from the Contributing section.

Reviewed changes

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

File Description
README.md Adds a link to the new alternative clients guide from the Contributing section.
ALTERNATIVE_CLIENTS.md Introduces a contributor-facing guide for building/porting specialized clients and submitting them upstream.

Comment thread ALTERNATIVE_CLIENTS.md
Comment on lines +29 to +42
That package is being **deprecated**. The motivation is to simplify versioning
across our packages and to avoid bundling/duplication issues that several
downstream users have hit.

What this means in practice:

- The shared code is **not** being moved into a new shared package; there is
no replacement package to depend on.
- Instead, the shared code is being inlined / co-located inside each runtime
package (`packages/client-node`, `packages/client-web`, …). Going forward
each runtime package is self-contained.
- If you are building a new client, you should not try to depend on a shared
package either — copy the pieces you need into your own package, the same
way `client-node` and `client-web` do.
Comment thread ALTERNATIVE_CLIENTS.md
- [ ] There is an issue / discussion describing the motivation and design.
- [ ] The new package lives under `packages/<your-client>` and has its own
`package.json` with a unique `name`.
- [ ] No dependency on `@clickhouse/client-common` (it is deprecated).
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.

4 participants