1.19.0#760
Conversation
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
chore: bump version to 1.19.0
## 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>
|
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:
For more information about GitHub Code Scanning, check out the documentation. |
|
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
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.0acrossclient-common/client-node/client-weband lockfile, plusResponseHeadersre-exports. - Enum parser now unescapes
\',\\,\n,\t,\rin enum names, with new tests, updated fixtures, and a CHANGELOG breaking-change entry. - Publish workflow gains a downstream
e2ejob that waits for the new version on npm and verifies it against a tiny consumer; the olde2e-install.ymlis removed. Skills docs are heavily restructured and per-skillevals/evals.jsonfiles 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 (butes → bytes). |
| 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. |
| @@ -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" | |||
Summary
A short description of the changes with a link to an open issue.
Checklist
Delete items not relevant to your PR: