typescript: migrate protobuf bindings from protoc-gen-ts to protobuf-es#361
Merged
typescript: migrate protobuf bindings from protoc-gen-ts to protobuf-es#361
Conversation
Replace google-protobuf/protoc-gen-ts with @bufbuild/protobuf/protoc-gen-es for TypeScript protobuf code generation. This is a breaking change for downstream consumers — the generated API changes from class-based (new scip.Index(), .serialize(), .deserialize()) to schema-based (create(IndexSchema), toBinary(), fromBinary()). Changes: - buf.gen.yaml: replace ts plugin with es plugin (target=ts) - package.json: swap deps, remove yarn, switch to npm + package-lock.json - tsconfig.json: update for ES2020 module/bundler resolution - checks.nix: use buildNpmPackage with npmDepsHash instead of fetchYarnDeps - flake.nix: use protoc-gen-es from nixpkgs, remove yarn from proto-generate - Generated scip_pb.ts replaces scip.ts + scip.js
This file contains hidden or 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
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.
We do not publish these bindings to
npmpackage registry, so I doubt it will break anything for end users.protobuf-esis the mainstream way to generate Typescript bindings and is developed bybuf(which we use already for the generation process).