Feature description:
Make @bufbuild/protovalidate/gen/buf/validate/validate_pb.js an exported artifact so that it can be used by the generated code of user protobuf files.
Problem it solves or use case:
In a typical installation of protovalidate-es, there are two copies of validate_pb.js. One is inside @bufbuild/protovalidate and one is generated when users compile their proto files. The packages/example shows this as it includes its own copy in src/gen/buf/validate/validate_pb.ts. The generated JS files contains over 60KB of data describing the proto artifacts.
Proposed implementation or solution:
Allow users to replace the generated validate_pb.js with a single line:
export * from "@bufbuild/protovalidate/gen/buf/validate/validate_pb.js";
This could eventually be automated by a protoc plugin.
Contribution:
I have a PR that implements this and updates the example package.
Examples or references:
None
Additional context:
None
Feature description:
Make
@bufbuild/protovalidate/gen/buf/validate/validate_pb.jsan exported artifact so that it can be used by the generated code of user protobuf files.Problem it solves or use case:
In a typical installation of
protovalidate-es, there are two copies ofvalidate_pb.js. One is inside@bufbuild/protovalidateand one is generated when users compile their proto files. Thepackages/exampleshows this as it includes its own copy insrc/gen/buf/validate/validate_pb.ts. The generated JS files contains over 60KB of data describing the proto artifacts.Proposed implementation or solution:
Allow users to replace the generated
validate_pb.jswith a single line:This could eventually be automated by a
protocplugin.Contribution:
I have a PR that implements this and updates the
examplepackage.Examples or references:
None
Additional context:
None