Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@protobuf-ts/runtime

Package Overview
Dependencies
Maintainers
1
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@protobuf-ts/runtime - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4-alpha.0

4

build/commonjs/binary-format-contract.js

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

* Used for fixed64, sfixed64, double.
* Always 8 bytes.
* Always 8 bytes with little-endian byte order.
*/

@@ -121,5 +121,5 @@ WireType[WireType["Bit64"] = 1] = "Bit64";

* Used for fixed32, sfixed32, float.
* Always 4 bytes.
* Always 4 bytes with little-endian byte order.
*/
WireType[WireType["Bit32"] = 5] = "Bit32";
})(WireType = exports.WireType || (exports.WireType = {}));

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

this.assertBounds();
return this.buf.slice(start, this.pos);
return this.buf.subarray(start, this.pos);
}

@@ -161,3 +161,3 @@ /**

this.assertBounds();
return this.buf.slice(start, this.pos);
return this.buf.subarray(start, start + len);
}

@@ -164,0 +164,0 @@ /**

@@ -10,7 +10,6 @@ "use strict";

*/
function reflectionCreate(info) {
let msg = {
[message_type_contract_1.MESSAGE_TYPE]: info,
};
for (let field of info.fields) {
function reflectionCreate(type) {
const msg = {};
Object.defineProperty(msg, message_type_contract_1.MESSAGE_TYPE, { enumerable: false, value: type });
for (let field of type.fields) {
let name = field.localName;

@@ -17,0 +16,0 @@ if (field.opt)

@@ -91,3 +91,3 @@ import { BinaryReader } from "./binary-reader";

* Used for fixed64, sfixed64, double.
* Always 8 bytes.
* Always 8 bytes with little-endian byte order.
*/

@@ -115,5 +115,5 @@ WireType[WireType["Bit64"] = 1] = "Bit64";

* Used for fixed32, sfixed32, float.
* Always 4 bytes.
* Always 4 bytes with little-endian byte order.
*/
WireType[WireType["Bit32"] = 5] = "Bit32";
})(WireType || (WireType = {}));

@@ -60,3 +60,3 @@ import { WireType } from "./binary-format-contract";

this.assertBounds();
return this.buf.slice(start, this.pos);
return this.buf.subarray(start, this.pos);
}

@@ -158,3 +158,3 @@ /**

this.assertBounds();
return this.buf.slice(start, this.pos);
return this.buf.subarray(start, start + len);
}

@@ -161,0 +161,0 @@ /**

@@ -7,7 +7,6 @@ import { reflectionScalarDefault } from "./reflection-scalar-default";

*/
export function reflectionCreate(info) {
let msg = {
[MESSAGE_TYPE]: info,
};
for (let field of info.fields) {
export function reflectionCreate(type) {
const msg = {};
Object.defineProperty(msg, MESSAGE_TYPE, { enumerable: false, value: type });
for (let field of type.fields) {
let name = field.localName;

@@ -14,0 +13,0 @@ if (field.opt)

@@ -304,3 +304,3 @@ import type { PbLong, PbULong } from "./pb-long";

* Used for fixed64, sfixed64, double.
* Always 8 bytes.
* Always 8 bytes with little-endian byte order.
*/

@@ -328,3 +328,3 @@ Bit64 = 1,

* Used for fixed32, sfixed32, float.
* Always 4 bytes.
* Always 4 bytes with little-endian byte order.
*/

@@ -331,0 +331,0 @@ Bit32 = 5

@@ -1,2 +0,2 @@

import type { MessageInfo } from "./reflection-info";
import type { IMessageType } from './message-type-contract';
/**

@@ -6,2 +6,2 @@ * Creates an instance of the generic message, using the field

*/
export declare function reflectionCreate(info: MessageInfo): any;
export declare function reflectionCreate<T extends object>(type: IMessageType<T>): T;
{
"name": "@protobuf-ts/runtime",
"version": "2.0.3",
"version": "2.0.4-alpha.0",
"description": "Runtime library for code generated by the protoc plugin \"protobuf-ts\"",

@@ -40,3 +40,3 @@ "license": "(Apache-2.0 AND BSD-3-Clause)",

},
"gitHead": "0f8b4e0b3a342b4c9eefc66c3568170096446a8f"
"gitHead": "7053541f16529b5cc24287b13b57be0156c75bae"
}
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