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

@agoric/marshal

Package Overview
Dependencies
Maintainers
5
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agoric/marshal - npm Package Compare versions

Comparing version 0.4.2-dev.0 to 0.4.2

2

CHANGELOG.md

@@ -6,3 +6,3 @@ # Change Log

## [0.4.2-dev.0](https://github.com/Agoric/agoric-sdk/compare/@agoric/marshal@0.4.1...@agoric/marshal@0.4.2-dev.0) (2021-03-26)
## [0.4.2](https://github.com/Agoric/agoric-sdk/compare/@agoric/marshal@0.4.1...@agoric/marshal@0.4.2) (2021-04-06)

@@ -9,0 +9,0 @@ **Note:** Version bump only for package @agoric/marshal

{
"name": "@agoric/marshal",
"version": "0.4.2-dev.0",
"version": "0.4.2",
"description": "marshal",

@@ -39,9 +39,10 @@ "parsers": {

"dependencies": {
"@agoric/assert": "^0.2.5-dev.0",
"@agoric/eventual-send": "^0.13.5-dev.0",
"@agoric/assert": "^0.2.5",
"@agoric/eventual-send": "^0.13.5",
"@agoric/nat": "^4.0.0",
"@agoric/promise-kit": "^0.2.5-dev.0"
"@agoric/promise-kit": "^0.2.5"
},
"devDependencies": {
"@agoric/install-ses": "^0.5.5-dev.0",
"@agoric/install-ses": "^0.5.5",
"@agoric/swingset-vat": "^0.15.0",
"ava": "^3.12.1",

@@ -77,3 +78,3 @@ "esm": "^3.2.25",

},
"gitHead": "3600ed30e30d2b26512fe8fd8e73d9f13ab0d125"
"gitHead": "fda787c49e9e3a80c3b2c3b0e620da0208ca7a3e"
}

@@ -526,4 +526,7 @@ // @ts-check

{
errorTagging = 'on',
marshalName = 'anon-marshal',
errorTagging = 'on',
// TODO Temporary hack.
// See https://github.com/Agoric/agoric-sdk/issues/2780
errorIdNum = 10000,
// We prefer that the caller instead log to somewhere hidden

@@ -540,8 +543,5 @@ // to be revealed when correlating with the received error.

);
// Ascending numbers identifying the sending of errors relative to this
// marshal instance.
let errorCount = 0;
const nextErrorId = () => {
errorCount += 1;
return `error:${marshalName}#${errorCount}`;
errorIdNum += 1;
return `error:${marshalName}#${errorIdNum}`;
};

@@ -871,8 +871,9 @@

const EC = getErrorConstructor(`${name}`) || Error;
const error = harden(new EC(`${message}`));
// errorId is a late addition so be tolerant of its absence.
const errorName =
errorId === undefined
? `Remote${EC.name}`
: `Remote${EC.name}(${errorId})`;
const error = assert.error(`${message}`, EC, { errorName });
ibidTable.register(error);
if (typeof errorId === 'string') {
// errorId is a late addition so be tolerant of its absence.
assert.note(error, X`Received as ${errorId}`);
}
return error;

@@ -879,0 +880,0 @@ }

@@ -164,5 +164,16 @@ // eslint-disable-next-line spaced-comment

* @typedef MakeMarshalOptions
* @property {string=} marshalName
* @property {'on'|'off'=} errorTagging
* @property {(err: Error) => void=} marshalSaveError
* @property {'on'|'off'=} errorTagging controls whether serialized errors
* also carry tagging information, made from `marshalName` and numbers
* generated (currently by counting) starting at `errorIdNum`. The
* `errorTagging` option defaults to `'on'`. Serialized
* errors are also logged to `marshalSaveError` only if tagging is `'on'`.
* @property {string=} marshalName Used to identify sent errors.
* @property {number=} errorIdNum Ascending numbers staring from here
* identify the sending of errors relative to this marshal instance.
* @property {(err: Error) => void=} marshalSaveError If `errorTagging` is
* `'on'`, then errors serialized by this marshal instance are also
* logged by calling `marshalSaveError` *after* `assert.note` associated
* that error with its errorId. Thus, if `marshalSaveError` in turn logs
* to the normal console, which is the default, then the console will
* show that note showing the associated errorId.
*/

@@ -169,0 +180,0 @@

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