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

addGrpcMetadata=true import Metadata object from deprecated "grpc" package not from "@grpc/grpc-js" #356

Closed
iMitaka opened this issue Sep 1, 2021 · 3 comments

Comments

@iMitaka
Copy link
Contributor

iMitaka commented Sep 1, 2021

When we generate a types using "addGrpcMetadata=true" flag, the imported Metadata class is imported from a "grpc" package that is deprecated. It can be imported from "@grpc/grpc-js" package to not need referencing deprecated dependencies to projects.

Have to change every imp('Metadata@grpc') to imp('Metadata@@grpc/grpc-js')in project.

@stephenh
Copy link
Owner

Hi @iMitaka (and @Prashvith from the discussion thread); I'm not that close to the grpc stuff, do you think we can really just change every grpc to @grpc/grpc-js or should it be a flag for users to choose which version to use?

If it's deprecated, maybe just always use @grpc/grpc-js, and users who don't want that either don't have to upgrade ts-proto, or could request a flag to keep the old import?

@iMitaka are you interested in submitting that does the replacement? You're right, that is the new imp to use.

Thanks!

@iMitaka
Copy link
Contributor Author

iMitaka commented Sep 16, 2021

Hi, yes it is completely save just to change the strings. There is no reason to extend feature to choose, because 'grpc' is deprecated, just replacing will do the job.

#362

@stephenh
Copy link
Owner

Fixed in #362, which is merged and released. Thanks @iMitaka !

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

No branches or pull requests

2 participants