@bufbuild/protoc-gen-es 1.5.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bufbuild/protoc-gen-es",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Protocol Buffers code generator for ECMAScript",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -20,11 +20,11 @@
20
20
  },
21
21
  "preferUnplugged": true,
22
22
  "dependencies": {
23
- "@bufbuild/protobuf": "^1.5.0",
24
- "@bufbuild/protoplugin": "1.5.0"
23
+ "@bufbuild/protobuf": "^1.5.1",
24
+ "@bufbuild/protoplugin": "1.5.1"
25
25
  },
26
26
  "peerDependencies": {
27
- "@bufbuild/protobuf": "1.5.0"
27
+ "@bufbuild/protobuf": "1.5.1"
28
28
  },
29
29
  "peerDependenciesMeta": {
30
30
  "@bufbuild/protobuf": {
@@ -119,6 +119,9 @@ function generateFieldInfo(schema, f, field) {
119
119
  break;
120
120
  case "message":
121
121
  e.push(`kind: "message", T: `, field.message, `, `);
122
+ if (field.proto.type === protobuf_1.FieldDescriptorProto_Type.GROUP) {
123
+ e.push(`delimited: true, `);
124
+ }
122
125
  break;
123
126
  case "enum":
124
127
  e.push(`kind: "enum", T: `, protoN, `.getEnumType(`, field.enum, `), `);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bufbuild/protoc-gen-es",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Protocol Buffers code generator for ECMAScript",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -20,11 +20,11 @@
20
20
  },
21
21
  "preferUnplugged": true,
22
22
  "dependencies": {
23
- "@bufbuild/protobuf": "^1.5.0",
24
- "@bufbuild/protoplugin": "1.5.0"
23
+ "@bufbuild/protobuf": "^1.5.1",
24
+ "@bufbuild/protoplugin": "1.5.1"
25
25
  },
26
26
  "peerDependencies": {
27
- "@bufbuild/protobuf": "1.5.0"
27
+ "@bufbuild/protobuf": "1.5.1"
28
28
  },
29
29
  "peerDependenciesMeta": {
30
30
  "@bufbuild/protobuf": {
package/src/javascript.ts CHANGED
@@ -13,7 +13,13 @@
13
13
  // limitations under the License.
14
14
 
15
15
  import type { DescEnum, DescField, DescMessage } from "@bufbuild/protobuf";
16
- import { LongType, proto2, proto3, ScalarType } from "@bufbuild/protobuf";
16
+ import {
17
+ FieldDescriptorProto_Type,
18
+ LongType,
19
+ proto2,
20
+ proto3,
21
+ ScalarType,
22
+ } from "@bufbuild/protobuf";
17
23
  import type {
18
24
  GeneratedFile,
19
25
  Printable,
@@ -130,6 +136,9 @@ export function generateFieldInfo(schema: Schema, f: GeneratedFile, field: DescF
130
136
  break;
131
137
  case "message":
132
138
  e.push(`kind: "message", T: `, field.message, `, `);
139
+ if (field.proto.type === FieldDescriptorProto_Type.GROUP) {
140
+ e.push(`delimited: true, `);
141
+ }
133
142
  break;
134
143
  case "enum":
135
144
  e.push(`kind: "enum", T: `, protoN, `.getEnumType(`, field.enum, `), `);