Conversation
Introduce a TypeScript tableau loader generator (protobuf-es backed), mirroring the existing Go/C#/C++ loaders, together with its test harness and the toolchain/CI plumbing needed to build and test it. Generator (cmd/protoc-gen-ts-tableau-loader): main/messager/hub plugin entrypoints and the embedded runtime (load/messager/util .pc.ts + hub template); typed map getters, Hub with name filter, JSON/BIN formats and patch loading (MERGE/REPLACE, LoadMode ALL/ONLY_MAIN/ONLY_PATCH); helper package for naming/type mapping; expose the TS option in internal/options. Test harness (test/ts-tableau-loader): buf.gen + tsconfig + package manifests and generated loaders; smoke.ts covering hub load, nested map getters, string/int keys, filter, BIN load, patch MERGE/REPLACE golden compare, ONLY_MAIN/ONLY_PATCH modes and BIN load failure. Toolchain & CI: devcontainer + make.py install Node via NodeSource (apt/dnf) and brew node@, pin NODE_VERSION (major) in versions.env; add testing-ts/release-ts GitHub workflows; update test_make.py, README and CLAUDE.md accordingly.
- testing-ts: narrow node-version matrix to the pinned LTS (20) only. - test_make: normalize Windows npm.cmd shim to npm in TS dry-run asserts. - remove the _lab/ts proof-of-concept and its .gitignore entry.
…th shared harness Reorganize the TS test suite into per-feature files (load/get/ordered_map/index) backed by a shared harness, and refresh the protoc-gen-ts-tableau-loader generator and generated tableau sources accordingly.
- ts: move custom_item_conf.ts out of tests/ into a dedicated custom/ dir (matches C# custom/, Go customconf/), update tsconfig include and import path - csharp: drop TaskConf filter from shared HubFixture so it is a full load equivalent to Go/C++/TS; cover HubOptions.Filter via an isolated Hub_Filter_LoadsOnlyMatchingMessagers test
…dedup across loaders - add internal/genhelper with shared file-header (ProtocVersion/header) and map-key (MapKey/MapKeySlice) helpers - replace per-loader duplicated helper code (cpp/csharp/go/ts) by reusing the shared genhelper package - ts: extract barrel logic into barrel.go; add reserved-keyword handling (helper/keyword.go) - csharp: drop unused gen/messagerName params from genMessage/genMapGetters/generateFileContent - remove obsolete cmd/protoc-gen-go-tableau-loader/helper.go
…oss loaders Define a single generic genhelper.MapKeySlice[F ParamFormatter] carrying all shared methods (AddMapKey/GenGetParams/GenGetArguments/GenCustom/ GenOtherArguments). Each loader only provides a zero-size ParamFormatter and aliases the slice, removing duplicated per-language definitions. The TS loader drops its MapKey wrapper/NeedToString field (derived from Type via IndexExpr) to reuse the same generic. Inline the former global helpers as MapKeySlice[F] methods. Generated output is byte-for-byte unchanged.
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.
What
Adds a TypeScript tableau loader code generator,
protoc-gen-ts-tableau-loader,bringing TS to parity with the existing Go / C# / C++ loaders. Built on
protobuf-es (
@bufbuild/protobufv2),it generates strongly-typed loaders from the same proto definitions.
Why
The repo already ships Go/C#/C++ loaders but had no first-class TypeScript
target. This lets TS/Node consumers load the same tableau-generated configs
with typed accessors and identical patch semantics.
Changes
Generator —
cmd/protoc-gen-ts-tableau-loadermain.go,messager.go,hub.go, plushelper/forname/type mapping.
embed/):load.pc.ts,messager.pc.ts,util.pc.ts,and the
hub.pc.ts.tpltemplate.Hubwith name filter,JSON/BINformats, and patch loading —
PATCH_MERGE/PATCH_REPLACE, withLoadMode.ALL/ONLY_MAIN/ONLY_PATCH.internal/options.Test harness —
test/ts-tableau-loaderbuf.gen.yaml,tsconfig.json, package manifests, and generated loaders.tests/smoke.ts(12 checks): hub load, int/string-keyed and nested mapgetters, filter, BIN load, patch MERGE golden compare vs
patchresult/,PATCH_REPLACE full-replace,
ONLY_MAIN/ONLY_PATCH, and BIN load failure.Toolchain & CI
make.pynow install Node via NodeSource (apt/dnf) andbrew
node@;versions.envpinsNODE_VERSION(major).testing-ts.yml,release-ts.yml.test_make.py,README.md,CLAUDE.md.Testing
python3 -m pytest test_make.py— 117 passed.npx tsc --noEmit— clean.npx tsx tests/smoke.ts— all 12 smoke checks pass.Notes / Follow-ups
Not yet generated for TS (deferred, larger feature work): OrderedMap iteration,
Store/write-back, Context (NewContext/FromContext), custom post-load processors,
and typed-vs-generic accessor identity. These are tracked as gaps vs Go/C#.