NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #2314 most downloaded on npm
Protocol Buffers for ECMAScript. Fully compliant with the Protobuf conformance tests.
Last release 5 days ago
29 Sep 2026
Ships fairly regularly
a new release about every 4 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
80 releases · first in 2022
One column per quarter.
Round JSON float32 values to float32 precision before range checks by @YuEfSaEDU in #1536
Full Changelog: v2.15.0...v2.16.0
Add plugin option map_imports to point imports at packages by @anuraaga in #1528
Full Changelog: v2.14.1...v2.15.0
This release deprecates configureTextEncoding() from @bufbuild/protobuf/wire . If you run @bufbuild/protobuf in an environment that does not provide t…
This release deprecates configureTextEncoding() from @bufbuild/protobuf/wire. If you run @bufbuild/protobuf in an environment that does not provide the Text Encoding API, please migrate to a polyfill that installs TextEncoder (with the methods encode and optionally encodeInto) and TextDecoder (with the fatal: true constructor argument and the decode method) on globalThis instead. Please see #1517 for the rationale.
Full Changelog: v2.14.0...v2.14.1
This is a performance release of protobuf-es. We've made substantial improvements to the runtime, while also reducing bundle size by 5%. Here are the
This is a performance release of protobuf-es. We've made substantial improvements to the runtime, while also reducing bundle size by 5%. Here are the results from our benchmarks (compared against v2.13.0):
| fixture | toBinary | fromBinary | toJson | fromJson |
|---|---|---|---|---|
| general | 4.66x | 1.46x | 2.29x | 1.67x |
| scalar | 2.91x | 1.96x | 1.74x | 1.64x |
| repeated-scalar | 4.37x | 1.53x | 3.06x | 1.65x |
| map-scalar | 4.43x | 1.44x | 2.42x | 2.28x |
| repeated-message | 5.27x | 1.89x | 1.71x | 1.63x |
| map-message | 5.21x | 1.95x | 1.81x | 1.66x |
| user-tiny | 1.44x | 1.99x | 1.49x | 1.50x |
| user-normal | 5.24x | 1.99x | 2.33x | 2.03x |
Individual changes are below:
Full Changelog: v2.13.0...v2.14.0
Add support for the Protobuf Text Format by @timostamm in #1450
Full Changelog: v2.12.1...v2.13.0
Add GitHub publish workflow with trusted publishing by @ajeetdsouza in #1406
Full Changelog: v2.12.0...v2.12.1
Gracefully handle Number for BigInt fields by @timostamm in #1346
exactOptionalPropertyTypes by @haines in #1371utf8_validation by @emcfarlane in #1386Full Changelog: v2.11.0...v2.12.0
Support Bun by @timostamm in #1343
elide_plugin_version=true by @timostamm in #1336Full Changelog: v2.10.2...v2.11.0
Update to protocolbuffers/protobuf v33.2 by @timostamm in #1308
google.protobuf.Value.null_value in map values in ProtoJSON by @timostamm in #1314Full Changelog: v2.10.1...v2.10.2
Update @typescript/vfs to version 1.6.2 by @Yovach in #1274
Cache list of sorted fields in WeakMap by @cptpcrd in #1240
Full Changelog: v2.9.0...v2.10.0
Support Deno by @timostamm in #1233
Add support for Edition 2024 by @timostamm in https://github.com/bufbuild/protobuf-es/pull/1228
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v2.7.0...v2.8.0
> TypeScript 5.9 includes breaking changes to lib.d.ts, forcing us to change return types for some functions from Uint8Array to Uint8Array . See #1200…
[!IMPORTANT]
TypeScript 5.9 includes breaking changes to lib.d.ts, forcing us to change return types for some functions from
Uint8ArraytoUint8Array<ArrayBuffer>. See #1200 for details.
Uint8Array to Uint8Array<ArrayBuffer> by @timostamm in https://github.com/bufbuild/protobuf-es/pull/1200Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v2.6.3...v2.7.0
Fix maps field parsing from binary by @joeycumines-scw in https://github.com/bufbuild/protobuf-es/pull/1183
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v2.6.2...v2.6.3
Update Valid types for protovalidate v0.14.0 by @timostamm in https://github.com/bufbuild/protobuf-es/pull/1173
round instead of ceil when converting Timestamp to milliseconds by @srikrsna-buf in https://github.com/bufbuild/protobuf-es/pull/1178Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v2.6.1...v2.6.2
Fix closed enum parsing by @timostamm in https://github.com/bufbuild/protobuf-es/pull/1170
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v2.6.0...v2.6.1
Implement merge function for Protobuf messages by @timostamm in https://github.com/bufbuild/protobuf-es/pull/1154
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v2.5.2...v2.6.0
Fix Valid types for well-known types by @timostamm in https://github.com/bufbuild/protobuf-es/pull/1147
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v2.5.1...v2.5.2
Update transpile.ts to lazily construct default options by @timostamm in https://github.com/bufbuild/protobuf-es/pull/1136
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v2.5.0...v2.5.1
Provide a strong type name in the generated message schema by @timostamm in https://github.com/bufbuild/protobuf-es/pull/1131
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v2.4.0...v2.5.0
Fix regression in DescEnumValue.deprecated by @timostamm in https://github.com/bufbuild/protobuf-es/pull/1125
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v2.3.0...v2.3.1
Add function qualifiedName by @timostamm in https://github.com/bufbuild/protobuf-es/pull/1114
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v2.2.5...v2.3.0
Fix extension accessors to not discard unknown fields by @timostamm in https://github.com/bufbuild/protobuf-es/pull/1087
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v2.2.4...v2.2.5
Add more tests for serialization errors by @timostamm in https://github.com/bufbuild/protobuf-es/pull/1051
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v2.2.3...v2.2.4
Fix Any unpacking to verify types by @timostamm in https://github.com/bufbuild/protobuf-es/pull/1023
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v2.2.2...v2.2.3
Print diagnostics when a protoplugin fails to emit files by @will-wow in https://github.com/bufbuild/protobuf-es/pull/1003
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v2.2.1...v2.2.2
Support target prefix in plugin option rewrite_imports @timostamm in https://github.com/bufbuild/protobuf-es/pull/998
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v2.2.0...v2.2.1
Properly reset BinaryWriter after finish by @bhollis in https://github.com/bufbuild/protobuf-es/pull/986
DescMethod variants by @srikrsna-buf in https://github.com/bufbuild/protobuf-es/pull/985Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v2.1.0...v2.2.0
Fix assignability of wrong message type in create by @timostamm in https://github.com/bufbuild/protobuf-es/pull/972
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v2.0.0...v2.1.0
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 ch…
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:
[!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.
Thanks to @srikrsna-buf for his contributions to v2!
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@bet
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: https://github.com/bufbuild/protobuf-es/compare/v2.0.0-beta.2...v2.0.0-beta.3
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@be
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: https://github.com/bufbuild/protobuf-es/compare/v2.0.0-beta.1...v2.0.0-beta.2
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@bet
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.
typescript version in protoplugin by @srikrsna-buf in https://github.com/bufbuild/protobuf-es/pull/879Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v2.0.0-alpha.4...v2.0.0-beta.1
This is the fourth alpha release for version 2. See v2.0.0-alpha.1 for an introduction.
This is the fourth alpha release for version 2. See v2.0.0-alpha.1 for an introduction.
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v2.0.0-alpha.3...v2.0.0-alpha.4
This is the third alpha release for version 2. See v2.0.0-alpha.1 for an introduction.
This is the third alpha release for version 2. See v2.0.0-alpha.1 for an introduction.
exportDecl to export by @srikrsna-buf in https://github.com/bufbuild/protobuf-es/pull/843ecmascript subpath by @srikrsna-buf in https://github.com/bufbuild/protobuf-es/pull/857method field to DescMethod; Improve generated service types by @srikrsna-buf in https://github.com/bufbuild/protobuf-es/pull/874Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v2.0.0-alpha.2...v2.0.0-alpha.3
For deprecated elements, generate a @deprecated tag on descriptors by @timostamm in https://github.com/bufbuild/protobuf-es/pull/818
This is the second alpha release for version 2. See v2.0.0-alpha.1 for an introduction.
import_extension to none by @srikrsna-buf in https://github.com/bufbuild/protobuf-es/pull/832@deprecated tag on descriptors by @timostamm in https://github.com/bufbuild/protobuf-es/pull/818Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v2.0.0-alpha.1...v2.0.0-alpha.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 ch…
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 uses classes. Instead, we generate a type and a descriptor for every message, and provide functions to create a new instance, for serialization, and other concerns. Here is a simple example:
import { create, toBinary, fromBinary, fromJsonString } from "@bufbuild/protobuf";
import { UserDesc } from "./gen/user_pb.js";
let user = create(UserDesc, {
firstName: "Homer",
lastName: "Simpson",
active: true,
locations: ["Springfield"],
projects: { SPP: "Springfield Power Plant" },
manager: {
firstName: "Montgomery",
lastName: "Burns",
},
});
const bytes = toBinary(UserDesc, user);
user = fromBinary(UserDesc, bytes);
user = fromJsonString(UserDesc, '{"firstName": "Homer", "lastName": "Simpson"}');
This approach solves several outstanding issues, such as:
If you use proto3, messages are now plain objects. Files with proto2 and editions use the prototype chain to track field presence.
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 @bufbuild/protobuf@alpha @bufbuild/protoc-gen-es@alpha
Thanks to @srikrsna-buf for his contributions to v2!
Add mutable registry by @timostamm in https://github.com/bufbuild/protobuf-es/pull/899
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.10.0...v1.10.1
Skip null values in message initializer object by @timostamm in https://github.com/bufbuild/protobuf-es/pull/862
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.9.0...v1.10.0
Expose OneofInfo type by @q42jaap in https://github.com/bufbuild/protobuf-es/pull/746
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.8.0...v1.9.0
Deprecate field helper functions from @bufbuild/protoplugin by @timostamm in https://github.com/bufbuild/protobuf-es/pull/712
/*@__PURE__*/ annotation for better tree-shaking support by @pmzi in https://github.com/bufbuild/protobuf-es/pull/470Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.7.2...v1.8.0
Fix name collision with import in generated code by @timostamm in https://github.com/bufbuild/protobuf-es/pull/688
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.7.1...v1.7.2
Avoid parsing feature-set defaults at module initialization by @timostamm in https://github.com/bufbuild/protobuf-es/pull/683
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.7.0...v1.7.1
For plugin authors: Since extensions provide a better way to access custom options in a plugin, we are deprecating the findCustom*Option functions fro…
This release adds support for extensions, a Protobuf language feature that allows to extend a message with an additional field.
For example:
syntax = "proto2";
message User {
extensions 100 to 200;
}
extend User {
optional uint32 age = 100;
}
For the extension age, we generate a new export const age: Extension<User, number>. You can set the extension field with the function setExtension:
import { setExtension } from "@bufbuild/protobuf";
import { User, age } from "./example_pb.js";
const user = new User();
setExtension(user, age, 77);
To learn more about the details, see the API documentation.
For plugin authors: Since extensions provide a better way to access custom options in a plugin, we are deprecating the findCustom*Option functions from @bufbuild/protoplugin/ecmascript. We recommend to switch to extensions for better type safety and flexibility, see the PR for details.
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.6.0...v1.7.0
Add CommonJS support as a plugin option by @timostamm in #648
Add explicit exports for Node by @smaye81 in https://github.com/bufbuild/protobuf-es/pull/645
@bufbuild/protoplugin by @timostamm in https://github.com/bufbuild/protobuf-es/pull/644@bufbuild/protoplugin, improve error messages by @timostamm in https://github.com/bufbuild/protobuf-es/pull/642Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.5.0...v1.5.1
This release includes preliminary support for editions. Please note that it's still an experimental feature.
This release includes preliminary support for editions. Please note that it's still an experimental feature.
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.4.2...v1.5.0
Add @bufbuild/protobuf to the direct dependencies of protoc-gen-es by @timostamm in https://github.com/bufbuild/protobuf-es/pull/601
@bufbuild/protobuf to the direct dependencies of protoc-gen-es by @timostamm in https://github.com/bufbuild/protobuf-es/pull/601Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.4.1...v1.4.2
Fix Node16 module resolution with @bufbuild/protoplugin by @timostamm in https://github.com/bufbuild/protobuf-es/pull/598
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.4.0...v1.4.1
Make toPlainMessage idempotent by @haines in https://github.com/bufbuild/protobuf-es/pull/588
toPlainMessage idempotent by @haines in https://github.com/bufbuild/protobuf-es/pull/588jstype field option by @timostamm in https://github.com/bufbuild/protobuf-es/pull/592Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.3.3...v1.4.0
Add ESM wrapper to avoid dual package hazard by @timostamm in https://github.com/bufbuild/protobuf-es/pull/566
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.3.2...v1.3.3
Fix type exports and integrate arethetypeswrong by @smaye81 in https://github.com/bufbuild/protobuf-es/pull/565
arethetypeswrong by @smaye81 in https://github.com/bufbuild/protobuf-es/pull/565Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.3.1...v1.3.2
Allow number[] for bytes fields in constructor by @srikrsna-buf in #533
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.3.0..v1.3.1
Add toPlainMessage to convert Message objects to their PlainMessage variants by @srikrsna-buf in https://github.com/bufbuild/protobuf-es/pull/511
toPlainMessage to convert Message objects to their PlainMessage variants by @srikrsna-buf in https://github.com/bufbuild/protobuf-es/pull/511typeof BigInt to check for BigInt support by @lukasIO in https://github.com/bufbuild/protobuf-es/pull/488Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.2.1..v1.3.0
Improve binary read performance by @kbongort in https://github.com/bufbuild/protobuf-es/pull/459
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.2.0..v1.2.1
This release contains the following:
This release contains the following:
safeIdentifier and safeObjectProperty helpers by @dimitropoulos in #391.Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.1.1...v1.2.0
This release contains the following:
This release contains the following:
Full Changelog: https://github.com/bufbuild/protobuf-es/compare/v1.1.0...v1.1.1
This release includes the following:
This release includes the following:
This is Protobuf-ES's first stable release! It does not contain any user-facing changes.
This is Protobuf-ES's first stable release! It does not contain any user-facing changes.
Your coding agent can read these notes before it upgrades. Set up the MCP server →