Socket
Socket
Sign inDemoInstall

ts-proto

Package Overview
Dependencies
Maintainers
1
Versions
352
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-proto - npm Package Compare versions

Comparing version 1.175.0 to 1.175.1

19

build/schema.js

@@ -191,3 +191,15 @@ "use strict";

const extension = extensionCache[extendee][parseInt(key, 10) >>> 3];
resultOptions.push(getExtensionValue(ctx, extension, value));
if (shouldAddOptionDefinition(ctx, extension)) {
// todo: we should be able to create an option definition ALWAYS, however,
// we currently cannot do that because the if the extension is a sub-message
// (and thus, not just a straightforward value), we don't have an JSON object
// representation of the option - just it's encoded value. Our approach in
// getExtensionValue is to decode the encoded value into a message, but this
// Message.decode(...) method is not always included in the generated code.
// We should fix this so that we can always create an option definition by
// somehow premptively decoding the encoded value and then inserting it into
// the option defintion.
// please refer to inteegration/options-types-only to see this in action
resultOptions.push(getExtensionValue(ctx, extension, value));
}
}

@@ -199,2 +211,7 @@ if (resultOptions.length == 0) {

}
function shouldAddOptionDefinition(ctx, extension) {
return (extension.type !== ts_proto_descriptors_1.FieldDescriptorProto_Type.TYPE_MESSAGE ||
ctx.options.outputEncodeMethods === true ||
ctx.options.outputEncodeMethods == "decode-only");
}
function resolveMessageOptions(ctx, message) {

@@ -201,0 +218,0 @@ const fieldsOptions = [];

2

package.json
{
"name": "ts-proto",
"version": "1.175.0",
"version": "1.175.1",
"description": "",

@@ -5,0 +5,0 @@ "main": "build/plugin.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc