diff --git a/impl/protobuf-ts/gen/conformance/conformance.ts b/impl/protobuf-ts/gen/conformance/conformance.ts index 4b1342da..a3dd9185 100644 --- a/impl/protobuf-ts/gen/conformance/conformance.ts +++ b/impl/protobuf-ts/gen/conformance/conformance.ts @@ -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 @@ -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. @@ -324,8 +323,8 @@ class FailureSet$Type extends MessageType { ]); } create(value?: PartialMessage): 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(this, message, value); return message; @@ -379,8 +378,12 @@ class ConformanceRequest$Type extends MessageType { ]); } create(value?: PartialMessage): 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(this, message, value); return message; @@ -494,8 +497,8 @@ class ConformanceResponse$Type extends MessageType { ]); } create(value?: PartialMessage): 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(this, message, value); return message; @@ -616,8 +619,8 @@ class JspbEncodingConfig$Type extends MessageType { ]); } create(value?: PartialMessage): 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(this, message, value); return message; diff --git a/impl/protobuf-ts/gen/google/protobuf/any.ts b/impl/protobuf-ts/gen/google/protobuf/any.ts index ac83dab8..fcdf9882 100644 --- a/impl/protobuf-ts/gen/google/protobuf/any.ts +++ b/impl/protobuf-ts/gen/google/protobuf/any.ts @@ -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 @@ -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"; @@ -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() @@ -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) @@ -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: @@ -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. @@ -279,8 +279,9 @@ class Any$Type extends MessageType { return name; } create(value?: PartialMessage): 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(this, message, value); return message; diff --git a/impl/protobuf-ts/gen/google/protobuf/duration.ts b/impl/protobuf-ts/gen/google/protobuf/duration.ts index 39aedd4d..0f9badf3 100644 --- a/impl/protobuf-ts/gen/google/protobuf/duration.ts +++ b/impl/protobuf-ts/gen/google/protobuf/duration.ts @@ -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 @@ -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"; @@ -184,8 +183,9 @@ class Duration$Type extends MessageType { return target; } create(value?: PartialMessage): 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(this, message, value); return message; diff --git a/impl/protobuf-ts/gen/google/protobuf/field_mask.ts b/impl/protobuf-ts/gen/google/protobuf/field_mask.ts index b48b6649..021e86ca 100644 --- a/impl/protobuf-ts/gen/google/protobuf/field_mask.ts +++ b/impl/protobuf-ts/gen/google/protobuf/field_mask.ts @@ -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 @@ -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"; @@ -297,8 +296,8 @@ class FieldMask$Type extends MessageType { return target; } create(value?: PartialMessage): 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(this, message, value); return message; diff --git a/impl/protobuf-ts/gen/google/protobuf/struct.ts b/impl/protobuf-ts/gen/google/protobuf/struct.ts index c6aea6c8..d9914635 100644 --- a/impl/protobuf-ts/gen/google/protobuf/struct.ts +++ b/impl/protobuf-ts/gen/google/protobuf/struct.ts @@ -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 @@ -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"; @@ -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 */ @@ -199,8 +198,8 @@ class Struct$Type extends MessageType { return target; } create(value?: PartialMessage): 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(this, message, value); return message; @@ -242,7 +241,7 @@ class Struct$Type extends MessageType { } internalBinaryWrite(message: Struct, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* map 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); @@ -330,8 +329,8 @@ class Value$Type extends MessageType { return target; } create(value?: PartialMessage): 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(this, message, value); return message; @@ -443,8 +442,8 @@ class ListValue$Type extends MessageType { return target; } create(value?: PartialMessage): 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(this, message, value); return message; diff --git a/impl/protobuf-ts/gen/google/protobuf/test_messages_proto2.ts b/impl/protobuf-ts/gen/google/protobuf/test_messages_proto2.ts index eb8d8efc..2264e3ea 100644 --- a/impl/protobuf-ts/gen/google/protobuf/test_messages_proto2.ts +++ b/impl/protobuf-ts/gen/google/protobuf/test_messages_proto2.ts @@ -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/test_messages_proto2.proto" (package "protobuf_test_messages.proto2", syntax proto2) // tslint:disable // @ts-nocheck @@ -26,7 +26,6 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime"; import { WireType } 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"; /** * This proto includes every type of field in both singular and repeated @@ -1211,8 +1210,76 @@ class TestAllTypesProto2$Type extends MessageType { ]); } create(value?: PartialMessage): TestAllTypesProto2 { - const message = { repeatedInt32: [], repeatedInt64: [], repeatedUint32: [], repeatedUint64: [], repeatedSint32: [], repeatedSint64: [], repeatedFixed32: [], repeatedFixed64: [], repeatedSfixed32: [], repeatedSfixed64: [], repeatedFloat: [], repeatedDouble: [], repeatedBool: [], repeatedString: [], repeatedBytes: [], repeatedNestedMessage: [], repeatedForeignMessage: [], repeatedNestedEnum: [], repeatedForeignEnum: [], repeatedStringPiece: [], repeatedCord: [], packedInt32: [], packedInt64: [], packedUint32: [], packedUint64: [], packedSint32: [], packedSint64: [], packedFixed32: [], packedFixed64: [], packedSfixed32: [], packedSfixed64: [], packedFloat: [], packedDouble: [], packedBool: [], packedNestedEnum: [], unpackedInt32: [], unpackedInt64: [], unpackedUint32: [], unpackedUint64: [], unpackedSint32: [], unpackedSint64: [], unpackedFixed32: [], unpackedFixed64: [], unpackedSfixed32: [], unpackedSfixed64: [], unpackedFloat: [], unpackedDouble: [], unpackedBool: [], unpackedNestedEnum: [], mapInt32Int32: {}, mapInt64Int64: {}, mapUint32Uint32: {}, mapUint64Uint64: {}, mapSint32Sint32: {}, mapSint64Sint64: {}, mapFixed32Fixed32: {}, mapFixed64Fixed64: {}, mapSfixed32Sfixed32: {}, mapSfixed64Sfixed64: {}, mapInt32Float: {}, mapInt32Double: {}, mapBoolBool: {}, mapStringString: {}, mapStringBytes: {}, mapStringNestedMessage: {}, mapStringForeignMessage: {}, mapStringNestedEnum: {}, mapStringForeignEnum: {}, oneofField: { oneofKind: undefined } }; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); + message.repeatedInt32 = []; + message.repeatedInt64 = []; + message.repeatedUint32 = []; + message.repeatedUint64 = []; + message.repeatedSint32 = []; + message.repeatedSint64 = []; + message.repeatedFixed32 = []; + message.repeatedFixed64 = []; + message.repeatedSfixed32 = []; + message.repeatedSfixed64 = []; + message.repeatedFloat = []; + message.repeatedDouble = []; + message.repeatedBool = []; + message.repeatedString = []; + message.repeatedBytes = []; + message.repeatedNestedMessage = []; + message.repeatedForeignMessage = []; + message.repeatedNestedEnum = []; + message.repeatedForeignEnum = []; + message.repeatedStringPiece = []; + message.repeatedCord = []; + message.packedInt32 = []; + message.packedInt64 = []; + message.packedUint32 = []; + message.packedUint64 = []; + message.packedSint32 = []; + message.packedSint64 = []; + message.packedFixed32 = []; + message.packedFixed64 = []; + message.packedSfixed32 = []; + message.packedSfixed64 = []; + message.packedFloat = []; + message.packedDouble = []; + message.packedBool = []; + message.packedNestedEnum = []; + message.unpackedInt32 = []; + message.unpackedInt64 = []; + message.unpackedUint32 = []; + message.unpackedUint64 = []; + message.unpackedSint32 = []; + message.unpackedSint64 = []; + message.unpackedFixed32 = []; + message.unpackedFixed64 = []; + message.unpackedSfixed32 = []; + message.unpackedSfixed64 = []; + message.unpackedFloat = []; + message.unpackedDouble = []; + message.unpackedBool = []; + message.unpackedNestedEnum = []; + message.mapInt32Int32 = {}; + message.mapInt64Int64 = {}; + message.mapUint32Uint32 = {}; + message.mapUint64Uint64 = {}; + message.mapSint32Sint32 = {}; + message.mapSint64Sint64 = {}; + message.mapFixed32Fixed32 = {}; + message.mapFixed64Fixed64 = {}; + message.mapSfixed32Sfixed32 = {}; + message.mapSfixed64Sfixed64 = {}; + message.mapInt32Float = {}; + message.mapInt32Double = {}; + message.mapBoolBool = {}; + message.mapStringString = {}; + message.mapStringBytes = {}; + message.mapStringNestedMessage = {}; + message.mapStringForeignMessage = {}; + message.mapStringNestedEnum = {}; + message.mapStringForeignEnum = {}; + message.oneofField = { oneofKind: undefined }; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -2403,69 +2470,69 @@ class TestAllTypesProto2$Type extends MessageType { for (let i = 0; i < message.unpackedNestedEnum.length; i++) writer.tag(102, WireType.Varint).int32(message.unpackedNestedEnum[i]); /* map map_int32_int32 = 56; */ - for (let k of Object.keys(message.mapInt32Int32)) + for (let k of globalThis.Object.keys(message.mapInt32Int32)) writer.tag(56, WireType.LengthDelimited).fork().tag(1, WireType.Varint).int32(parseInt(k)).tag(2, WireType.Varint).int32(message.mapInt32Int32[k as any]).join(); /* map map_int64_int64 = 57; */ - for (let k of Object.keys(message.mapInt64Int64)) + for (let k of globalThis.Object.keys(message.mapInt64Int64)) writer.tag(57, WireType.LengthDelimited).fork().tag(1, WireType.Varint).int64(k).tag(2, WireType.Varint).int64(message.mapInt64Int64[k]).join(); /* map map_uint32_uint32 = 58; */ - for (let k of Object.keys(message.mapUint32Uint32)) + for (let k of globalThis.Object.keys(message.mapUint32Uint32)) writer.tag(58, WireType.LengthDelimited).fork().tag(1, WireType.Varint).uint32(parseInt(k)).tag(2, WireType.Varint).uint32(message.mapUint32Uint32[k as any]).join(); /* map map_uint64_uint64 = 59; */ - for (let k of Object.keys(message.mapUint64Uint64)) + for (let k of globalThis.Object.keys(message.mapUint64Uint64)) writer.tag(59, WireType.LengthDelimited).fork().tag(1, WireType.Varint).uint64(k).tag(2, WireType.Varint).uint64(message.mapUint64Uint64[k]).join(); /* map map_sint32_sint32 = 60; */ - for (let k of Object.keys(message.mapSint32Sint32)) + for (let k of globalThis.Object.keys(message.mapSint32Sint32)) writer.tag(60, WireType.LengthDelimited).fork().tag(1, WireType.Varint).sint32(parseInt(k)).tag(2, WireType.Varint).sint32(message.mapSint32Sint32[k as any]).join(); /* map map_sint64_sint64 = 61; */ - for (let k of Object.keys(message.mapSint64Sint64)) + for (let k of globalThis.Object.keys(message.mapSint64Sint64)) writer.tag(61, WireType.LengthDelimited).fork().tag(1, WireType.Varint).sint64(k).tag(2, WireType.Varint).sint64(message.mapSint64Sint64[k]).join(); /* map map_fixed32_fixed32 = 62; */ - for (let k of Object.keys(message.mapFixed32Fixed32)) + for (let k of globalThis.Object.keys(message.mapFixed32Fixed32)) writer.tag(62, WireType.LengthDelimited).fork().tag(1, WireType.Bit32).fixed32(parseInt(k)).tag(2, WireType.Bit32).fixed32(message.mapFixed32Fixed32[k as any]).join(); /* map map_fixed64_fixed64 = 63; */ - for (let k of Object.keys(message.mapFixed64Fixed64)) + for (let k of globalThis.Object.keys(message.mapFixed64Fixed64)) writer.tag(63, WireType.LengthDelimited).fork().tag(1, WireType.Bit64).fixed64(k).tag(2, WireType.Bit64).fixed64(message.mapFixed64Fixed64[k]).join(); /* map map_sfixed32_sfixed32 = 64; */ - for (let k of Object.keys(message.mapSfixed32Sfixed32)) + for (let k of globalThis.Object.keys(message.mapSfixed32Sfixed32)) writer.tag(64, WireType.LengthDelimited).fork().tag(1, WireType.Bit32).sfixed32(parseInt(k)).tag(2, WireType.Bit32).sfixed32(message.mapSfixed32Sfixed32[k as any]).join(); /* map map_sfixed64_sfixed64 = 65; */ - for (let k of Object.keys(message.mapSfixed64Sfixed64)) + for (let k of globalThis.Object.keys(message.mapSfixed64Sfixed64)) writer.tag(65, WireType.LengthDelimited).fork().tag(1, WireType.Bit64).sfixed64(k).tag(2, WireType.Bit64).sfixed64(message.mapSfixed64Sfixed64[k]).join(); /* map map_int32_float = 66; */ - for (let k of Object.keys(message.mapInt32Float)) + for (let k of globalThis.Object.keys(message.mapInt32Float)) writer.tag(66, WireType.LengthDelimited).fork().tag(1, WireType.Varint).int32(parseInt(k)).tag(2, WireType.Bit32).float(message.mapInt32Float[k as any]).join(); /* map map_int32_double = 67; */ - for (let k of Object.keys(message.mapInt32Double)) + for (let k of globalThis.Object.keys(message.mapInt32Double)) writer.tag(67, WireType.LengthDelimited).fork().tag(1, WireType.Varint).int32(parseInt(k)).tag(2, WireType.Bit64).double(message.mapInt32Double[k as any]).join(); /* map map_bool_bool = 68; */ - for (let k of Object.keys(message.mapBoolBool)) + for (let k of globalThis.Object.keys(message.mapBoolBool)) writer.tag(68, WireType.LengthDelimited).fork().tag(1, WireType.Varint).bool(k === "true").tag(2, WireType.Varint).bool(message.mapBoolBool[k]).join(); /* map map_string_string = 69; */ - for (let k of Object.keys(message.mapStringString)) + for (let k of globalThis.Object.keys(message.mapStringString)) writer.tag(69, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.mapStringString[k]).join(); /* map map_string_bytes = 70; */ - for (let k of Object.keys(message.mapStringBytes)) + for (let k of globalThis.Object.keys(message.mapStringBytes)) writer.tag(70, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).bytes(message.mapStringBytes[k]).join(); /* map map_string_nested_message = 71; */ - for (let k of Object.keys(message.mapStringNestedMessage)) { + for (let k of globalThis.Object.keys(message.mapStringNestedMessage)) { writer.tag(71, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k); writer.tag(2, WireType.LengthDelimited).fork(); TestAllTypesProto2_NestedMessage.internalBinaryWrite(message.mapStringNestedMessage[k], writer, options); writer.join().join(); } /* map map_string_foreign_message = 72; */ - for (let k of Object.keys(message.mapStringForeignMessage)) { + for (let k of globalThis.Object.keys(message.mapStringForeignMessage)) { writer.tag(72, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k); writer.tag(2, WireType.LengthDelimited).fork(); ForeignMessageProto2.internalBinaryWrite(message.mapStringForeignMessage[k], writer, options); writer.join().join(); } /* map map_string_nested_enum = 73; */ - for (let k of Object.keys(message.mapStringNestedEnum)) + for (let k of globalThis.Object.keys(message.mapStringNestedEnum)) writer.tag(73, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.Varint).int32(message.mapStringNestedEnum[k]).join(); /* map map_string_foreign_enum = 74; */ - for (let k of Object.keys(message.mapStringForeignEnum)) + for (let k of globalThis.Object.keys(message.mapStringForeignEnum)) writer.tag(74, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.Varint).int32(message.mapStringForeignEnum[k]).join(); /* uint32 oneof_uint32 = 111; */ if (message.oneofField.oneofKind === "oneofUint32") @@ -2612,8 +2679,7 @@ class TestAllTypesProto2_NestedMessage$Type extends MessageType): TestAllTypesProto2_NestedMessage { - const message = {}; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -2666,8 +2732,7 @@ class TestAllTypesProto2_Data$Type extends MessageType ]); } create(value?: PartialMessage): TestAllTypesProto2_Data { - const message = {}; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -2717,8 +2782,7 @@ class TestAllTypesProto2_MessageSetCorrect$Type extends MessageType): TestAllTypesProto2_MessageSetCorrect { - const message = {}; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -2745,8 +2809,7 @@ class TestAllTypesProto2_MessageSetCorrectExtension1$Type extends MessageType): TestAllTypesProto2_MessageSetCorrectExtension1 { - const message = {}; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -2792,8 +2855,7 @@ class TestAllTypesProto2_MessageSetCorrectExtension2$Type extends MessageType): TestAllTypesProto2_MessageSetCorrectExtension2 { - const message = {}; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -2839,8 +2901,7 @@ class ForeignMessageProto2$Type extends MessageType { ]); } create(value?: PartialMessage): ForeignMessageProto2 { - const message = {}; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -2890,8 +2951,8 @@ class UnknownToTestAllTypes$Type extends MessageType { ]); } create(value?: PartialMessage): UnknownToTestAllTypes { - const message = { repeatedInt32: [] }; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); + message.repeatedInt32 = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -2965,8 +3026,7 @@ class UnknownToTestAllTypes_OptionalGroup$Type extends MessageType): UnknownToTestAllTypes_OptionalGroup { - const message = {}; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -3010,8 +3070,7 @@ class NullHypothesisProto2$Type extends MessageType { super("protobuf_test_messages.proto2.NullHypothesisProto2", []); } create(value?: PartialMessage): NullHypothesisProto2 { - const message = {}; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -3036,8 +3095,7 @@ class EnumOnlyProto2$Type extends MessageType { super("protobuf_test_messages.proto2.EnumOnlyProto2", []); } create(value?: PartialMessage): EnumOnlyProto2 { - const message = {}; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -3064,8 +3122,7 @@ class OneStringProto2$Type extends MessageType { ]); } create(value?: PartialMessage): OneStringProto2 { - const message = {}; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -3113,8 +3170,8 @@ class ProtoWithKeywords$Type extends MessageType { ]); } create(value?: PartialMessage): ProtoWithKeywords { - const message = { requires: [] }; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); + message.requires = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -3209,8 +3266,41 @@ class TestAllRequiredTypesProto2$Type extends MessageType): TestAllRequiredTypesProto2 { - const message = { requiredInt32: 0, requiredInt64: 0n, requiredUint32: 0, requiredUint64: 0n, requiredSint32: 0, requiredSint64: 0n, requiredFixed32: 0, requiredFixed64: 0n, requiredSfixed32: 0, requiredSfixed64: 0n, requiredFloat: 0, requiredDouble: 0, requiredBool: false, requiredString: "", requiredBytes: new Uint8Array(0), requiredNestedEnum: 0, requiredForeignEnum: 0, requiredStringPiece: "", requiredCord: "", defaultInt32: 0, defaultInt64: 0n, defaultUint32: 0, defaultUint64: 0n, defaultSint32: 0, defaultSint64: 0n, defaultFixed32: 0, defaultFixed64: 0n, defaultSfixed32: 0, defaultSfixed64: 0n, defaultFloat: 0, defaultDouble: 0, defaultBool: false, defaultString: "", defaultBytes: new Uint8Array(0) }; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); + message.requiredInt32 = 0; + message.requiredInt64 = 0n; + message.requiredUint32 = 0; + message.requiredUint64 = 0n; + message.requiredSint32 = 0; + message.requiredSint64 = 0n; + message.requiredFixed32 = 0; + message.requiredFixed64 = 0n; + message.requiredSfixed32 = 0; + message.requiredSfixed64 = 0n; + message.requiredFloat = 0; + message.requiredDouble = 0; + message.requiredBool = false; + message.requiredString = ""; + message.requiredBytes = new Uint8Array(0); + message.requiredNestedEnum = 0; + message.requiredForeignEnum = 0; + message.requiredStringPiece = ""; + message.requiredCord = ""; + message.defaultInt32 = 0; + message.defaultInt64 = 0n; + message.defaultUint32 = 0; + message.defaultUint64 = 0n; + message.defaultSint32 = 0; + message.defaultSint64 = 0n; + message.defaultFixed32 = 0; + message.defaultFixed64 = 0n; + message.defaultSfixed32 = 0; + message.defaultSfixed64 = 0n; + message.defaultFloat = 0; + message.defaultDouble = 0; + message.defaultBool = false; + message.defaultString = ""; + message.defaultBytes = new Uint8Array(0); if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -3480,8 +3570,8 @@ class TestAllRequiredTypesProto2_NestedMessage$Type extends MessageType): TestAllRequiredTypesProto2_NestedMessage { - const message = { a: 0 }; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); + message.a = 0; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -3540,8 +3630,9 @@ class TestAllRequiredTypesProto2_Data$Type extends MessageType): TestAllRequiredTypesProto2_Data { - const message = { groupInt32: 0, groupUint32: 0 }; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); + message.groupInt32 = 0; + message.groupUint32 = 0; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -3591,8 +3682,7 @@ class TestAllRequiredTypesProto2_MessageSetCorrect$Type extends MessageType): TestAllRequiredTypesProto2_MessageSetCorrect { - const message = {}; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -3619,8 +3709,8 @@ class TestAllRequiredTypesProto2_MessageSetCorrectExtension1$Type extends Messag ]); } create(value?: PartialMessage): TestAllRequiredTypesProto2_MessageSetCorrectExtension1 { - const message = { str: "" }; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); + message.str = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -3666,8 +3756,8 @@ class TestAllRequiredTypesProto2_MessageSetCorrectExtension2$Type extends Messag ]); } create(value?: PartialMessage): TestAllRequiredTypesProto2_MessageSetCorrectExtension2 { - const message = { i: 0 }; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); + message.i = 0; if (value !== undefined) reflectionMergePartial(this, message, value); return message; diff --git a/impl/protobuf-ts/gen/google/protobuf/test_messages_proto3.ts b/impl/protobuf-ts/gen/google/protobuf/test_messages_proto3.ts index 0ad0c70e..4c662ebb 100644 --- a/impl/protobuf-ts/gen/google/protobuf/test_messages_proto3.ts +++ b/impl/protobuf-ts/gen/google/protobuf/test_messages_proto3.ts @@ -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/test_messages_proto3.proto" (package "protobuf_test_messages.proto3", syntax proto3) // tslint:disable // @ts-nocheck @@ -25,7 +25,6 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime"; import { WireType } 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"; import { ListValue } from "./struct"; import { Value } from "./struct"; @@ -1012,8 +1011,131 @@ class TestAllTypesProto3$Type extends MessageType { ]); } create(value?: PartialMessage): TestAllTypesProto3 { - const message = { optionalInt32: 0, optionalInt64: 0n, optionalUint32: 0, optionalUint64: 0n, optionalSint32: 0, optionalSint64: 0n, optionalFixed32: 0, optionalFixed64: 0n, optionalSfixed32: 0, optionalSfixed64: 0n, optionalFloat: 0, optionalDouble: 0, optionalBool: false, optionalString: "", optionalBytes: new Uint8Array(0), optionalNestedEnum: 0, optionalForeignEnum: 0, optionalAliasedEnum: 0, optionalStringPiece: "", optionalCord: "", repeatedInt32: [], repeatedInt64: [], repeatedUint32: [], repeatedUint64: [], repeatedSint32: [], repeatedSint64: [], repeatedFixed32: [], repeatedFixed64: [], repeatedSfixed32: [], repeatedSfixed64: [], repeatedFloat: [], repeatedDouble: [], repeatedBool: [], repeatedString: [], repeatedBytes: [], repeatedNestedMessage: [], repeatedForeignMessage: [], repeatedNestedEnum: [], repeatedForeignEnum: [], repeatedStringPiece: [], repeatedCord: [], packedInt32: [], packedInt64: [], packedUint32: [], packedUint64: [], packedSint32: [], packedSint64: [], packedFixed32: [], packedFixed64: [], packedSfixed32: [], packedSfixed64: [], packedFloat: [], packedDouble: [], packedBool: [], packedNestedEnum: [], unpackedInt32: [], unpackedInt64: [], unpackedUint32: [], unpackedUint64: [], unpackedSint32: [], unpackedSint64: [], unpackedFixed32: [], unpackedFixed64: [], unpackedSfixed32: [], unpackedSfixed64: [], unpackedFloat: [], unpackedDouble: [], unpackedBool: [], unpackedNestedEnum: [], mapInt32Int32: {}, mapInt64Int64: {}, mapUint32Uint32: {}, mapUint64Uint64: {}, mapSint32Sint32: {}, mapSint64Sint64: {}, mapFixed32Fixed32: {}, mapFixed64Fixed64: {}, mapSfixed32Sfixed32: {}, mapSfixed64Sfixed64: {}, mapInt32Float: {}, mapInt32Double: {}, mapBoolBool: {}, mapStringString: {}, mapStringBytes: {}, mapStringNestedMessage: {}, mapStringForeignMessage: {}, mapStringNestedEnum: {}, mapStringForeignEnum: {}, oneofField: { oneofKind: undefined }, repeatedBoolWrapper: [], repeatedInt32Wrapper: [], repeatedInt64Wrapper: [], repeatedUint32Wrapper: [], repeatedUint64Wrapper: [], repeatedFloatWrapper: [], repeatedDoubleWrapper: [], repeatedStringWrapper: [], repeatedBytesWrapper: [], optionalNullValue: 0, repeatedDuration: [], repeatedTimestamp: [], repeatedFieldmask: [], repeatedStruct: [], repeatedAny: [], repeatedValue: [], repeatedListValue: [], fieldname1: 0, fieldName2: 0, FieldName3: 0, fieldName4: 0, field0Name5: 0, field0Name6: 0, fieldName7: 0, fieldName8: 0, fieldName9: 0, fieldName10: 0, fIELDNAME11: 0, fIELDName12: 0, FieldName13: 0, FieldName14: 0, fieldName15: 0, fieldName16: 0, fieldName17: 0, fieldName18: 0 }; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); + message.optionalInt32 = 0; + message.optionalInt64 = 0n; + message.optionalUint32 = 0; + message.optionalUint64 = 0n; + message.optionalSint32 = 0; + message.optionalSint64 = 0n; + message.optionalFixed32 = 0; + message.optionalFixed64 = 0n; + message.optionalSfixed32 = 0; + message.optionalSfixed64 = 0n; + message.optionalFloat = 0; + message.optionalDouble = 0; + message.optionalBool = false; + message.optionalString = ""; + message.optionalBytes = new Uint8Array(0); + message.optionalNestedEnum = 0; + message.optionalForeignEnum = 0; + message.optionalAliasedEnum = 0; + message.optionalStringPiece = ""; + message.optionalCord = ""; + message.repeatedInt32 = []; + message.repeatedInt64 = []; + message.repeatedUint32 = []; + message.repeatedUint64 = []; + message.repeatedSint32 = []; + message.repeatedSint64 = []; + message.repeatedFixed32 = []; + message.repeatedFixed64 = []; + message.repeatedSfixed32 = []; + message.repeatedSfixed64 = []; + message.repeatedFloat = []; + message.repeatedDouble = []; + message.repeatedBool = []; + message.repeatedString = []; + message.repeatedBytes = []; + message.repeatedNestedMessage = []; + message.repeatedForeignMessage = []; + message.repeatedNestedEnum = []; + message.repeatedForeignEnum = []; + message.repeatedStringPiece = []; + message.repeatedCord = []; + message.packedInt32 = []; + message.packedInt64 = []; + message.packedUint32 = []; + message.packedUint64 = []; + message.packedSint32 = []; + message.packedSint64 = []; + message.packedFixed32 = []; + message.packedFixed64 = []; + message.packedSfixed32 = []; + message.packedSfixed64 = []; + message.packedFloat = []; + message.packedDouble = []; + message.packedBool = []; + message.packedNestedEnum = []; + message.unpackedInt32 = []; + message.unpackedInt64 = []; + message.unpackedUint32 = []; + message.unpackedUint64 = []; + message.unpackedSint32 = []; + message.unpackedSint64 = []; + message.unpackedFixed32 = []; + message.unpackedFixed64 = []; + message.unpackedSfixed32 = []; + message.unpackedSfixed64 = []; + message.unpackedFloat = []; + message.unpackedDouble = []; + message.unpackedBool = []; + message.unpackedNestedEnum = []; + message.mapInt32Int32 = {}; + message.mapInt64Int64 = {}; + message.mapUint32Uint32 = {}; + message.mapUint64Uint64 = {}; + message.mapSint32Sint32 = {}; + message.mapSint64Sint64 = {}; + message.mapFixed32Fixed32 = {}; + message.mapFixed64Fixed64 = {}; + message.mapSfixed32Sfixed32 = {}; + message.mapSfixed64Sfixed64 = {}; + message.mapInt32Float = {}; + message.mapInt32Double = {}; + message.mapBoolBool = {}; + message.mapStringString = {}; + message.mapStringBytes = {}; + message.mapStringNestedMessage = {}; + message.mapStringForeignMessage = {}; + message.mapStringNestedEnum = {}; + message.mapStringForeignEnum = {}; + message.oneofField = { oneofKind: undefined }; + message.repeatedBoolWrapper = []; + message.repeatedInt32Wrapper = []; + message.repeatedInt64Wrapper = []; + message.repeatedUint32Wrapper = []; + message.repeatedUint64Wrapper = []; + message.repeatedFloatWrapper = []; + message.repeatedDoubleWrapper = []; + message.repeatedStringWrapper = []; + message.repeatedBytesWrapper = []; + message.optionalNullValue = 0; + message.repeatedDuration = []; + message.repeatedTimestamp = []; + message.repeatedFieldmask = []; + message.repeatedStruct = []; + message.repeatedAny = []; + message.repeatedValue = []; + message.repeatedListValue = []; + message.fieldname1 = 0; + message.fieldName2 = 0; + message.FieldName3 = 0; + message.fieldName4 = 0; + message.field0Name5 = 0; + message.field0Name6 = 0; + message.fieldName7 = 0; + message.fieldName8 = 0; + message.fieldName9 = 0; + message.fieldName10 = 0; + message.fIELDNAME11 = 0; + message.fIELDName12 = 0; + message.FieldName13 = 0; + message.FieldName14 = 0; + message.fieldName15 = 0; + message.fieldName16 = 0; + message.fieldName17 = 0; + message.fieldName18 = 0; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -2327,69 +2449,69 @@ class TestAllTypesProto3$Type extends MessageType { for (let i = 0; i < message.unpackedNestedEnum.length; i++) writer.tag(102, WireType.Varint).int32(message.unpackedNestedEnum[i]); /* map map_int32_int32 = 56; */ - for (let k of Object.keys(message.mapInt32Int32)) + for (let k of globalThis.Object.keys(message.mapInt32Int32)) writer.tag(56, WireType.LengthDelimited).fork().tag(1, WireType.Varint).int32(parseInt(k)).tag(2, WireType.Varint).int32(message.mapInt32Int32[k as any]).join(); /* map map_int64_int64 = 57; */ - for (let k of Object.keys(message.mapInt64Int64)) + for (let k of globalThis.Object.keys(message.mapInt64Int64)) writer.tag(57, WireType.LengthDelimited).fork().tag(1, WireType.Varint).int64(k).tag(2, WireType.Varint).int64(message.mapInt64Int64[k]).join(); /* map map_uint32_uint32 = 58; */ - for (let k of Object.keys(message.mapUint32Uint32)) + for (let k of globalThis.Object.keys(message.mapUint32Uint32)) writer.tag(58, WireType.LengthDelimited).fork().tag(1, WireType.Varint).uint32(parseInt(k)).tag(2, WireType.Varint).uint32(message.mapUint32Uint32[k as any]).join(); /* map map_uint64_uint64 = 59; */ - for (let k of Object.keys(message.mapUint64Uint64)) + for (let k of globalThis.Object.keys(message.mapUint64Uint64)) writer.tag(59, WireType.LengthDelimited).fork().tag(1, WireType.Varint).uint64(k).tag(2, WireType.Varint).uint64(message.mapUint64Uint64[k]).join(); /* map map_sint32_sint32 = 60; */ - for (let k of Object.keys(message.mapSint32Sint32)) + for (let k of globalThis.Object.keys(message.mapSint32Sint32)) writer.tag(60, WireType.LengthDelimited).fork().tag(1, WireType.Varint).sint32(parseInt(k)).tag(2, WireType.Varint).sint32(message.mapSint32Sint32[k as any]).join(); /* map map_sint64_sint64 = 61; */ - for (let k of Object.keys(message.mapSint64Sint64)) + for (let k of globalThis.Object.keys(message.mapSint64Sint64)) writer.tag(61, WireType.LengthDelimited).fork().tag(1, WireType.Varint).sint64(k).tag(2, WireType.Varint).sint64(message.mapSint64Sint64[k]).join(); /* map map_fixed32_fixed32 = 62; */ - for (let k of Object.keys(message.mapFixed32Fixed32)) + for (let k of globalThis.Object.keys(message.mapFixed32Fixed32)) writer.tag(62, WireType.LengthDelimited).fork().tag(1, WireType.Bit32).fixed32(parseInt(k)).tag(2, WireType.Bit32).fixed32(message.mapFixed32Fixed32[k as any]).join(); /* map map_fixed64_fixed64 = 63; */ - for (let k of Object.keys(message.mapFixed64Fixed64)) + for (let k of globalThis.Object.keys(message.mapFixed64Fixed64)) writer.tag(63, WireType.LengthDelimited).fork().tag(1, WireType.Bit64).fixed64(k).tag(2, WireType.Bit64).fixed64(message.mapFixed64Fixed64[k]).join(); /* map map_sfixed32_sfixed32 = 64; */ - for (let k of Object.keys(message.mapSfixed32Sfixed32)) + for (let k of globalThis.Object.keys(message.mapSfixed32Sfixed32)) writer.tag(64, WireType.LengthDelimited).fork().tag(1, WireType.Bit32).sfixed32(parseInt(k)).tag(2, WireType.Bit32).sfixed32(message.mapSfixed32Sfixed32[k as any]).join(); /* map map_sfixed64_sfixed64 = 65; */ - for (let k of Object.keys(message.mapSfixed64Sfixed64)) + for (let k of globalThis.Object.keys(message.mapSfixed64Sfixed64)) writer.tag(65, WireType.LengthDelimited).fork().tag(1, WireType.Bit64).sfixed64(k).tag(2, WireType.Bit64).sfixed64(message.mapSfixed64Sfixed64[k]).join(); /* map map_int32_float = 66; */ - for (let k of Object.keys(message.mapInt32Float)) + for (let k of globalThis.Object.keys(message.mapInt32Float)) writer.tag(66, WireType.LengthDelimited).fork().tag(1, WireType.Varint).int32(parseInt(k)).tag(2, WireType.Bit32).float(message.mapInt32Float[k as any]).join(); /* map map_int32_double = 67; */ - for (let k of Object.keys(message.mapInt32Double)) + for (let k of globalThis.Object.keys(message.mapInt32Double)) writer.tag(67, WireType.LengthDelimited).fork().tag(1, WireType.Varint).int32(parseInt(k)).tag(2, WireType.Bit64).double(message.mapInt32Double[k as any]).join(); /* map map_bool_bool = 68; */ - for (let k of Object.keys(message.mapBoolBool)) + for (let k of globalThis.Object.keys(message.mapBoolBool)) writer.tag(68, WireType.LengthDelimited).fork().tag(1, WireType.Varint).bool(k === "true").tag(2, WireType.Varint).bool(message.mapBoolBool[k]).join(); /* map map_string_string = 69; */ - for (let k of Object.keys(message.mapStringString)) + for (let k of globalThis.Object.keys(message.mapStringString)) writer.tag(69, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).string(message.mapStringString[k]).join(); /* map map_string_bytes = 70; */ - for (let k of Object.keys(message.mapStringBytes)) + for (let k of globalThis.Object.keys(message.mapStringBytes)) writer.tag(70, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.LengthDelimited).bytes(message.mapStringBytes[k]).join(); /* map map_string_nested_message = 71; */ - for (let k of Object.keys(message.mapStringNestedMessage)) { + for (let k of globalThis.Object.keys(message.mapStringNestedMessage)) { writer.tag(71, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k); writer.tag(2, WireType.LengthDelimited).fork(); TestAllTypesProto3_NestedMessage.internalBinaryWrite(message.mapStringNestedMessage[k], writer, options); writer.join().join(); } /* map map_string_foreign_message = 72; */ - for (let k of Object.keys(message.mapStringForeignMessage)) { + for (let k of globalThis.Object.keys(message.mapStringForeignMessage)) { writer.tag(72, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k); writer.tag(2, WireType.LengthDelimited).fork(); ForeignMessage.internalBinaryWrite(message.mapStringForeignMessage[k], writer, options); writer.join().join(); } /* map map_string_nested_enum = 73; */ - for (let k of Object.keys(message.mapStringNestedEnum)) + for (let k of globalThis.Object.keys(message.mapStringNestedEnum)) writer.tag(73, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.Varint).int32(message.mapStringNestedEnum[k]).join(); /* map map_string_foreign_enum = 74; */ - for (let k of Object.keys(message.mapStringForeignEnum)) + for (let k of globalThis.Object.keys(message.mapStringForeignEnum)) writer.tag(74, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k).tag(2, WireType.Varint).int32(message.mapStringForeignEnum[k]).join(); /* uint32 oneof_uint32 = 111; */ if (message.oneofField.oneofKind === "oneofUint32") @@ -2590,8 +2712,8 @@ class TestAllTypesProto3_NestedMessage$Type extends MessageType): TestAllTypesProto3_NestedMessage { - const message = { a: 0 }; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); + message.a = 0; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -2643,8 +2765,8 @@ class ForeignMessage$Type extends MessageType { ]); } create(value?: PartialMessage): ForeignMessage { - const message = { c: 0 }; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); + message.c = 0; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -2688,8 +2810,7 @@ class NullHypothesisProto3$Type extends MessageType { super("protobuf_test_messages.proto3.NullHypothesisProto3", []); } create(value?: PartialMessage): NullHypothesisProto3 { - const message = {}; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -2714,8 +2835,7 @@ class EnumOnlyProto3$Type extends MessageType { super("protobuf_test_messages.proto3.EnumOnlyProto3", []); } create(value?: PartialMessage): EnumOnlyProto3 { - const message = {}; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); if (value !== undefined) reflectionMergePartial(this, message, value); return message; diff --git a/impl/protobuf-ts/gen/google/protobuf/timestamp.ts b/impl/protobuf-ts/gen/google/protobuf/timestamp.ts index 077ba14d..adff9585 100644 --- a/impl/protobuf-ts/gen/google/protobuf/timestamp.ts +++ b/impl/protobuf-ts/gen/google/protobuf/timestamp.ts @@ -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/timestamp.proto" (package "google.protobuf", syntax proto3) // tslint:disable // @ts-nocheck @@ -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"; @@ -136,7 +135,7 @@ import { MessageType } from "@protobuf-ts/runtime"; * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use * the Joda Time's [`ISODateTimeFormat.dateTime()`]( - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D + * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() * ) to obtain a formatter capable of generating timestamps in this format. * * @@ -241,8 +240,9 @@ class Timestamp$Type extends MessageType { return target; } create(value?: PartialMessage): Timestamp { - 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(this, message, value); return message; diff --git a/impl/protobuf-ts/gen/google/protobuf/wrappers.ts b/impl/protobuf-ts/gen/google/protobuf/wrappers.ts index 5673b8f5..6620b2fd 100644 --- a/impl/protobuf-ts/gen/google/protobuf/wrappers.ts +++ b/impl/protobuf-ts/gen/google/protobuf/wrappers.ts @@ -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/wrappers.proto" (package "google.protobuf", syntax proto3) // tslint:disable // @ts-nocheck @@ -53,7 +53,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 type { JsonValue } from "@protobuf-ts/runtime"; import type { JsonReadOptions } from "@protobuf-ts/runtime"; import type { JsonWriteOptions } from "@protobuf-ts/runtime"; @@ -216,8 +215,8 @@ class DoubleValue$Type extends MessageType { return target; } create(value?: PartialMessage): DoubleValue { - const message = { value: 0 }; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); + message.value = 0; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -278,8 +277,8 @@ class FloatValue$Type extends MessageType { return target; } create(value?: PartialMessage): FloatValue { - const message = { value: 0 }; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); + message.value = 0; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -340,8 +339,8 @@ class Int64Value$Type extends MessageType { return target; } create(value?: PartialMessage): Int64Value { - const message = { value: 0n }; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); + message.value = 0n; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -402,8 +401,8 @@ class UInt64Value$Type extends MessageType { return target; } create(value?: PartialMessage): UInt64Value { - const message = { value: 0n }; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); + message.value = 0n; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -464,8 +463,8 @@ class Int32Value$Type extends MessageType { return target; } create(value?: PartialMessage): Int32Value { - const message = { value: 0 }; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); + message.value = 0; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -526,8 +525,8 @@ class UInt32Value$Type extends MessageType { return target; } create(value?: PartialMessage): UInt32Value { - const message = { value: 0 }; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); + message.value = 0; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -588,8 +587,8 @@ class BoolValue$Type extends MessageType { return target; } create(value?: PartialMessage): BoolValue { - const message = { value: false }; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); + message.value = false; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -650,8 +649,8 @@ class StringValue$Type extends MessageType { return target; } create(value?: PartialMessage): StringValue { - const message = { value: "" }; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); + message.value = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -712,8 +711,8 @@ class BytesValue$Type extends MessageType { return target; } create(value?: PartialMessage): BytesValue { - const message = { value: new Uint8Array(0) }; - globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this }); + const message = globalThis.Object.create((this.messagePrototype!)); + message.value = new Uint8Array(0); if (value !== undefined) reflectionMergePartial(this, message, value); return message; diff --git a/impl/protobuf-ts/package-lock.json b/impl/protobuf-ts/package-lock.json index b6f5bc24..0e9050ac 100644 --- a/impl/protobuf-ts/package-lock.json +++ b/impl/protobuf-ts/package-lock.json @@ -6,20 +6,20 @@ "": { "name": "protobuf-es-conformance", "dependencies": { - "@protobuf-ts/plugin": "^2.9.1", + "@protobuf-ts/plugin": "^2.9.3", "@protobuf-ts/runtime": "^2.9.1" }, "devDependencies": { - "@bufbuild/buf": "^1.27.2", - "@types/node": "^20.8.10", + "@bufbuild/buf": "^1.28.1", + "@types/node": "^20.10.6", "tsx": "^4.7.0", - "typescript": "^5.2.2" + "typescript": "^5.3.3" } }, "node_modules/@bufbuild/buf": { - "version": "1.27.2", - "resolved": "https://registry.npmjs.org/@bufbuild/buf/-/buf-1.27.2.tgz", - "integrity": "sha512-hwZYF0DCxvmTAZIAeT/q66HYtIxnSH9jn/CVElaJA/l+Clr9zhLdfKFd1yD2lMqHpNUEeXtA8T0ABXv29NVfYQ==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/@bufbuild/buf/-/buf-1.28.1.tgz", + "integrity": "sha512-WRDagrf0uBjfV9s5eyrSPJDcdI4A5Q7JMCA4aMrHRR8fo/TTjniDBjJprszhaguqsDkn/LS4QIu92HVFZCrl9A==", "dev": true, "hasInstallScript": true, "bin": { @@ -31,18 +31,18 @@ "node": ">=12" }, "optionalDependencies": { - "@bufbuild/buf-darwin-arm64": "1.27.2", - "@bufbuild/buf-darwin-x64": "1.27.2", - "@bufbuild/buf-linux-aarch64": "1.27.2", - "@bufbuild/buf-linux-x64": "1.27.2", - "@bufbuild/buf-win32-arm64": "1.27.2", - "@bufbuild/buf-win32-x64": "1.27.2" + "@bufbuild/buf-darwin-arm64": "1.28.1", + "@bufbuild/buf-darwin-x64": "1.28.1", + "@bufbuild/buf-linux-aarch64": "1.28.1", + "@bufbuild/buf-linux-x64": "1.28.1", + "@bufbuild/buf-win32-arm64": "1.28.1", + "@bufbuild/buf-win32-x64": "1.28.1" } }, "node_modules/@bufbuild/buf-darwin-arm64": { - "version": "1.27.2", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-arm64/-/buf-darwin-arm64-1.27.2.tgz", - "integrity": "sha512-ob1IAhFVsAVUr5o4EAwoeQ6FOGJdiS6eYGTGQiZzJEAYSs2dX/WQ9+Xz9EPQUb93n7PMjNs38DLDfwGQ3u3dsg==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-arm64/-/buf-darwin-arm64-1.28.1.tgz", + "integrity": "sha512-nAyvwKkcd8qQTExCZo5MtSRhXLK7e3vzKFKHjXfkveRakSUST2HFlFZAHfErZimN4wBrPTN0V0hNRU8PPjkMpQ==", "cpu": [ "arm64" ], @@ -56,9 +56,9 @@ } }, "node_modules/@bufbuild/buf-darwin-x64": { - "version": "1.27.2", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-x64/-/buf-darwin-x64-1.27.2.tgz", - "integrity": "sha512-Kp0HBvLjeOxJtZ/j3vOulX6G3u5pa9vksVmJ5HGjhL0BZJwavh8Bd9YgrBDrTzKtTQMHxmhTSaNEgNUWkjecfw==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-x64/-/buf-darwin-x64-1.28.1.tgz", + "integrity": "sha512-b0eT3xd3vX5a5lWAbo5h7FPuf9MsOJI4I39qs4TZnrlZ8BOuPfqzwzijiFf9UCwaX2vR1NQXexIoQ80Ci+fCHw==", "cpu": [ "x64" ], @@ -72,9 +72,9 @@ } }, "node_modules/@bufbuild/buf-linux-aarch64": { - "version": "1.27.2", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-aarch64/-/buf-linux-aarch64-1.27.2.tgz", - "integrity": "sha512-rq+bpT+FMR1iiUvcHno1SPS4e0Ydr+F7ArIzN5cO4DKL09sBJXcaVGa7fRRlBZvNJTt3XRVtlE8LNLGH7zjBOg==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-aarch64/-/buf-linux-aarch64-1.28.1.tgz", + "integrity": "sha512-p5h9bZCVLMh8No9/7k7ulXzsFx5P7Lu6DiUMjSJ6aBXPMYo6Xl7r/6L2cQkpsZ53HMtIxCgMYS9a7zoS4K8wIw==", "cpu": [ "arm64" ], @@ -88,9 +88,9 @@ } }, "node_modules/@bufbuild/buf-linux-x64": { - "version": "1.27.2", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-x64/-/buf-linux-x64-1.27.2.tgz", - "integrity": "sha512-t/lcJ06gELy+4hVROuoeX8Y+oXq9NrPX+UgT5WujGo21oOb8UAQETZLRefj2U4IRqYqXhTKicfOI2y8xI7CSlQ==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-x64/-/buf-linux-x64-1.28.1.tgz", + "integrity": "sha512-fVJ3DiRigIso06jgEl+JNp59Y5t2pxDHd10d3SA4r+14sXbZ2J7Gy/wBqVXPry4x/jW567KKlvmhg7M5ZBgCQQ==", "cpu": [ "x64" ], @@ -104,9 +104,9 @@ } }, "node_modules/@bufbuild/buf-win32-arm64": { - "version": "1.27.2", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-arm64/-/buf-win32-arm64-1.27.2.tgz", - "integrity": "sha512-rJieGmtSw4tfteW6mhjdtDDTFBbl2HBan1FnfNAOZH4ZrTwfcOO5Vn3fUMl+jPtiCpTscyzVaYHI+LvYffSdvg==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-arm64/-/buf-win32-arm64-1.28.1.tgz", + "integrity": "sha512-KJiRJpugQRK/jXC46Xjlb68UydWhCZj2jHdWLIwNtgXd1WTJ3LngChZV7Y6pPK08pwBAVz0JYeVbD5IlTCD4TQ==", "cpu": [ "arm64" ], @@ -120,9 +120,9 @@ } }, "node_modules/@bufbuild/buf-win32-x64": { - "version": "1.27.2", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-x64/-/buf-win32-x64-1.27.2.tgz", - "integrity": "sha512-x9IKCHgj6GmDGH2xlTo80l2feNU3hUeoEwLFLH4I5Qs2L1gfYIDMZGp+0Bhm5eK9CIWYtkJqeqGRIJkrJA6CfQ==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-x64/-/buf-win32-x64-1.28.1.tgz", + "integrity": "sha512-vMnc+7OVCkmlRWQsgYHgUqiBPRIjD8XeoRyApJ07YZzGs7DkRH4LhvmacJbLd3wORylbn6gLz3pQa8J/M61mzg==", "cpu": [ "x64" ], @@ -504,14 +504,14 @@ } }, "node_modules/@protobuf-ts/plugin": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/@protobuf-ts/plugin/-/plugin-2.9.1.tgz", - "integrity": "sha512-svkFSyFgTtaLdDFPGvd6cTu8qK5Nul5RizDCTcv0xWRzcPWtMiqbuCLKCv6E9gdpnAs3MPeQTnSABB2+NhfWBg==", + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/@protobuf-ts/plugin/-/plugin-2.9.3.tgz", + "integrity": "sha512-tHYACv+nnIV2eoiMxeZhrgMqGiUktzUzrhfgnROg/rr8TecPLp9v5/yqNibN+bad5k7d57aqlTuQKhFl+J4W/g==", "dependencies": { - "@protobuf-ts/plugin-framework": "^2.9.1", - "@protobuf-ts/protoc": "^2.9.1", - "@protobuf-ts/runtime": "^2.9.1", - "@protobuf-ts/runtime-rpc": "^2.9.1", + "@protobuf-ts/plugin-framework": "^2.9.3", + "@protobuf-ts/protoc": "^2.9.3", + "@protobuf-ts/runtime": "^2.9.3", + "@protobuf-ts/runtime-rpc": "^2.9.3", "typescript": "^3.9" }, "bin": { @@ -520,11 +520,11 @@ } }, "node_modules/@protobuf-ts/plugin-framework": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/@protobuf-ts/plugin-framework/-/plugin-framework-2.9.1.tgz", - "integrity": "sha512-/4sHdsXjp6KKkbpcCLUHpMfdYsCaqqQHRAwoxVzHmltsotw06B/K9HglZtkQx0IpLO4eeF3vNr3n7qzjD3e2zA==", + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/@protobuf-ts/plugin-framework/-/plugin-framework-2.9.3.tgz", + "integrity": "sha512-iqdkhAu7fGPvBCVOoAEEFJ1/oaGIBoNIMgSv2WonTNJVHxv5FvvAfWFn6nG/eta34fHRZT38ZXTaYcMUkv8AiQ==", "dependencies": { - "@protobuf-ts/runtime": "^2.9.1", + "@protobuf-ts/runtime": "^2.9.3", "typescript": "^3.9" } }, @@ -553,30 +553,30 @@ } }, "node_modules/@protobuf-ts/protoc": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/@protobuf-ts/protoc/-/protoc-2.9.1.tgz", - "integrity": "sha512-/q2iVDwVDijfZlFZnnm3W6ALbybNskNSww88TfYBaJH49PuQMqhcXUPRu28UouJr9sc/Lr5k6t0TB9Nff3UIsA==", + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/@protobuf-ts/protoc/-/protoc-2.9.3.tgz", + "integrity": "sha512-TJ0Ycx/CIBqpB4wpKt6K05kjXj6zv36s/qpdCT/wdJBhpayOVBqLF5NpLp3WIiw1PmIxvqalB6QHKjvnLzGKLA==", "bin": { "protoc": "protoc.js" } }, "node_modules/@protobuf-ts/runtime": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime/-/runtime-2.9.1.tgz", - "integrity": "sha512-ZTc8b+pQ6bwxZa3qg9/IO/M/brRkvr0tic9cSGgAsDByfPrtatT2300wTIRLDk8X9WTW1tT+FhyqmcrbMHTeww==" + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime/-/runtime-2.9.3.tgz", + "integrity": "sha512-nivzCpg/qYD0RX2OmHOahJALb8ndjGmUhNBcTJ0BbXoqKwCSM6vYA+vegzS3rhuaPgbyC7Ec8idlnizzUfIRuw==" }, "node_modules/@protobuf-ts/runtime-rpc": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime-rpc/-/runtime-rpc-2.9.1.tgz", - "integrity": "sha512-pzO20J6s07LTWcj8hKAXh/dAacU5HIVir6SANKXXH8G0pn0VIIB4FFECq5Hbv25/8PQoOGZ7iApq/DMHaSjGhg==", + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime-rpc/-/runtime-rpc-2.9.3.tgz", + "integrity": "sha512-WelHpctvZeG8yhbb7tnsrLzotq9xjMCXuGuhJ8qMyEdNoBBEodbXseofAYFTebo2/PN2LzyEq3X6vwr5f8jqTA==", "dependencies": { - "@protobuf-ts/runtime": "^2.9.1" + "@protobuf-ts/runtime": "^2.9.3" } }, "node_modules/@types/node": { - "version": "20.8.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.10.tgz", - "integrity": "sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w==", + "version": "20.10.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.6.tgz", + "integrity": "sha512-Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -675,9 +675,9 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "dev": true, "bin": { "tsc": "bin/tsc", diff --git a/impl/protobuf-ts/package.json b/impl/protobuf-ts/package.json index d5d84820..c9ffa6b8 100644 --- a/impl/protobuf-ts/package.json +++ b/impl/protobuf-ts/package.json @@ -3,13 +3,13 @@ "private": true, "type": "module", "dependencies": { - "@protobuf-ts/plugin": "^2.9.1", + "@protobuf-ts/plugin": "^2.9.3", "@protobuf-ts/runtime": "^2.9.1" }, "devDependencies": { - "@bufbuild/buf": "^1.27.2", - "@types/node": "^20.8.10", + "@bufbuild/buf": "^1.28.1", + "@types/node": "^20.10.6", "tsx": "^4.7.0", - "typescript": "^5.2.2" + "typescript": "^5.3.3" } }