1.23 beta4 - #896
Merged
Merged
Conversation
…compiler prototype (#893) ## Summary Brings the standalone ClickHouse data-type parser into the npm workspace and prototypes a compiler that turns a `RowBinaryWithNamesAndTypes` header into a stream reader. ### Workspace integration - Link `@clickhouse/datatype-parser` into the npm workspace (shared root install/lockfile, `lint`/`typecheck`/`build` scripts, eslint config matching the other packages). - Relocate the TS parser to `packages/datatype-parser` alongside the other packages; the C++ source it was ported from now lives at `packages/datatype-parser/reference-cpp-extracted-parser`. - Fix path references (README link, `repository.directory`) and exclude the C++ reference dir from ESLint (its CMake `build/` tree emits `compiler_depend.ts` files). ### RowBinary header compiler (prototype) - New `src/compile.ts` in the rowbinary skill: read the `RowBinaryWithNamesAndTypes` header, parse each column type string into an AST via `@clickhouse/datatype-parser`, **fold the AST into a tree of combinator calls** (`readArray(readNullable(readUInt32))`, `readMap(...)`, `readTupleNamed(...)`, …), and return a reader for the rest of the stream. - No codegen/monomorphization yet — just the faithful AST → combinator fold, mirroring `readDynamicType`'s type→Reader mapping. - Offline tests with a tiny `RowBinaryWithNamesAndTypes` encoder (no server needed). ### Notes - The parser is wired into the skill as a **local `file:` dependency** (prototype-grade — the parser is not yet published to npm; this can't publish as-is). - Variant alternative ordering relies on the server normalizing alternatives to sorted-type-name order in the header type string. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
## Summary Adds `.github/workflows/publish-datatype-parser.yml`, an independent manual publish + release workflow for the standalone `@clickhouse/datatype-parser` package. It's a clone of `publish-skill-rowbinary-parser.yml` adapted for the new package. Like the rowbinary workflow, this is **not** part of the lockstep workspace release (`publish.yml`): the package carries its own version in `packages/datatype-parser/package.json` and ships on its own cadence, dispatched manually from the protected `release` branch. ## Changes vs. the rowbinary clone - **Working dir**: `packages/datatype-parser` - **Smoke tests**: this package has only a `.` export (no subpaths), so the pre-publish and e2e smoke tests import `@clickhouse/datatype-parser` and assert `parseDataType` is a function (dropped the `/integers` / `readUInt8` / `readRows` checks) - **Git tag prefix**: `datatype-parser-v*` - Header comment updated; dropped the rowbinary-specific "copies repo-root LICENSE" note (this package ships its own `LICENSE`) Unchanged: release-branch guard, npm OIDC + provenance, Node 24 build / 20·22·24 e2e matrix, registry poll. ## Notes As with the rowbinary workflow, this assumes the version in `package.json` is bumped manually before dispatching, and that it's run from the `release` branch. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
## Summary Updates the `@clickhouse/datatype-parser` dependency in the `clickhouse-js-node-rowbinary-parser` skill from `^0.1.1` to `^0.1.2`, matching the current in-repo `packages/datatype-parser` version. - **`package.json`** — dependency range `^0.1.1` → `^0.1.2`. - **`package-lock.json`** — root requirement plus the `@clickhouse/datatype-parser` entry (`version`, `resolved`, `integrity`) updated to 0.1.2. Integrity derived from an `npm pack` of the in-repo workspace on Node 24 (matching the publish workflow), so it should match the registry publish. Note: `0.1.2` is not yet on npm — this is intended to land alongside the datatype-parser publish workflow run, consistent with the standalone-package release flow. The skill's CI exercises the parser via a locally-packed tarball (`npm install <tarball> --no-save`), which verifies against this checkout. ## Checklist - [ ] 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>
|
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✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A short description of the changes with a link to an open issue.
Checklist
Delete items not relevant to your PR: