Releases: bufbuild/protobuf-es
v1.2.0
This release contains the following:
Enhancements
- Add
safeIdentifier
andsafeObjectProperty
helpers by @dimitropoulos in #391.
Full Changelog: v1.1.1...v1.2.0
v1.1.1
v1.1.0
This release includes the following:
Enhancements
- Support size-delimited messages by @timostamm in #387.
Bug Fixes
- Upgrade to Protobuf v22.0 by @smaye81 in #394.
- Fix type declaration emitting when using NodeNext module resolution by @fubhy in #398.
- Strip rewrite_imports parameter by @smaye81 in #386.
New Contributors
v1.0.0
v0.5.0
This release includes the following:
🚨 Breaking Changes 🚨
- #335 - The
toJSON
method on messages has been set toprotected
. Users should useJSON.stringify(msg)
ormsg.toJsonString
(which allows for passing options) for stringified JSON. Alternatively, if actual JSON is desired, users should calltoJson
.
Enhancements
v0.4.0
This release includes the following:
Enhancements
- Add plugin option
import_extension
to replace the.js
extension in
import paths by @timostamm in #317 - Improve JSON parse error message by @timostamm in #318
- Make PlainMessage recursive by @smaye81 in #308
New Contributors
v0.3.0
This release includes the following:
🚨 Breaking Changes 🚨
- #296 - If you have been using
PlainMessage
orPartialMessage
to create message types, you may need to change your code if you are using generics. For example:
-type WrapperFn<T extends Message> = (
msg: PartialMessage<T>
) => void;
+type WrapperFn<T extends Message<T>> = (
msg: PartialMessage<T>
) => void;
Enhancements
- Add a toJSON method to messages by @smaye81 in #306
- Add an unpack function to
google.protobuf.Any
by @smaye81 in #303 - Make generated imports look more normal by @dimitropoulos in #298
⚠️ Note that as a result of this PR, import statements in your generated code will contain diffs when generated withv0.3.0
as the import statements will have spaces added. For example:- import {FooMessage} from './foo_message_pb.js'; + import { FooMessage } from './foo_message_pb.js';
- Add print function with tagged template literal by @yukukotani in #279
- Enhance the
Any.is
function by @smaye81 in #294 - Make wrappers more lenient by @timostamm in #291
Bugfixes
- Fix map equality by @calebdoxsey in #305
- Make
tsNocheck
work correctly by @yukukotani in #275
New Contributors
@calebdoxsey made their first contribution in #305
@yukukotani made their first contributions in #275 and #279
v0.2.1
v0.2.0
This release includes the following:
🚨 Breaking Changes 🚨
-
#233 - If you have been inspecting fields (
DescField
) from createDescriptorSet(), you will need to update your code to use the newfieldKind
discriminator. Thekind
property no longer contains values such asmap_field
andmessage_field
for their respective types ofDescField
. Instead, a new type has been added namedfieldKind
, which allows you to further identify the kind of field aDescField
represents (map
,enum
,message
, etc.) -
#228 - If you have been using
createEcmaScriptPlugin
to create your own plugin, the signature has changed. Previously, the function accepted a single generator function for generating your output files. This has been split up into separate functions for TypeScript (generateTs
), JavaScript (generateJs
), and declaration files (generateDts
). See the plugin docs for more information on usage.
Enhancements
- Add plugin example for creating a Twirp client by @smaye81 #250
- Export printable type by @fubhy #255
- Extend documentation for PlainMessage and PartialMessage by @timostamm #248
- Add convenience functions for retrieving custom options by @smaye81 #244
- Clean up descriptor discrimination by @timostamm #233
- Add a plugin option to keep empty files by @timostamm #229
- Add the option to transpile target files by @smaye81 #228
Bugfixes
New Contributors
v0.1.1
Bug Fixes
- Fix error message in proto2 binary format by @timostamm in #221.
- Fix type prop issue in conditional exports by @smaye81 in #210. This adds support for TypeScript compiler option of
moduleResolution: "NodeNext"
.
Documentation
- Fix protoc option in protoc-gen-es/README.md by @timostamm in #223.
- Add code generation examples to protoc-gen-es README.md by @timostamm in #207.