Skip to content

1.19.0#760

Open
peter-leonov-ch wants to merge 10 commits into
releasefrom
main
Open

1.19.0#760
peter-leonov-ch wants to merge 10 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 description of the changes was provided to include in CHANGELOG
  • For significant changes, documentation in https://github.com/ClickHouse/clickhouse-docs was updated with further explanations or tutorials

Copilot AI and others added 10 commits May 13, 2026 22:44
Agent-Logs-Url: https://github.com/ClickHouse/clickhouse-js/sessions/7890f1af-4eac-4677-9d4c-b149521117f5

Co-authored-by: peter-leonov-ch <209667683+peter-leonov-ch@users.noreply.github.com>
…test-runner-version

Add version field to clickhouse-test-runner package so `npm publish --workspaces` doesn't crash
## Summary

The standalone `E2E Tests` workflow asserted against whatever `latest`
happened to be on npm at run time, which races against (and is decoupled
from) the actual publish. Folding it into `publish.yml` lets the e2e job
pin to the version we just published.

- **`publish.yml`**: `head` and `latest` jobs now expose
`outputs.version`. New `e2e` job (matrix Node 20/22/24) runs after
either, gated on `success`, with `PUBLISHED_VERSION` wired from the
producing job's output.
- **npm availability gate**: polls `npm view <pkg>@<version>` for
`client-common`, `client`, and `client-web` (5s × 60 attempts each)
before installing, to absorb registry/CDN propagation lag.
- **Pinned install**: `npm install
@clickhouse/client@${PUBLISHED_VERSION}` (and the two siblings) instead
of unpinned latest, so the smoke test exercises exactly what was just
published.
- **`tests/e2e/install/src/index.ts`**: dropped the
`registry.npmjs.org/dist-tags` fetch; now asserts `version.default ===
process.env.EXPECTED_VERSION`. Removes the registry dependency and the
latest-tag race entirely.
- **`.github/workflows/e2e-install.yml`**: removed.

## Checklist

- [x] 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>
Co-authored-by: peter-leonov-ch <209667683+peter-leonov-ch@users.noreply.github.com>
Thanks for asking me to work on this. I will get started on it and keep
this PR's description up to date as I form a plan and make progress.

> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Bug: parseEnumType returns escaped backslashes in enum
names instead of unescaping them</issue_title>
> <issue_description>## Bug Description
> 
> When parsing Enum types with escaped single quotes in their names
(e.g. `Enum8('f\'' = 1)`), the `parseEnumType` function returns the raw
escaped form of the name (`f\'`) instead of the unescaped form (`f'`).
> 
> ## Root Cause
> 
> In `packages/client-common/src/parse/column_types.ts`, the
`parseEnumType` function correctly identifies escape sequences to find
the closing quote, but does not unescape the extracted name:
> 
> ```ts
> // ~line 330
> const name = columnType.slice(startIndex, i)
> // name is 'f\'' (with backslash) instead of 'f'' (without)
> ```
> 
> ## Example
> 
> ```ts
> parseEnumType({ columnType: "Enum8('f\\'' = 1)", sourceType:
"Enum8('f\\'' = 1)" })
> // returns: { values: { 1: "f\\'" } }   <- includes backslash (wrong)
> // expected: { values: { 1: "f'" } }    <- unescaped (correct)
> ```
> 
> ## Related
> 
> Reported via cross-repo analysis from
ClickHouse/integrations-ai-playground#17.</issue_description>
> 
> <agent_instructions>fix this bug</agent_instructions>
> 
> ## Comments on the Issue (you are @claude[agent] in this section)
> 
> <comments>
> </comments>

---------

Co-authored-by: anthropic-code-agent[bot] <242468646+Claude@users.noreply.github.com>
Co-authored-by: Peter Leonov <peter.leonov@clickhouse.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
## 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 description of the changes was provided to
include in CHANGELOG
- [ ] For significant changes, documentation in
https://github.com/ClickHouse/clickhouse-docs was updated with further
explanations or tutorials

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
## Summary

Prepping `@clickhouse/client-common` for deprecation. Audited the types
`hyperdxio/hyperdx` imports from it (`BaseResultSet`,
`ClickHouseSettings`, `DataFormat`, `ResponseHeaders`, `ResponseJSON`,
`Row`, `ClickHouseClient`) against the re-export allowlists in
`@clickhouse/client` and `@clickhouse/client-web`. All but
`ResponseHeaders` were already exposed.

