Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: kebab-cases type names not correctly converted to PascalCase #1244

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

rassie
Copy link
Contributor

@rassie rassie commented Nov 7, 2023

In kebab-case, the dash character is supposed to separate words, which is currently not reflected in normalizeTypeName. Currently, kebab-cased type names like "name-type" are converted to "Nametype" instead of more expected "NameType". This patch adds a pre-processing step which handles kebab-case first.

BREAKING CHANGE: kebab-cased type names like name-type were converted to Nametype. Now they are converted to NameType.

@rassie rassie changed the title Properly convert kebab-cases types to PascalCase feat: Properly convert kebab-cases types to PascalCase Nov 7, 2023
In kebab-case, the dash character is supposed to separate words, which is currently not reflected in
`normalizeTypeName`. Currently, kebab-cased type names like "name-type" are converted to "Nametype" instead of more
expected "NameType". This patch adds a pre-processing step which handles kebab-case first.

Signed-off-by: Nikolai Prokoschenko <nikolai.prokoschenko@kurzdigital.com>
auto-merge was automatically disabled November 7, 2023 08:26

Head branch was pushed to by a user without write access

@mrgrain mrgrain changed the title feat: Properly convert kebab-cases types to PascalCase fix: kebab-cases type to PascalCase Nov 16, 2023
@mrgrain mrgrain changed the title fix: kebab-cases type to PascalCase fix: kebab-cases type names not correctly converted to PascalCase Nov 16, 2023
@mrgrain mrgrain changed the title fix: kebab-cases type names not correctly converted to PascalCase fix!: kebab-cases type names not correctly converted to PascalCase Nov 16, 2023
@mrgrain
Copy link
Contributor

mrgrain commented Nov 16, 2023

Thanks for this! Nice find.

@mrgrain mrgrain added this pull request to the merge queue Nov 16, 2023
Merged via the queue into cdklabs:main with commit 3489c31 Nov 16, 2023
10 checks passed
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.

2 participants