fix: change style of comment in protos for protobufjs #150
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So this one is weird.
TL;DR: in this PR we convert all
//
comments to/** ... */
in all the proto files that are copied to the generated client library.In the monolith generator, we created the whole
src/v*/doc
folder (e.g. here) that was pretty much the copy of protos with comments, converted to JavaScript forjsdoc
.In the micro-generator, we don't do that. Instead, we run
pbjs
to generateprotos/protos.js
and then letjsdoc
read that file, which just works.But, I just realized that
jsdoc
does not consider//
style comments from proto files and does not copy them to the resultingprotos/protos.js
. Its documentation says here:So... we must convert the proto comments from
//
to/** ... */
to make them go into the jsdoc. Luckily, we have a great place to do that - right in the code where we copy proto files into the resulting directory. This PR does exactly that.