Skip to content
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

Re-export bufbuild_es message types #466

Open
thesiti92 opened this issue Feb 16, 2023 · 3 comments
Open

Re-export bufbuild_es message types #466

thesiti92 opened this issue Feb 16, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@thesiti92
Copy link

Is your feature request related to a problem? Please describe.
What's the problem? For example, "I'm always frustrated when..."

Right now its annoying to keep a top level @buf/<repo>.bufbuild_connect-web package's version of its bufbuild_es packages in sync with another top level @buf/<repo>.bufbuild_es package's version of the same types. We want to use the protobuf types as interfaces for redux state, etc...

When using mainline protos its not a huge issue since they have real versions with commit hashes to match up, but right now we're working with draft protos where the package.json versions for them are

    "@buf/repo.bufbuild_connect-web": "trunk",
    "@buf/repo.bufbuild_es": "trunk",

Describe the solution you'd like

It would make all this package nonsense way easier if you guys could just reexport the contents of the @buf/<repo>.bufbuild_es package from a subdirectory or something.

Describe alternatives you've considered

Alternatively, you guys could have some yarn recipe for keeping them in sync.

Additional context
were using draft protos to follow our staging api's protos (mainline trunk) and when a feature branch is cut then we publish the mainline protos to bsr.

@thesiti92 thesiti92 added the enhancement New feature or request label Feb 16, 2023
@thesiti92
Copy link
Author

just moved to local generation for now, but in the future this feature would make the remote plugins way easier to use in node

@timostamm
Copy link
Member

@thesiti92, for the eliza module, this path imports the service:

@buf/bufbuild_eliza.bufbuild_connect-es/buf/connect/demo/eliza/v1/eliza_connect.js

And this path imports the messages:

@buf/bufbuild_eliza.bufbuild_es/buf/connect/demo/eliza/v1/eliza_pb.js

Are you suggesting that the first path also re-exports all messages from the second path, so that you only have to import from the first path in your application code?

@thesiti92
Copy link
Author

Yeah that would be convenient. Keeping the @buf/bufbuild_eliza.bufbuild_es and @buf/bufbuild_eliza.bufbuild_connect-web package versions in sync is a pain when you are using draft protos since the version in the package json is pinned to <draft-name> and not a real package version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants