Type names must be PascalCased. Rename "A1B" to "A1b"
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 267
- Avg merge
- 1d 25m
- Merged PRs (30d)
- 14
Description
### Describe the bug
When terraform modules contain a number followed by a single letter (eg. a1b, k8s, another2e, etc) an error is throw when executing `cdktf get`:
`Type names must be PascalCased. Rename "A1B" to "A1b"`
### Expected Behavior
When executing `cdktf get`, the toPascalCase must handle this edge case and capitalise the single letter after the number (e.g. A1B, K8S) and the command must compile the modules and exit 0.
### Current Behavior
When executing `cdktf get` the following is thrown:
`Type names must be PascalCased. Rename "A1B" to "A1b"`
### Reproduction Steps
- Create a cdktf project with template Python
- Add a terraformModule to cdktf.json with a name that ends with a number and 1 letter.
- run `cdktf get`
### Possible Solution
the function cokemaker.toPascalCase should capitalise that last letter in all cases
### Additional Information/Context
_No response_
### SDK version used
0.15.5
### Environment details (OS name and version, etc.)
MacOS 12.6.5
Contributor guide
Research direction
Start by locating the toPascalCase function used during cdktf get and reproduce the issue with a module name ending in a number and one letter, such as A1B or K8S. Verify that the generated type name passes PascalCase validation and that cdktf get completes successfully with exit code 0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100