Cherry-pick fix for TS module names #20
Merged
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.
Original PR:
grpc-ecosystem#43
f1dcbfc (2024-05-11 17:06:36 -0700)
update readme
233a149 (2024-05-11 17:05:50 -0700)
fix: invalid TS module name for proto files with dash or dot chars
Fixes grpc-ecosystem#42
The fix patches
data.GetModuleName
func to return a camel cased string to be used as a unique module name in TS artifacts. Here we replace manual conversion of a package name and base file name withToCamel
func of thegithub.com/iancoleman/strcase
package. This helper package has already been included in go.mod.ToCamel
removes.
,-
,_
or whitespace chars from the input string and uses those as a mark to capitalize the next letter.Code review reminders, by giving a LGTM you attest that: