Skip to content

[Feature Request] Export generated validate proto artifacts #151

Description

@newyankeecodeshop

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions