Socket
Socket
Sign inDemoInstall

@dxos/codec-protobuf

Package Overview
Dependencies
Maintainers
25
Versions
2985
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dxos/codec-protobuf - npm Package Compare versions

Comparing version 2.19.9 to 2.19.10-dev.1130d7c5

38

dist/src/stream.js

@@ -34,3 +34,9 @@ "use strict";

if (this._messageHandler) {
this._messageHandler(msg);
try {
this._messageHandler(msg);
}
catch (error) {
// Stop error propagation.
throwUnhandledRejection(error);
}
}

@@ -50,3 +56,9 @@ else {

(_a = this._dispose) === null || _a === void 0 ? void 0 : _a.call(this);
(_b = this._closeHandler) === null || _b === void 0 ? void 0 : _b.call(this, err);
try {
(_b = this._closeHandler) === null || _b === void 0 ? void 0 : _b.call(this, err);
}
catch (error) {
// Stop error propagation.
throwUnhandledRejection(error);
}
}

@@ -82,3 +94,9 @@ });

for (const message of this._buffer) {
onMessage(message);
try {
onMessage(message);
}
catch (error) {
// Stop error propagation.
throwUnhandledRejection(error);
}
}

@@ -112,2 +130,16 @@ this._buffer = null;

exports.Stream = Stream;
/**
* Asynchronously produces an unhandled rejection.
*
* Will terminate the node process with an error.
* In browser results in an error message in the console.
* In mocha tests it fails the currently running test.
*
* NOTE: Copied from @dxos/debug to avoid circular dependency.
*/
function throwUnhandledRejection(error) {
setTimeout(() => {
throw error;
});
}
//# sourceMappingURL=stream.js.map

2

package.json
{
"name": "@dxos/codec-protobuf",
"version": "2.19.9",
"version": "2.19.10-dev.1130d7c5",
"license": "AGPL-3.0",

@@ -5,0 +5,0 @@ "author": "DXOS.org",

@@ -71,3 +71,8 @@ //

if (this._messageHandler) {
this._messageHandler(msg);
try {
this._messageHandler(msg);
} catch (error: any) {
// Stop error propagation.
throwUnhandledRejection(error);
}
} else {

@@ -86,3 +91,8 @@ assert(this._buffer);

this._dispose?.();
this._closeHandler?.(err);
try {
this._closeHandler?.(err);
} catch (error: any) {
// Stop error propagation.
throwUnhandledRejection(error);
}
}

@@ -101,3 +111,8 @@ });

for (const message of this._buffer) {
onMessage(message);
try {
onMessage(message);
} catch (error: any) {
// Stop error propagation.
throwUnhandledRejection(error);
}
}

@@ -134,1 +149,16 @@ this._buffer = null;

}
/**
* Asynchronously produces an unhandled rejection.
*
* Will terminate the node process with an error.
* In browser results in an error message in the console.
* In mocha tests it fails the currently running test.
*
* NOTE: Copied from @dxos/debug to avoid circular dependency.
*/
function throwUnhandledRejection (error: Error) {
setTimeout(() => {
throw error;
});
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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