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

feat: add unrecognizedEnumName and unrecognizedEnumValue options #946

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

vecerek
Copy link
Contributor

@vecerek vecerek commented Oct 10, 2023

Implements #944.

@vecerek vecerek force-pushed the extend-unrecognized-enum-options branch from 5eaeb5e to 9d962df Compare October 10, 2023 07:59
@vecerek vecerek force-pushed the extend-unrecognized-enum-options branch from 9d962df to 9e64722 Compare October 10, 2023 08:02
Copy link
Owner

@stephenh stephenh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @vecerek , thank you!

@@ -32,17 +32,21 @@ export function generateEnum(
const info = sourceInfo.lookup(Fields.enum.value, index);
const valueName = getValueName(ctx, fullName, valueDesc);
const memberName = getMemberName(ctx, enumDesc, valueDesc);
if (valueDesc.number === options.unrecognizedEnumValue) {
unrecognizedEnum = { present: true, name: memberName };
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat!

@stephenh stephenh merged commit cd61e90 into stephenh:main Oct 10, 2023
6 checks passed
stephenh pushed a commit that referenced this pull request Oct 10, 2023
# [1.161.0](v1.160.0...v1.161.0) (2023-10-10)

### Features

* add unrecognizedEnumName and unrecognizedEnumValue options ([#946](#946)) ([cd61e90](cd61e90))
@stephenh
Copy link
Owner

🎉 This PR is included in version 1.161.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@vecerek vecerek deleted the extend-unrecognized-enum-options branch October 10, 2023 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants