Comparing version 1.169.1 to 1.170.0
@@ -333,5 +333,9 @@ "use strict"; | ||
// When useOptionals='messages', non-scalar fields are translated into optional | ||
// properties. When useOptionals='all', all fields are translated into | ||
// properties. | ||
// When useOptionals='all', all fields are translated into | ||
// optional properties, with the exception of map Entry key/values, which must | ||
// always be present. | ||
// When useOptionals='deprecatedOnly', all deprecated fields are translated into | ||
// optional properties, with the exception of map Entry key/values, which must | ||
// always be present. | ||
// OneOf fields are always optional, whenever oneof=unions option not in use. | ||
@@ -341,4 +345,5 @@ function isOptionalProperty(field, messageOptions, options, isProto3Syntax) { | ||
const optionalAll = options.useOptionals === "all"; | ||
const deprecatedOnly = options.useOptionals === "deprecatedOnly" && field.options && field.options.deprecated; | ||
return ((optionalMessages && isMessage(field) && !isRepeated(field)) || | ||
(optionalAll && !(messageOptions === null || messageOptions === void 0 ? void 0 : messageOptions.mapEntry)) || | ||
((optionalAll || deprecatedOnly) && !(messageOptions === null || messageOptions === void 0 ? void 0 : messageOptions.mapEntry)) || | ||
// file is proto2, we have enabled proto2 optionals, and the field itself is optional | ||
@@ -345,0 +350,0 @@ (!isProto3Syntax && |
{ | ||
"name": "ts-proto", | ||
"version": "1.169.1", | ||
"version": "1.170.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "build/plugin.js", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
350503
6070