-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add GeneratedFile.jsDoc() and other features to @bufbuild/protoplugin #649
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…d/protoplugin/ecmascript
…bufbuild/protoplugin/ecmascript as a more flexible replacement
We can't test for leading or trailing whitespace otherwise. Instead, just remove a final newline at the end before we split, so we don't have an extra line.
So we can add more control over supported features for editions
timostamm
added a commit
to connectrpc/connect-es
that referenced
this pull request
Dec 7, 2023
smaye81
approved these changes
Dec 7, 2023
Merged
smaye81
added a commit
that referenced
this pull request
Dec 12, 2023
## What's Changed * Add CommonJS support as a plugin option by @timostamm in [#648](#648) * Add `GeneratedFile.jsDoc()` and other features to `@bufbuild/protoplugin` by @timostamm in [#649](#649) **Full Changelog**: v1.5.1...v1.6.0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Since we added
exportDecl
to toGeneratedFile
in #648, it makes sense to add some more convenience methods to make the features more discoverable and require less imports:GeneratedFile.string
replaces the now deprecatedliteralString
from@bufbuild/protoplugin/ecmascript
.GeneratedFile.jsDoc
replaces the now deprecatedmakeJsDoc
andcreateJsDocBlock
from@bufbuild/protoplugin/ecmascript
.GeneratedFile.export
is now deprecated, as it turned out that it has little use in practice. Instead, we exportcreateImportSymbol
from@bufbuild/protoplugin/ecmascript
now, which is much more flexible.Schema
has always been available from@bufbuild/protoplugin
and@bufbuild/protoplugin/ecmascript
, even though it is very much specific to ECMAScript. The former export is now deprecated.As a diff, these are the changes you should make as a plugin author, to avoid the deprecated types: