Releases: connectrpc/connect-es
v2.0.1
What's Changed
The only noteworthy changes in this release are enhancements made to the @connectrpc/connect-migrate package.
The migration tool now handles additional scenarios for migrating your code to Connect v2:
Transforms new
to create
:
- import { Foo } from "./foo_pb.js";
+ import { FooSchema } from "./foo_pb.js";
+ import { create } from "@bufbuild/protobuf";
- const foo = new Foo();
+ const foo = create(FooSchema);
Transforms isMessage
to use the schema:
import { isMessage } from "@bufbuild/protobuf";
- import { Foo } from "./foo_pb.js";
+ import { FooSchema } from "./foo_pb.js";
- isMessage(1, Foo);
+ isMessage(1, FooSchema);
Transforms the static fromBinary
, fromJson
, and fromJsonString
method calls:
- import { Foo } from "./foo_pb.js";
+ import { FooSchema } from "./foo_pb.js";
+ import { fromJson } from "@bufbuild/protobuf";
- Foo.fromJson(x, y);
+ fromJson(FooSchema, x, y);
In addition, if the message is a well-known type, the import path is updated accordingly.
For details on Connect v2, see the v2 release notes as well as the full migration guide.
- Transform class references in connect-migrate by @timostamm and @smaye81 in #1342
New Contributors
- @HermanBilous made their first contribution in #1340
Full Changelog: v2.0.0...v2.0.1
v2.0.0
What's Changed
- We're upgrading to Protobuf-ES version 2. It's the largest change in this release.
- Connect-ES no longer needs its own code generator plugin.
- We're adding support for Next.js 15, Fastify 5, and Express 5.
- We're dropping support for old versions of Node.js and TypeScript. You'll need at least Node.js 18.14.1 and TypeScript 4.9.6.
The upgrade of the Protobuf runtime brings support for Editions and new APIs for Protobuf messages with support for custom options. Messages are now plain TypeScript types, which greatly improves compatibility with the ecosystem. For example, messages can be passed from a server-side component in Next.js to a client-side component without losing any data or types. To learn more about the enhancements, see the release blog post for Protobuf-ES v2.
Tip
If you are already using Connect, see our migration guide to upgrade to version 2.
Full Changelog
- Support Fastify v5 in @connectrpc/connect-fastify by @timostamm in #1296
- Support Express v5 in @connectrpc/connect-fastify by @timostamm in #1297
- Add support for Next.js v15 by @timostamm in #1290
- Allow user-provided User-Agent request header by @polRk in #1272
- Ensure that a signal exists for a completed RPC by @timostamm in #1282
- Require HTTP/2 for the gRPC transport by @timostamm in #1279
- Replace MethodInfo with Descriptor Types by @srikrsna-buf in #1255
- Remove "credentials" option from transports by @timostamm in #1242
- Remove
createPromiseClient
andPromiseClient
by @srikrsna-buf in #1240 - Bump minimum supported TypeScript version to 4.9.5 by @timostamm in #1231
- Remove support for Node.js v16 by @timostamm in #1225
- Remove Node10 subpath fallbacks by @timostamm in #1227
- Remove protoc-gen-connect-es by @timostamm in #1224
- Swith to protobuf v2 by @srikrsna-buf in 4fa60c8
Full Changelog: v1.6.1...v2.0.0
v2.0.0-rc.3
What's Changed
This is a release candidate for version 2. See here for an introduction.
- Update makeAnyClient signature to carry type information to narrow down method kinds by @timostamm in #1292
- Support Express v5 in @connectrpc/connect-fastify by @timostamm in #1297
- Support Fastify v5 in @connectrpc/connect-fastify by @timostamm in #1296
Full Changelog: v2.0.0-rc.2...v2.0.0-rc.3
v2.0.0-rc.2
What's Changed
This is a release candidate for version 2. See here for an introduction.
To give this version a try, run npx @connectrpc/connect-migrate@rc
.
- Allow user-provided User-Agent request header by @polRk in #1272
- Add support for Next.js v15 by @timostamm in #1290
New Contributors
Full Changelog: v2.0.0-rc.1...v2.0.0-rc.2
v2.0.0-rc.1
What's Changed
This is a release candidate for version 2. See here for an introduction.
To give this version a try, run npx @connectrpc/connect-migrate@rc
.
- Fix transform for
createPromiseClient
->createClient
in connect-migrate by @paul-sachs in #1268 - Require HTTP/2 for the gRPC transport by @timostamm in #1279
- Ensure that a signal exists for a completed RPC by @timostamm in #1282
Full Changelog: v2.0.0-beta.2...v2.0.0-rc.1
v1.6.1
What's Changed
- Fix transform for
createPromiseClient
->createClient
in connect-migrate by @timostamm in #1269
Full Changelog: v1.6.0...v1.6.1
v2.0.0-beta.2
What's Changed
This is a beta release for version 2. See here for an introduction.
To give this version a try, run npx @connectrpc/connect-migrate@beta
.
- Fix gRPC-Web trailers-only response handling for server-streaming RPCs by @timostamm in #1261
- Add Connect-Query v2.0.0-beta.1 to connect-migrate by @timostamm in #1264
Full Changelog: v2.0.0-beta.1...v2.0.0-beta.2
v1.6.0
What's Changed
Promises are more widely adopted than ever before. We're renaming the function createPromiseClient
to the more succinct createClient
. For backwards compatibility, we keep the existing signature and mark it as deprecated.
After updating to this release, you can run npx @connectrpc/connect-migrate
to automatically refactor your code to import and use createClient
instead of createPromiseClient
.
- Deprecate
createPromiseClient
in favor ofcreateClient
by @srikrsna-buf in #1235 - Add a transform for
createPromiseClient
->createClient
by @srikrsna-buf in #1236 - Fix gRPC-Web trailers-only response handling for server-streaming RPCs by @timostamm in #1261
Full Changelog: v1.5.0...v1.6.0
v2.0.0-beta.1
What's changed
This is a beta release for version 2. See here for an introduction.
To give this version a try, run npx @connectrpc/connect-migrate@beta
. Note that connect-query has not been updated yet.
- Correct type inference for ConnectError#findDetails by @bhollis in #1188
- Remove Node10 subpath fallbacks by @timostamm in #1227
- Remove support for Node.js v16 by @timostamm in #1225
- Use
Stream{Request|Response}
types in interceptors for all streaming rpcs by @srikrsna-buf in #1230 - Bump minimum supported TypeScript version to 4.9.5 by @timostamm in #1231
- Don't trigger handler signal on success by @srikrsna-buf in #1234
- Add migration to v2 by @timostamm in #1142
- Add a transform for
createPromiseClient
->createClient
by @srikrsna-buf in #1236 - Remove
createPromiseClient
andPromiseClient
by @srikrsna-buf in #1240 - Bump browser versions tested on Browserstack by @timostamm in #1241
- Remove "credentials" option from transports by @timostamm in #1242
New Contributors
Full Changelog: v2.0.0-alpha.1...v2.0.0-beta.1
v1.5.0
What's Changed
- Amend RPC <-> HTTP code mappings in accordance with RFC 003 by @srikrsna-buf in #1039
- Tweak error codes according to the conformance suite by @srikrsna-buf in #1063
- Fix paths in npmignore files by @smaye81 in #1112
- Handle multiple set-cookie headers when using Node client by @tcarnes in #1155
- Add support for Next.js v14 by @smaye81 in #1159
- Fix flaky decompression error code by @timostamm in #1204
- Fix Node.js v16 error responses on HTTP1.1 by @timostamm in #1206
- Fix gRPC trailers only response by @srikrsna-buf in #1209
- Upgrade conformance tests to v1.0.3 by @srikrsna-buf in #1208
- Fix signal in handler always aborted in HTTP/1.1 by @srikrsna-buf in #1218
- Fix baseUrl without // mangling request URL on Node.js with HTTP/2 by @timostamm in #1220
- Respect headers from transport option
nodeOptions.headers
by @timostamm in #1219 - Fix error detail debug property by @timostamm in #1221
- Throw an error on missing status in gRPC and gRPC-Web transports by @srikrsna-buf in #1205
New Contributors
- @sjtucoder made their first contribution in #1109
Full Changelog: v1.4.0...v1.5.0