- Added `type ResponseHeaders` to the common re-export blocks in
`packages/client-node/src/index.ts` and
`packages/client-web/src/index.ts`.

## Checklist

- [x] 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>
Two test files contained the same typo in a comment describing
TextDecoder flush behavior. Comment-only change, no test logic affected.

## 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 description of the changes was provided to
include in CHANGELOG
- [ ] For significant changes, documentation in
https://github.com/ClickHouse/clickhouse-docs was updated with further
explanations or tutorials

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 27, 2026 13:40
@peter-leonov-ch peter-leonov-ch requested a review from mshustov as a code owner May 27, 2026 13:40
@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.

@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.
2 out of 4 committers have signed the CLA.

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

@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

❌ Patch coverage is 86.95652% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/client-common/src/parse/column_types.ts 86.95% 2 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

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

Release prep for 1.19.0: bumps all published package versions, adds a breaking-change CHANGELOG entry for enum-name unescaping in parseEnumType, re-exports ResponseHeaders from the Node and Web packages, replaces the standalone e2e-install.yml workflow with an e2e job in publish.yml that pins the just-published version, restructures the Node coding/troubleshooting skill docs, and adds a version/pack field to the private clickhouse-test-runner workspace so npm publish --workspaces doesn't crash.

Changes:

  • Version bump to 1.19.0 across client-common/client-node/client-web and lockfile, plus ResponseHeaders re-exports.
  • Enum parser now unescapes \', \\, \n, \t, \r in enum names, with new tests, updated fixtures, and a CHANGELOG breaking-change entry.
  • Publish workflow gains a downstream e2e job that waits for the new version on npm and verifies it against a tiny consumer; the old e2e-install.yml is removed. Skills docs are heavily restructured and per-skill evals/evals.json files are deleted.

Reviewed changes

Copilot reviewed 32 out of 33 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/client-common/src/parse/column_types.ts Adds unescapeEnumName and applies it in parseEnumType.
packages/client-common/tests/unit/parse_column_types_enum.test.ts New test covering \', \n, \t, \r, \\, and mixed escapes.
packages/client-common/tests/utils/native_columns.ts Updates shared enum fixture expectations to unescaped values.
packages/client-common/package.json, packages/client-node/package.json, packages/client-web/package.json Version bump to 1.19.0 and common dep update.
packages/client-common/src/version.ts, packages/client-node/src/version.ts, packages/client-web/src/version.ts Bump exported version constant.
packages/client-node/src/index.ts, packages/client-web/src/index.ts Re-export ResponseHeaders type.
packages/client-node/tests/unit/node_getAsText.test.ts, packages/client-web/tests/unit/node_getAsText.test.ts Comment typo fix (butesbytes).
package-lock.json Lockfile bump to 1.19.0 for all three packages and test runner.
CHANGELOG.md New 1.19.0 Breaking Changes section for enum unescaping.
tests/clickhouse-test-runner/package.json Adds version/pack so workspace publish/pack doesn't crash. Contains duplicate version key (see comment).
.github/workflows/publish.yml Adds e2e matrix job that waits for PUBLISHED_VERSION on npm and validates install.
.github/workflows/e2e-install.yml Deleted; superseded by the e2e job in publish.yml.
tests/e2e/install/src/index.ts Replaces dist-tag lookup with EXPECTED_VERSION-based assertion.
skills/clickhouse-js-node-coding/SKILL.md and reference/*.md Major rewrite/trim of skill guidance (params, sessions, ping, data-types, formats, async-insert, custom-json, etc.).
skills/clickhouse-js-node-coding/evals/evals.json, skills/clickhouse-js-node-troubleshooting/evals/evals.json Eval suites deleted.

Comment on lines 4 to +34
@@ -10,6 +11,7 @@
"clickhouse-js-test-runner": "./dist/main.js"
},
"scripts": {
"pack": "true",
"build": "rm -rf dist && tsc -p tsconfig.build.json && chmod +x dist/main.js",
"typecheck": "tsc --noEmit",
"lint": "eslint --max-warnings=0 .",
@@ -28,5 +30,6 @@
"typescript": "^5.9.3",
"typescript-eslint": "^8.57.0",
"vitest": "^4.0.16"
}
},
"version": "1.19.0"
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.

7 participants