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: Make sure all types support prefix/suffix #1148

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

halkeye
Copy link
Contributor

@halkeye halkeye commented Dec 9, 2024

No description provided.

@halkeye
Copy link
Contributor Author

halkeye commented Dec 9, 2024

I'm a little scared of how big this change is. And I was trying to save some battery power so didn't run complete test suite on my laptop.

@halkeye halkeye force-pushed the typeprefix-everything branch from a41e1d5 to 29652e9 Compare December 9, 2024 08:42
@halkeye halkeye marked this pull request as ready for review December 9, 2024 09:03
@halkeye
Copy link
Contributor Author

halkeye commented Dec 9, 2024

seems to be happy.
It could be argued its a breaking change, since the apis could change, but since the google + prefix didn't compile, i don't think anyone can be using it to break for.

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.

Thanks for flushing out the coverage!

@@ -344,3 +344,7 @@ async function readPackageJson(): Promise<any> {
return await import("../package.json" as string);
}
}

export function wrapTypeName(options: Options, name: string) {
Copy link
Owner

Choose a reason for hiding this comment

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

Great clean up!

@@ -11,7 +11,7 @@ export function generateEncoder(ctx: Context, typeName: string): Code {
}

if (name == "Timestamp") {
const TimestampValue = impProto(ctx.options, "google/protobuf/timestamp", name);
const TimestampValue = impProto(ctx.options, "google/protobuf/timestamp", wrapTypeName(ctx.options, name));
Copy link
Owner

Choose a reason for hiding this comment

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

Ah sure, makes sense we need to wrap all of these imports 👍

@stephenh stephenh merged commit ddf2122 into stephenh:main Dec 9, 2024
6 checks passed
stephenh pushed a commit that referenced this pull request Dec 9, 2024
# [2.6.0](v2.5.1...v2.6.0) (2024-12-09)

### Features

* Make sure all types support prefix/suffix ([#1148](#1148)) ([ddf2122](ddf2122))
@stephenh
Copy link
Owner

stephenh commented Dec 9, 2024

🎉 This issue has been resolved in version 2.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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