Skip to content

Conversation

@timostamm
Copy link
Member

This release switches the code generator from Golang to a TypeScript implementation. There are breaking changes in the generated code and in the reflection API.

New features

  • createDescriptorSet() provides a nice way to inspect a set of google.protobuf.FileDescriptorProto
  • @bufbuild/protoplugin provides an early version of an API to write your own code generator plugins in TypeScript

API changes

  • class TypeRegistry is deprecated. Please use createRegistry() instead.
  • class DescriptorRegistry has been replaced by createRegistryFromDescriptors(). The old version is still available as class LegacyDescriptorRegistry
  • class DescriptorSet has been replaced by createDescriptorSet(). The old version is still available as class LegacyDescriptorSet.
  • The signatures of makeEnum(), setEnumType() and makeEnumType() have changed slightly for improved enum value names.

Changes in the generated code

  • The code generator can no longer be installed via go.
  • The logic for stripping shared enum prefixes (see docs) has improved for some edge cases, and enum value names in those edge cases will differ.
  • There are other minor changes, but they are not breaking. See Port the code generator to TypeScript #159 for details.

Also: Update protoc-gen-es to include version from its package.json
@timostamm timostamm requested review from a team, renahlee and seankimdev July 22, 2022 12:15
@timostamm timostamm merged commit d7e409a into main Jul 22, 2022
@timostamm timostamm deleted the tstamm/release-0.0.9 branch July 22, 2022 14:11
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

Successfully merging this pull request may close these issues.

3 participants