@bufbuild/protoc-gen-es 2.11.0 → 2.12.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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @bufbuild/protoc-gen-es
2
2
 
3
- The code generator plugin for Protocol Buffers for ECMAScript. Learn more about the project at [github.com/bufbuild/protobuf-es](https://github.com/bufbuild/protobuf-es).
3
+ The code generator plugin for Protocol Buffers for ECMAScript. Learn more about the project at [protobufes.com](https://protobufes.com/).
4
4
 
5
5
  ## Installation
6
6
 
@@ -107,7 +107,7 @@ By default, [protoc-gen-es] inserts its version number at the top of each genera
107
107
 
108
108
  ### `json_types=true`
109
109
 
110
- Generates JSON types for every Protobuf message and enumeration. Calling `toJson()` automatically returns the JSON type if available. Learn more about [JSON types](https://github.com/bufbuild/protobuf-es/blob/main/MANUAL.md#json-types).
110
+ Generates JSON types for every Protobuf message and enumeration. Calling `toJson()` automatically returns the JSON type if available. Learn more about [JSON types](https://protobufes.com/reference/json-types/).
111
111
 
112
112
  ### `valid_types` (experimental)
113
113
 
@@ -118,4 +118,4 @@ Generates a Valid type for every Protobuf message. Possible values:
118
118
 
119
119
  You can combine both options with `+`—for example, `valid_types=legacy_required+protovalidate_required`.
120
120
 
121
- Learn more about [Valid types](https://github.com/bufbuild/protobuf-es/blob/main/MANUAL.md#valid-types).
121
+ Learn more about [Valid types](https://protobufes.com/reference/valid-types/).
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bufbuild/protoc-gen-es",
3
- "version": "2.11.0",
3
+ "version": "2.12.1",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Protocol Buffers code generator for ECMAScript",
6
6
  "keywords": [
@@ -10,6 +10,7 @@
10
10
  "ecmascript",
11
11
  "protoc-plugin"
12
12
  ],
13
+ "homepage": "https://protobufes.com/",
13
14
  "repository": {
14
15
  "type": "git",
15
16
  "url": "https://github.com/bufbuild/protobuf-es.git",
@@ -32,14 +33,14 @@
32
33
  },
33
34
  "preferUnplugged": true,
34
35
  "dependencies": {
35
- "@bufbuild/protobuf": "2.11.0",
36
- "@bufbuild/protoplugin": "2.11.0"
36
+ "@bufbuild/protobuf": "2.12.1",
37
+ "@bufbuild/protoplugin": "2.12.1"
37
38
  },
38
39
  "devDependencies": {
39
40
  "upstream-protobuf": "*"
40
41
  },
41
42
  "peerDependencies": {
42
- "@bufbuild/protobuf": "2.11.0"
43
+ "@bufbuild/protobuf": "2.12.1"
43
44
  },
44
45
  "peerDependenciesMeta": {
45
46
  "@bufbuild/protobuf": {
@@ -63,7 +63,7 @@ export type RepeatedRules = Message<"buf.validate.RepeatedRules"> & {
63
63
  /**
64
64
  * @generated from field: optional buf.validate.FieldRules items = 4;
65
65
  */
66
- items?: FieldRules;
66
+ items?: FieldRules | undefined;
67
67
  };
68
68
  /**
69
69
  * Describes the message buf.validate.RepeatedRules.
@@ -77,7 +77,7 @@ export type MapRules = Message<"buf.validate.MapRules"> & {
77
77
  /**
78
78
  * @generated from field: optional buf.validate.FieldRules values = 5;
79
79
  */
80
- values?: FieldRules;
80
+ values?: FieldRules | undefined;
81
81
  };
82
82
  /**
83
83
  * Describes the message buf.validate.MapRules.
@@ -439,7 +439,7 @@ function generateMessageShapeMember(f, member, validTypes) {
439
439
  }
440
440
  }
441
441
  if (optional) {
442
- f.print(" ", member.localName, "?: ", typing, ";");
442
+ f.print(" ", member.localName, "?: ", typing, " | undefined;");
443
443
  }
444
444
  else {
445
445
  f.print(" ", member.localName, ": ", typing, ";");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bufbuild/protoc-gen-es",
3
- "version": "2.11.0",
3
+ "version": "2.12.1",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Protocol Buffers code generator for ECMAScript",
6
6
  "keywords": [
@@ -10,6 +10,7 @@
10
10
  "ecmascript",
11
11
  "protoc-plugin"
12
12
  ],
13
+ "homepage": "https://protobufes.com/",
13
14
  "repository": {
14
15
  "type": "git",
15
16
  "url": "https://github.com/bufbuild/protobuf-es.git",
@@ -32,14 +33,14 @@
32
33
  },
33
34
  "preferUnplugged": true,
34
35
  "dependencies": {
35
- "@bufbuild/protobuf": "2.11.0",
36
- "@bufbuild/protoplugin": "2.11.0"
36
+ "@bufbuild/protobuf": "2.12.1",
37
+ "@bufbuild/protoplugin": "2.12.1"
37
38
  },
38
39
  "devDependencies": {
39
40
  "upstream-protobuf": "*"
40
41
  },
41
42
  "peerDependencies": {
42
- "@bufbuild/protobuf": "2.11.0"
43
+ "@bufbuild/protobuf": "2.12.1"
43
44
  },
44
45
  "peerDependenciesMeta": {
45
46
  "@bufbuild/protobuf": {