Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump the protobuf-ts group in /impl/protobuf-ts with 4 updates #180

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions impl/protobuf-ts/gen/conformance/conformance.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @generated by protobuf-ts 2.9.1 with parameter ts_nocheck
// @generated by protobuf-ts 2.9.3 with parameter ts_nocheck
// @generated from protobuf file "conformance/conformance.proto" (package "conformance", syntax proto3)
// tslint:disable
// @ts-nocheck
Expand All @@ -18,7 +18,6 @@ import type { IBinaryReader } from "@protobuf-ts/runtime";
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime";
import { reflectionMergePartial } from "@protobuf-ts/runtime";
import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
/**
* The conformance runner will request a list of failures as the first request.
Expand Down Expand Up @@ -324,8 +323,8 @@ class FailureSet$Type extends MessageType<FailureSet> {
]);
}
create(value?: PartialMessage<FailureSet>): FailureSet {
const message = { failure: [] };
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
const message = globalThis.Object.create((this.messagePrototype!));
message.failure = [];
if (value !== undefined)
reflectionMergePartial<FailureSet>(this, message, value);
return message;
Expand Down Expand Up @@ -379,8 +378,12 @@ class ConformanceRequest$Type extends MessageType<ConformanceRequest> {
]);
}
create(value?: PartialMessage<ConformanceRequest>): ConformanceRequest {
const message = { payload: { oneofKind: undefined }, requestedOutputFormat: 0, messageType: "", testCategory: 0, printUnknownFields: false };
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
const message = globalThis.Object.create((this.messagePrototype!));
message.payload = { oneofKind: undefined };
message.requestedOutputFormat = 0;
message.messageType = "";
message.testCategory = 0;
message.printUnknownFields = false;
if (value !== undefined)
reflectionMergePartial<ConformanceRequest>(this, message, value);
return message;
Expand Down Expand Up @@ -494,8 +497,8 @@ class ConformanceResponse$Type extends MessageType<ConformanceResponse> {
]);
}
create(value?: PartialMessage<ConformanceResponse>): ConformanceResponse {
const message = { result: { oneofKind: undefined } };
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
const message = globalThis.Object.create((this.messagePrototype!));
message.result = { oneofKind: undefined };
if (value !== undefined)
reflectionMergePartial<ConformanceResponse>(this, message, value);
return message;
Expand Down Expand Up @@ -616,8 +619,8 @@ class JspbEncodingConfig$Type extends MessageType<JspbEncodingConfig> {
]);
}
create(value?: PartialMessage<JspbEncodingConfig>): JspbEncodingConfig {
const message = { useJspbArrayAnyFormat: false };
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
const message = globalThis.Object.create((this.messagePrototype!));
message.useJspbArrayAnyFormat = false;
if (value !== undefined)
reflectionMergePartial<JspbEncodingConfig>(this, message, value);
return message;
Expand Down
17 changes: 9 additions & 8 deletions impl/protobuf-ts/gen/google/protobuf/any.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @generated by protobuf-ts 2.9.1 with parameter ts_nocheck
// @generated by protobuf-ts 2.9.3 with parameter ts_nocheck
// @generated from protobuf file "google/protobuf/any.proto" (package "google.protobuf", syntax proto3)
// tslint:disable
// @ts-nocheck
Expand Down Expand Up @@ -40,7 +40,6 @@ import type { IBinaryReader } from "@protobuf-ts/runtime";
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime";
import { reflectionMergePartial } from "@protobuf-ts/runtime";
import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
import { isJsonObject } from "@protobuf-ts/runtime";
import { typeofJsonValue } from "@protobuf-ts/runtime";
import type { JsonValue } from "@protobuf-ts/runtime";
Expand Down Expand Up @@ -80,7 +79,7 @@ import { MessageType } from "@protobuf-ts/runtime";
* foo = any.unpack(Foo.getDefaultInstance());
* }
*
* Example 3: Pack and unpack a message in Python.
* Example 3: Pack and unpack a message in Python.
*
* foo = Foo(...)
* any = Any()
Expand All @@ -90,7 +89,7 @@ import { MessageType } from "@protobuf-ts/runtime";
* any.Unpack(foo)
* ...
*
* Example 4: Pack and unpack a message in Go
* Example 4: Pack and unpack a message in Go
*
* foo := &pb.Foo{...}
* any, err := anypb.New(foo)
Expand All @@ -110,7 +109,7 @@ import { MessageType } from "@protobuf-ts/runtime";
* name "y.z".
*
* JSON
*
* ====
* The JSON representation of an `Any` value uses the regular
* representation of the deserialized, embedded message, with an
* additional field `@type` which contains the type URL. Example:
Expand Down Expand Up @@ -165,7 +164,8 @@ export interface Any {
*
* Note: this functionality is not currently available in the official
* protobuf release, and it is not used for type URLs beginning with
* type.googleapis.com.
* type.googleapis.com. As of May 2023, there are no widely used type server
* implementations and no plans to implement one.
*
* Schemes other than `http`, `https` (or the empty scheme) might be
* used with implementation specific semantics.
Expand Down Expand Up @@ -279,8 +279,9 @@ class Any$Type extends MessageType<Any> {
return name;
}
create(value?: PartialMessage<Any>): Any {
const message = { typeUrl: "", value: new Uint8Array(0) };
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
const message = globalThis.Object.create((this.messagePrototype!));
message.typeUrl = "";
message.value = new Uint8Array(0);
if (value !== undefined)
reflectionMergePartial<Any>(this, message, value);
return message;
Expand Down
8 changes: 4 additions & 4 deletions impl/protobuf-ts/gen/google/protobuf/duration.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @generated by protobuf-ts 2.9.1 with parameter ts_nocheck
// @generated by protobuf-ts 2.9.3 with parameter ts_nocheck
// @generated from protobuf file "google/protobuf/duration.proto" (package "google.protobuf", syntax proto3)
// tslint:disable
// @ts-nocheck
Expand Down Expand Up @@ -41,7 +41,6 @@ import type { IBinaryReader } from "@protobuf-ts/runtime";
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime";
import { reflectionMergePartial } from "@protobuf-ts/runtime";
import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
import { typeofJsonValue } from "@protobuf-ts/runtime";
import type { JsonValue } from "@protobuf-ts/runtime";
import type { JsonReadOptions } from "@protobuf-ts/runtime";
Expand Down Expand Up @@ -184,8 +183,9 @@ class Duration$Type extends MessageType<Duration> {
return target;
}
create(value?: PartialMessage<Duration>): Duration {
const message = { seconds: 0n, nanos: 0 };
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
const message = globalThis.Object.create((this.messagePrototype!));
message.seconds = 0n;
message.nanos = 0;
if (value !== undefined)
reflectionMergePartial<Duration>(this, message, value);
return message;
Expand Down
7 changes: 3 additions & 4 deletions impl/protobuf-ts/gen/google/protobuf/field_mask.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @generated by protobuf-ts 2.9.1 with parameter ts_nocheck
// @generated by protobuf-ts 2.9.3 with parameter ts_nocheck
// @generated from protobuf file "google/protobuf/field_mask.proto" (package "google.protobuf", syntax proto3)
// tslint:disable
// @ts-nocheck
Expand Down Expand Up @@ -41,7 +41,6 @@ import type { IBinaryReader } from "@protobuf-ts/runtime";
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime";
import { reflectionMergePartial } from "@protobuf-ts/runtime";
import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
import { typeofJsonValue } from "@protobuf-ts/runtime";
import type { JsonValue } from "@protobuf-ts/runtime";
import { lowerCamelCase } from "@protobuf-ts/runtime";
Expand Down Expand Up @@ -297,8 +296,8 @@ class FieldMask$Type extends MessageType<FieldMask> {
return target;
}
create(value?: PartialMessage<FieldMask>): FieldMask {
const message = { paths: [] };
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
const message = globalThis.Object.create((this.messagePrototype!));
message.paths = [];
if (value !== undefined)
reflectionMergePartial<FieldMask>(this, message, value);
return message;
Expand Down
19 changes: 9 additions & 10 deletions impl/protobuf-ts/gen/google/protobuf/struct.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @generated by protobuf-ts 2.9.1 with parameter ts_nocheck
// @generated by protobuf-ts 2.9.3 with parameter ts_nocheck
// @generated from protobuf file "google/protobuf/struct.proto" (package "google.protobuf", syntax proto3)
// tslint:disable
// @ts-nocheck
Expand Down Expand Up @@ -41,7 +41,6 @@ import type { IBinaryReader } from "@protobuf-ts/runtime";
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime";
import { reflectionMergePartial } from "@protobuf-ts/runtime";
import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
import { isJsonObject } from "@protobuf-ts/runtime";
import { typeofJsonValue } from "@protobuf-ts/runtime";
import type { JsonValue } from "@protobuf-ts/runtime";
Expand Down Expand Up @@ -156,7 +155,7 @@ export interface ListValue {
* `NullValue` is a singleton enumeration to represent the null value for the
* `Value` type union.
*
* The JSON representation for `NullValue` is JSON `null`.
* The JSON representation for `NullValue` is JSON `null`.
*
* @generated from protobuf enum google.protobuf.NullValue
*/
Expand Down Expand Up @@ -199,8 +198,8 @@ class Struct$Type extends MessageType<Struct> {
return target;
}
create(value?: PartialMessage<Struct>): Struct {
const message = { fields: {} };
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
const message = globalThis.Object.create((this.messagePrototype!));
message.fields = {};
if (value !== undefined)
reflectionMergePartial<Struct>(this, message, value);
return message;
Expand Down Expand Up @@ -242,7 +241,7 @@ class Struct$Type extends MessageType<Struct> {
}
internalBinaryWrite(message: Struct, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* map<string, google.protobuf.Value> fields = 1; */
for (let k of Object.keys(message.fields)) {
for (let k of globalThis.Object.keys(message.fields)) {
writer.tag(1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k);
writer.tag(2, WireType.LengthDelimited).fork();
Value.internalBinaryWrite(message.fields[k], writer, options);
Expand Down Expand Up @@ -330,8 +329,8 @@ class Value$Type extends MessageType<Value> {
return target;
}
create(value?: PartialMessage<Value>): Value {
const message = { kind: { oneofKind: undefined } };
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
const message = globalThis.Object.create((this.messagePrototype!));
message.kind = { oneofKind: undefined };
if (value !== undefined)
reflectionMergePartial<Value>(this, message, value);
return message;
Expand Down Expand Up @@ -443,8 +442,8 @@ class ListValue$Type extends MessageType<ListValue> {
return target;
}
create(value?: PartialMessage<ListValue>): ListValue {
const message = { values: [] };
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
const message = globalThis.Object.create((this.messagePrototype!));
message.values = [];
if (value !== undefined)
reflectionMergePartial<ListValue>(this, message, value);
return message;
Expand Down
Loading