fix(ts): align TS camelCase with Rust heck for digit-letter ids#4571
Merged
jamie-osec merged 6 commits intoMay 28, 2026
Conversation
0x4ka5h
requested changes
May 20, 2026
0x4ka5h
left a comment
Collaborator
There was a problem hiding this comment.
heck::to_lower_camel_case treats A1B as a1b but the current prs toCamelCase results with a1B. Can you fix this one?
0x4ka5h
requested changes
May 21, 2026
Collaborator
|
can you address CI failures? |
2ecfdb7 to
e56abb4
Compare
…or consistent IDL conversion
…ansitions correctly and add corresponding tests
e56abb4 to
9e64c82
Compare
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
Rust IDL generation uses
heck::to_lower_camel_case, but the TS package re-camelCases identifiers via the npmcamelcaselibrary. The two disagree on digit-letter boundaries: heck treatsa1b_receiveas a single word producinga1bReceive, while npmcamelcasesplits at the digit-letter transition and emitsa1BReceive. AfterconvertIdlToCamelCaseran on the IDL at runtime, the methods namespace ended up keyed bya1BReceivewhile TS types (also generated via heck) expecteda1bReceive. The same mismatch on instruction args caused user-supplied{ myA1bParam: ... }to be looked up asmyA1bParamand miss the runtime field — silently encodingPublicKey.default(111...) for any_a1b_-style parameter.Closes #3043