Protobuf and RPC for TypeScript
APACHE-2.0 License
New features:
Note: Going forward, protobuf-ts will bump the major version for all
releases that add features. Minor releases will be used for releases
that only contain bug fixes.
This release is available on the BSR.
New features:
Bug fixes:
This release is available on the BSR.
New features:
force_exclude_all_options
plugin option, see #126Bug fixes:
MESSAGE_TYPE
broke user unit tests. The property was set to non-enumerable.New features:
force_exclude_all_options
plugin option, see #126Bug fixes:
MESSAGE_TYPE
broke user unit tests. The property was set to non-enumerable.Published by timostamm about 3 years ago
New features:
All messages created with create()
now have a symbol property MESSAGE_TYPE
that provides access to the messages type. Use containsMessageType(yourMessage)
to check if a message contains its type and access it with yourMessage[MESSAGE_TYPE]
.
Note that this is an experimental feature - it is here to stay, but implementation
details may change without notice.
Many thanks to @odashevskii-plaid for the contribution.
Bug fixes:
Generated create()
method for speed optimized code got left behind in #55
Thanks to @odashevskii-plaid for the find!
Infinite recursion on compile step when using custom option on message used as custom option #141
Thanks to @doochik for bringing it up.
Published by timostamm about 3 years ago
Bug fixes:
peerDependency
in @protobuf-ts/plugin to support yarn 2, see #144UnknownMessage
from type to interface, see #143Published by timostamm about 3 years ago
New features:
peerDependency
>=3.8.3
. Thanks to @ghaiklor-wix for the suggestion.Published by timostamm about 3 years ago
gRPC server support for @grpc/grpc-js (see #52)
Thanks to @badsyntax for inspiration
gRPC client support for @grpc/grpc-js (see #57)
Experimental generic server support (see #56)
gRPC transport (see #45)
Add oneof accessor / mutator functions, see #129
More convenience method to read custom options, see #36
runtime: Message options are now available in reflection
information, see #35.
runtime: BinaryReader.skip() supports WireType.StartGroup now.
plugin: Groups (deprecated proto2 feature) are now completely
ignored, but should still be treated properly as unknown fields.
The Twirp and gRPC-web transports let you pass options to fetch() now.
See #95, #105.
Thanks to @jamesbirtles for the PR!
Compatibility with Angular 11
No code changes, just relaxed peer dependency constraints.
Compatibility with svelte (type imports), see #94
Thanks to @frederikhors for the detailed reports.
protoc: prefer protoc from $PATH (see #60)
File option to exclude custom options (see #7)
Add long_type_number and long_type_bigint plugin options (see #13, thanks @vicb)
@protobuf-ts/grpc-transport & @grpc/grpc-js dependency, see #136.
Thanks to @hugebdu for the report.
Fix protoc error message "Plugin output is unparseable" for certain
plugin output sizes, see #134.
Thanks to @fenos for the investigation and fix!
Fix memory leak in @protobuf-ts/grpc-transport, see #107
Thanks to @dddenis for the PR!
twirp-transport is now a bit more compatible with polyfills for
the fetch API that are incomplete.
Fix protoc arch detection on Apple Silicon #108
Thanks to @lqs for the PR!
Fixed grpcweb-transport to handle responses with HTTP error status
and missing content-type header, see #102.
Thanks to @frederikhors for the bug report.
fix wrong grpc status code INTERNAL for aborted server streaming method (see #86)
Added workaround for unhandled promise rejection (see #86)
Improve support for the node-fetch
polyfill (see #81)
The generate_dependencies
parameter doesn't work (see #59)
Thanks to @jcready for the report and fix.
grpc-transport does not pass along provided deadline option (see #77)
grpcweb-transport: Recognize "application/grpc-web-text+proto".
Fixed conversion of gRPC metadata to our metadata (grpc-transport, grpc-backend)
Support grpc-web-text format with envoy (see #54)
Thanks to @DiogoMaMartins for the bug report.
Fix windows import path #41
Proto fields with [jstype = JS_NUMBER]
were documented as * @generated from protobuf field: [...] [jstype = JS_STRING];
. (See #27)
Proto fields with [jstype = JS_NORMAL]
were generated as string
when the long_type_string
plugin parameter was used. (See #27)
RpcOptions
takes a timeout
property now. deadline
property
has been removed. See #138 for details.
The "response" property of ServerStreamingCall and BidiStreamingCall has been renamed "responses".
The "request" property of ClientStreamingCall and BidiStreamingCall has been renamed "requests".
plugin option "disable_service_client" was renamed to "force_client_none"
clients are generated into separate files (see #55)
The cancel
method of RPC was removed, see #9
As a replacement, you can pass an AbortSignal
in the call options instead.
runtime: The MessageInfo interface requires the new "options"
property.
plugin-framework: IDescriptorInfo.isMessageField() no longer
returns true for GROUP field type.
grpcweb-transport: The function readGrpcWebResponseHeader()
no longer
returns the format.
grpcweb-transport: The function readGrpcWebResponseBody()
no longer takes
the format as an argument. Instead, it now takes the content-type response
header value and determines the format on its own.
The function mergeExtendedRpcOptions
was renamed to mergeRpcOptions
.
RpcOutputStream callback onNext
is now called with complete = false
on error.
the methods stackUnaryInterceptors
, stackServerStreamingInterceptors
,
stackClientStreamingInterceptors
, stackDuplexStreamingInterceptors
are
now deprecated. Use stackIntercept
instead.
Published by timostamm about 3 years ago
Breaking changes:
RpcOptions
takes a timeout
property now. deadline
propertyPublished by timostamm about 3 years ago
Bug fixes:
Published by timostamm about 3 years ago
Bug fixes:
New features:
Cleanup:
protoc
--ts_opt
, so we should speak of options, not parameters.Published by timostamm over 3 years ago
Fix memory leak in @protobuf-ts/grpc-transport, see #107.
Thanks to @dddenis for the PR!
Published by timostamm over 3 years ago
Bug Fixes:
Breaking changes:
grpcweb-transport: The function readGrpcWebResponseHeader()
no longer
returns the format.
grpcweb-transport: The function readGrpcWebResponseBody()
no longer takes
the format as an argument. Instead, it now takes the content-type response
header value and determines the format on its own.
Published by timostamm over 3 years ago
New features:
Published by timostamm over 3 years ago
New features:
Published by timostamm over 3 years ago
New feature:
Breaking changes: