protobufjs 6.11.1 → 6.11.2
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/CHANGELOG.md +5 -0
- package/index.d.ts +3 -0
- package/package.json +1 -1
- package/src/field.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
### [6.11.2](https://www.github.com/protobufjs/protobuf.js/compare/v6.11.1...v6.11.2) (2021-04-30)
|
|
4
|
+
|
|
5
|
+
* regenerated index.d.ts to fix the unintended breaking change in types.
|
|
6
|
+
|
|
7
|
+
|
|
3
8
|
### [6.11.1](https://www.github.com/protobufjs/protobuf.js/compare/v6.11.0...v6.11.1) (2021-04-29)
|
|
4
9
|
|
|
5
10
|
|
package/index.d.ts
CHANGED
|
@@ -300,6 +300,9 @@ export class FieldBase extends ReflectionObject {
|
|
|
300
300
|
*/
|
|
301
301
|
constructor(name: string, id: number, type: string, rule?: (string|{ [k: string]: any }), extend?: (string|{ [k: string]: any }), options?: { [k: string]: any }, comment?: string);
|
|
302
302
|
|
|
303
|
+
/** Field rule, if any. */
|
|
304
|
+
public rule?: string;
|
|
305
|
+
|
|
303
306
|
/** Field type. */
|
|
304
307
|
public type: string;
|
|
305
308
|
|
package/package.json
CHANGED
package/src/field.js
CHANGED
|
@@ -78,13 +78,13 @@ function Field(name, id, type, rule, extend, options, comment) {
|
|
|
78
78
|
if (extend !== undefined && !util.isString(extend))
|
|
79
79
|
throw TypeError("extend must be a string");
|
|
80
80
|
|
|
81
|
+
if (rule === "proto3_optional") {
|
|
82
|
+
rule = "optional";
|
|
83
|
+
}
|
|
81
84
|
/**
|
|
82
85
|
* Field rule, if any.
|
|
83
86
|
* @type {string|undefined}
|
|
84
87
|
*/
|
|
85
|
-
if (rule === "proto3_optional") {
|
|
86
|
-
rule = "optional";
|
|
87
|
-
}
|
|
88
88
|
this.rule = rule && rule !== "optional" ? rule : undefined; // toJSON
|
|
89
89
|
|
|
90
90
|
/**
|