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

Release 2.0.0-alpha.1 #1121

Merged
merged 2 commits into from
Jul 1, 2024
Merged

Release 2.0.0-alpha.1 #1121

merged 2 commits into from
Jul 1, 2024

Conversation

srikrsna-buf
Copy link
Member

@srikrsna-buf srikrsna-buf commented Jun 28, 2024

What's new in version 2

To support protobuf editions, @bufbuild/protobuf had to make breaking changes, more on this here. Upgrading to v2 of @bufbuild/protobuf will be breaking change for connect users.

The most notable change is that v2 doesn't require a separate plugin anymore! we only need protoc-gen-es. For most users this will be a simple change of just removing the connect plugin and changing the import path to point to the protobuf generated types:

import { createPromiseClient } from "@connectrpc/connect";
import { createConnectTransport } from "@connectrpc/connect-node";
// Before this was import { ElizaService } from "./gen/eliza_connect.js"
import { ElizaService } from "./gen/eliza_pb.js";

// Alternatively, use createGrpcTransport or createGrpcWebTransport here
// to use one of the other supported protocols.
const transport = createConnectTransport({
  httpVersion: "2",
  baseUrl: "https://localhost:8443",
  nodeOptions: { rejectUnauthorized },
});

const client = createPromiseClient(ElizaService, transport);
const res = await client.say({ sentence });

Please note that this is an alpha release, and APIs might still change. We're also missing documentation yet. But if you want to try it out, we welcome your feedback!

This release is published with the alpha tag. To install the alpha packages, you can run:

npm install @connectrpc/connect@alpha @bufbuild/protobuf@beta @bufbuild/protoc-gen-es@beta

Signed-off-by: Sri Krishna Paritala <skrishna@buf.build>
@srikrsna-buf srikrsna-buf merged commit 4378268 into v2 Jul 1, 2024
19 checks passed
@srikrsna-buf srikrsna-buf deleted the sk/alpha-release branch July 1, 2024 14:45
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