Skip to content

Releases: bufbuild/protobuf-es

v2.2.2

01 Nov 14:26
e7577b2
Compare
Choose a tag to compare

What's Changed

  • Print diagnostics when a protoplugin fails to emit files by @will-wow in #1003
  • Fix JSON types for fields with uncommon json_name by @nicole0707 in #1004

New Contributors

Full Changelog: v2.2.1...v2.2.2

v2.2.1

28 Oct 16:51
31ece2d
Compare
Choose a tag to compare

What's Changed

  • Support target prefix in plugin option rewrite_imports @timostamm in #998

Full Changelog: v2.2.0...v2.2.1

v2.2.0

08 Oct 15:10
956229b
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v2.1.0...v2.2.0

v2.1.0

18 Sep 15:19
c3ba54e
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.0.0...v2.1.0

v2.0.0

30 Jul 16:12
76cbbc1
Compare
Choose a tag to compare

What's new in version 2

To support Protobuf editions, we have to make breaking changes that also affect users of proto2 and proto3. This prompted us to make more extensive changes that take feedback from version 1 into account:

We no longer use classes. Instead, we generate a schema object and a type for every message. To create a new instance, to serialize, and for other concerns, we provide functions. Here is a simple example:

import { create, toBinary } from "@bufbuild/protobuf";
import { UserSchema } from "./gen/example_pb";

let user = create(UserSchema, {
  firstName: "Homer",
  lastName: "Simpson",
  active: true,
});

const bytes = toBinary(UserSchema, user);

If you use proto3, messages are now plain objects. Files with proto2 and editions use the prototype chain to track field presence.

This approach solves several outstanding issues, such as:

  • #397 Provide custom options at runtime
  • #551 Generated types allow assigning wrong message type if it is a superset of the target type
  • #414 Improvements for proto2 required
  • #738 type-save full enum value names
  • #928 Better interop with 3rd party frameworks requiring plain objects
  • #508 JSON types

Tip

Take a look at the upgrade guide to learn more.

Note

Connect-ES does not support version 2 yet. We will update it shortly.

Contributors

Thanks to @srikrsna-buf for his contributions to v2!

v2.0.0-beta.3

23 Jul 14:06
d4e6715
Compare
Choose a tag to compare
v2.0.0-beta.3 Pre-release
Pre-release

What's Changed

This is the third beta release for version 2. See v2.0.0-alpha.1 for an introduction. To install beta packages, run npm install @bufbuild/protobuf@beta @bufbuild/protoc-gen-es@beta.

Full Changelog: v2.0.0-beta.2...v2.0.0-beta.3

v2.0.0-beta.2

26 Jun 14:57
3bb20e0
Compare
Choose a tag to compare
v2.0.0-beta.2 Pre-release
Pre-release

What's Changed

This is the second beta release for version 2. See v2.0.0-alpha.1 for an introduction. To install beta packages, run npm install @bufbuild/protobuf@beta @bufbuild/protoc-gen-es@beta.

Full Changelog: v2.0.0-beta.1...v2.0.0-beta.2

v2.0.0-beta.1

24 Jun 15:44
793ff3b
Compare
Choose a tag to compare
v2.0.0-beta.1 Pre-release
Pre-release

What's Changed

This is the first beta release for version 2. See v2.0.0-alpha.1 for an introduction. To install beta packages, run npm install @bufbuild/protobuf@beta @bufbuild/protoc-gen-es@beta.

Full Changelog: v2.0.0-alpha.4...v2.0.0-beta.1

v2.0.0-alpha.4

04 Jun 18:07
38bf1e5
Compare
Choose a tag to compare
v2.0.0-alpha.4 Pre-release
Pre-release

What's Changed

This is the fourth alpha release for version 2. See v2.0.0-alpha.1 for an introduction.

Full Changelog: v2.0.0-alpha.3...v2.0.0-alpha.4

v2.0.0-alpha.3

03 Jun 16:20
fff0681
Compare
Choose a tag to compare
v2.0.0-alpha.3 Pre-release
Pre-release

What's Changed

This is the third alpha release for version 2. See v2.0.0-alpha.1 for an introduction.

Full Changelog: v2.0.0-alpha.2...v2.0.0-alpha.3