🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

protobufjs

Package Overview
Dependencies
Maintainers
2
Versions
183
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protobufjs - npm Package Compare versions

Comparing version

to
8.1.6-experimental

4

dist/minimal/protobuf.min.js
/*!
* protobuf.js v8.1.5-experimental (c) 2016, daniel wirtz
* compiled tue, 27 may 2025 20:34:38 utc
* protobuf.js v8.1.6-experimental (c) 2016, daniel wirtz
* compiled tue, 27 may 2025 22:16:18 utc
* licensed under the bsd-3-clause license

@@ -5,0 +5,0 @@ * see: https://github.com/dcodeio/protobuf.js for details

@@ -866,3 +866,3 @@ "use strict";

function fixDescriptorOptionsRecursive(obj, type) {
function fromDescriptorOptionsRecursive(obj, type) {
var val = {};

@@ -875,3 +875,3 @@ for (var i = 0, field, key; i < type.fieldsArray.length; ++i) {

if (field.resolvedType instanceof Type) {
val[newKey] = fixDescriptorOptionsRecursive(obj[key], field.resolvedType);
val[newKey] = fromDescriptorOptionsRecursive(obj[key], field.resolvedType);
} else if(field.resolvedType instanceof Enum) {

@@ -890,6 +890,6 @@ val[newKey] = field.resolvedType.valuesById[obj[key]];

return undefined;
return fixDescriptorOptionsRecursive(type.toObject(options), type);
return fromDescriptorOptionsRecursive(type.toObject(options), type);
}
function camelCaseRecursive(obj) {
function toDescriptorOptionsRecursive(obj, type) {
var val = {};

@@ -900,7 +900,12 @@ var keys = Object.keys(obj);

var newKey = $protobuf.util.camelCase(key);
if (typeof obj[key] !== "object") {
if (!Object.prototype.hasOwnProperty.call(type.fields, newKey)) continue;
var field = type.fields[newKey];
if (field.resolvedType instanceof Type) {
val[newKey] = toDescriptorOptionsRecursive(obj[key], field.resolvedType);
} else {
val[newKey] = obj[key];
} else {
val[newKey] = camelCaseRecursive(obj[key]);
}
if (field.repeated && !Array.isArray(val[newKey])) {
val[newKey] = [val[newKey]];
}
}

@@ -914,3 +919,3 @@ return val;

return undefined;
return type.fromObject(camelCaseRecursive(options));
return type.fromObject(toDescriptorOptionsRecursive(options, type));
}

@@ -917,0 +922,0 @@

@@ -75,2 +75,7 @@ {

},
"optionDependency": {
"rule": "repeated",
"type": "string",
"id": 15
},
"messageType": {

@@ -164,2 +169,6 @@ "rule": "repeated",

"id": 10
},
"visibility": {
"type": "SymbolVisibility",
"id": 11
}

@@ -390,2 +399,6 @@ },

"id": 5
},
"visibility": {
"type": "SymbolVisibility",
"id": 6
}

@@ -697,3 +710,6 @@ },

"type": "bool",
"id": 10
"id": 10,
"options": {
"deprecated": true
}
},

@@ -1030,27 +1046,87 @@ "debugRedact": {

"type": "FieldPresence",
"id": 1
"id": 1,
"options": {
"retention": "RETENTION_RUNTIME",
"targets": "TARGET_TYPE_FILE",
"feature_support.edition_introduced": "EDITION_2023",
"edition_defaults.edition": "EDITION_2023",
"edition_defaults.value": "EXPLICIT"
}
},
"enumType": {
"type": "EnumType",
"id": 2
"id": 2,
"options": {
"retention": "RETENTION_RUNTIME",
"targets": "TARGET_TYPE_FILE",
"feature_support.edition_introduced": "EDITION_2023",
"edition_defaults.edition": "EDITION_PROTO3",
"edition_defaults.value": "OPEN"
}
},
"repeatedFieldEncoding": {
"type": "RepeatedFieldEncoding",
"id": 3
"id": 3,
"options": {
"retention": "RETENTION_RUNTIME",
"targets": "TARGET_TYPE_FILE",
"feature_support.edition_introduced": "EDITION_2023",
"edition_defaults.edition": "EDITION_PROTO3",
"edition_defaults.value": "PACKED"
}
},
"utf8Validation": {
"type": "Utf8Validation",
"id": 4
"id": 4,
"options": {
"retention": "RETENTION_RUNTIME",
"targets": "TARGET_TYPE_FILE",
"feature_support.edition_introduced": "EDITION_2023",
"edition_defaults.edition": "EDITION_PROTO3",
"edition_defaults.value": "VERIFY"
}
},
"messageEncoding": {
"type": "MessageEncoding",
"id": 5
"id": 5,
"options": {
"retention": "RETENTION_RUNTIME",
"targets": "TARGET_TYPE_FILE",
"feature_support.edition_introduced": "EDITION_2023",
"edition_defaults.edition": "EDITION_LEGACY",
"edition_defaults.value": "LENGTH_PREFIXED"
}
},
"jsonFormat": {
"type": "JsonFormat",
"id": 6
"id": 6,
"options": {
"retention": "RETENTION_RUNTIME",
"targets": "TARGET_TYPE_FILE",
"feature_support.edition_introduced": "EDITION_2023",
"edition_defaults.edition": "EDITION_PROTO3",
"edition_defaults.value": "ALLOW"
}
},
"enforceNamingStyle": {
"type": "EnforceNamingStyle",
"id": 7
"id": 7,
"options": {
"retention": "RETENTION_SOURCE",
"targets": "TARGET_TYPE_METHOD",
"feature_support.edition_introduced": "EDITION_2024",
"edition_defaults.edition": "EDITION_2024",
"edition_defaults.value": "STYLE2024"
}
},
"defaultSymbolVisibility": {
"type": "VisibilityFeature.DefaultSymbolVisibility",
"id": 8,
"options": {
"retention": "RETENTION_SOURCE",
"targets": "TARGET_TYPE_FILE",
"feature_support.edition_introduced": "EDITION_2024",
"edition_defaults.edition": "EDITION_2024",
"edition_defaults.value": "EXPORT_TOP_LEVEL"
}
}

@@ -1128,2 +1204,22 @@ },

}
},
"VisibilityFeature": {
"fields": {},
"reserved": [
[
1,
536870911
]
],
"nested": {
"DefaultSymbolVisibility": {
"values": {
"DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": 0,
"EXPORT_ALL": 1,
"EXPORT_TOP_LEVEL": 2,
"LOCAL_ALL": 3,
"STRICT": 4
}
}
}
}

@@ -1278,2 +1374,10 @@ }

}
},
"SymbolVisibility": {
"edition": "proto2",
"values": {
"VISIBILITY_UNSET": 0,
"VISIBILITY_LOCAL": 1,
"VISIBILITY_EXPORT": 2
}
}

@@ -1280,0 +1384,0 @@ }

{
"name": "protobufjs",
"version": "8.1.5-experimental",
"version": "8.1.6-experimental",
"versionScheme": "~",

@@ -5,0 +5,0 @@ "description": "Protocol Buffers for JavaScript (& TypeScript).",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet