Skip to content

feat(ts-client): support message-only protos and proto field names#130

Open
elzalem wants to merge 2 commits intomainfrom
split/ts-client
Open

feat(ts-client): support message-only protos and proto field names#130
elzalem wants to merge 2 commits intomainfrom
split/ts-client

Conversation

@elzalem
Copy link
Collaborator

@elzalem elzalem commented Mar 2, 2026

Summary

This PR extracts the TypeScript-specific work from #126. Closes #133.

Included here:

  • add message-only proto support to protoc-gen-ts-client
  • add field_names=json|proto support for TS client output
  • fix TS client generation for empty request messages
  • update TS golden coverage for the new shapes

Why

These changes are self-contained within the TypeScript generator stack and can be reviewed independently from the new cross-language generators.

What Changed

  • update cmd/protoc-gen-ts-client
  • extend internal/tsclientgen
  • adjust shared TS helpers in internal/tscommon
  • update the TS server generator integration point as needed

Tests

  • env GOTOOLCHAIN=auto go test ./internal/tsclientgen
  • env GOTOOLCHAIN=auto go build -o bin/protoc-gen-ts-client ./cmd/protoc-gen-ts-client

@elzalem elzalem requested a review from SebastienMelki March 2, 2026 19:15
@github-actions
Copy link

github-actions bot commented Mar 2, 2026

🔍 CI Pipeline Status

Lint: failure
Test: success
Coverage: success
⚠️ Build: skipped
⚠️ Integration: skipped


📊 Coverage Report: Available in checks above
🔗 Artifacts: Test results and coverage reports uploaded

@codecov
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

❌ Patch coverage is 71.42857% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 5.10%. Comparing base (917521f) to head (ea24e20).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
internal/tscommon/types.go 64.28% 10 Missing ⚠️
internal/tsclientgen/generator.go 73.68% 4 Missing and 1 partial ⚠️
internal/tsservergen/generator.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main    #130      +/-   ##
========================================
+ Coverage   3.17%   5.10%   +1.92%     
========================================
  Files         47      47              
  Lines       7485    7732     +247     
========================================
+ Hits         238     395     +157     
- Misses      7243    7305      +62     
- Partials       4      32      +28     
Flag Coverage Δ
unittests 5.10% <71.42%> (+1.92%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

ts-client: generate contracts for message-only proto files

1 participant