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.5.1-dev-a4c353a.0 to 0.5.1-dev-a765d24.0

src/typeGuards.js

2

index.js

@@ -41,2 +41,2 @@ export { mapIterable, filterIterable } from './src/helpers/iter-helpers.js';

isCopyArray,
} from './src/assertPassStyleOf.js';
} from './src/typeGuards.js';
{
"name": "@agoric/marshal",
"version": "0.5.1-dev-a4c353a.0+a4c353a",
"version": "0.5.1-dev-a765d24.0+a765d24",
"description": "marshal",

@@ -15,4 +15,2 @@ "type": "module",

"test:xs": "exit 0",
"pretty-fix": "prettier --write '**/*.js'",
"pretty-check": "prettier --check '**/*.js'",
"lint-fix": "yarn lint:eslint --fix && yarn lint:types",

@@ -38,10 +36,9 @@ "lint-check": "yarn lint",

"dependencies": {
"@agoric/assert": "0.3.16-dev-a4c353a.0+a4c353a",
"@agoric/eventual-send": "0.14.1-dev-a4c353a.0+a4c353a",
"@agoric/eventual-send": "0.14.1-dev-a765d24.0+a765d24",
"@agoric/nat": "^4.1.0",
"@agoric/promise-kit": "0.2.30-dev-a4c353a.0+a4c353a"
"@agoric/promise-kit": "0.2.30-dev-a765d24.0+a765d24"
},
"devDependencies": {
"@agoric/lockdown": "0.1.2-dev-a4c353a.0+a4c353a",
"@endo/ses-ava": "^0.2.8",
"@agoric/lockdown": "0.1.2-dev-a765d24.0+a765d24",
"@endo/ses-ava": "^0.2.13",
"ava": "^3.12.1",

@@ -60,6 +57,2 @@ "c8": "^7.7.2"

},
"prettier": {
"trailingComma": "all",
"singleQuote": true
},
"publishConfig": {

@@ -74,3 +67,3 @@ "access": "public"

},
"gitHead": "a4c353a401b7b37ee3c1a530c16489188e02ceae"
"gitHead": "a765d24d277ed1f248b39046a72ca050d7ad96a5"
}
// @ts-check
// eslint-disable-next-line spaced-comment
/// <reference types="ses"/>

@@ -5,0 +4,0 @@

/* eslint-disable no-use-before-define */
// @ts-check
// eslint-disable-next-line spaced-comment
/// <reference types="ses"/>
import { assert, details as X } from '@agoric/assert';
import { E } from '@agoric/eventual-send';

@@ -17,2 +15,3 @@ import { isObject } from './helpers/passStyle-helpers.js';

const { ownKeys } = Reflect;
const { details: X } = assert;

@@ -19,0 +18,0 @@ const makeConverter = (mirrorConverter = undefined) => {

// @ts-check
// eslint-disable-next-line spaced-comment
/// <reference types="ses"/>

@@ -8,3 +7,2 @@

import './internal-types.js';
import '@agoric/assert/exported.js';
import { assertChecker, checkNormalProperty } from './passStyle-helpers.js';

@@ -11,0 +9,0 @@

// @ts-check
// eslint-disable-next-line spaced-comment
/// <reference types="ses"/>

@@ -14,3 +13,2 @@

import './internal-types.js';
import '@agoric/assert/exported.js';

@@ -17,0 +15,0 @@ const { details: X } = assert;

// @ts-check
// eslint-disable-next-line spaced-comment
/// <reference types="ses"/>

@@ -8,3 +7,2 @@

import './internal-types.js';
import '@agoric/assert/exported.js';
import { assertChecker } from './passStyle-helpers.js';

@@ -58,3 +56,3 @@

const proto = getPrototypeOf(candidate);
const { name } = candidate;
const { name } = proto;
const EC = getErrorConstructor(name);

@@ -69,2 +67,3 @@ if (!EC || EC.prototype !== proto) {

const {
// Must allow `cause`, `errors`
message: mDesc,

@@ -71,0 +70,0 @@ // Allow but ignore only extraneous own `stack` property.

// @ts-check
// eslint-disable-next-line spaced-comment
/// <reference path="../extra-types.d.ts" />

@@ -5,0 +4,0 @@

// @ts-check
// eslint-disable-next-line spaced-comment
/// <reference types="ses"/>

@@ -8,3 +7,2 @@

import './internal-types.js';
import '@agoric/assert/exported.js';

@@ -11,0 +9,0 @@ const { details: X, quote: q } = assert;

// @ts-check
// eslint-disable-next-line spaced-comment
/// <reference types="ses"/>

@@ -8,3 +7,2 @@

import './internal-types.js';
import '@agoric/assert/exported.js';
import {

@@ -11,0 +9,0 @@ assertChecker,

// @ts-check
// eslint-disable-next-line spaced-comment
/// <reference types="ses"/>

@@ -15,3 +14,2 @@

import './internal-types.js';
import '@agoric/assert/exported.js';

@@ -18,0 +16,0 @@ const { details: X } = assert;

// @ts-check
// eslint-disable-next-line spaced-comment
/// <reference types="ses"/>
import { assert, details as X, q } from '@agoric/assert';
import { assertChecker, PASS_STYLE } from './helpers/passStyle-helpers.js';

@@ -15,2 +13,4 @@ import {

const { quote: q, details: X } = assert;
const { prototype: functionPrototype } = Function;

@@ -17,0 +17,0 @@ const {

// @ts-check
// eslint-disable-next-line spaced-comment
/// <reference types="ses"/>
import { assert, details as X } from '@agoric/assert';
import { PASS_STYLE } from './helpers/passStyle-helpers.js';

@@ -11,2 +9,3 @@ import { assertPassable } from './passStyleOf.js';

const { create, prototype: objectPrototype } = Object;
const { details: X } = assert;

@@ -13,0 +12,0 @@ export const makeTagged = (tag, payload) => {

// @ts-check
// eslint-disable-next-line spaced-comment
/// <reference types="ses"/>
import { Nat } from '@agoric/nat';
import { assert, details as X, q } from '@agoric/assert';
import { QCLASS } from './marshal.js';

@@ -18,2 +16,3 @@

const { stringify: quote } = JSON;
const { quote: q, details: X } = assert;

@@ -20,0 +19,0 @@ /**

// @ts-check
/// <reference types="ses"/>
import { assert, details as X } from '@agoric/assert';
import { makeMarshal } from './marshal.js';

@@ -8,2 +8,4 @@

const { details: X } = assert;
/** @type {ConvertValToSlot<any>} */

@@ -10,0 +12,0 @@ const doNotConvertValToSlot = val =>

// @ts-check
// eslint-disable-next-line spaced-comment
/// <reference types="ses"/>
import { Nat } from '@agoric/nat';
import { assert, details as X, q } from '@agoric/assert';
import { passStyleOf } from './passStyleOf.js';

@@ -24,2 +22,3 @@

const { getOwnPropertyDescriptors, defineProperties, is, fromEntries } = Object;
const { details: X, quote: q } = assert;

@@ -82,2 +81,3 @@ /**

if (slotMap.has(val)) {
// TODO assert that it's the same iface as before
slotIndex = slotMap.get(val);

@@ -94,2 +94,3 @@ assert.typeof(slotIndex, 'number');

// TODO explore removing this special case
if (iface === undefined) {

@@ -129,2 +130,4 @@ return harden({

marshalSaveError(err);
// Must encode `cause`, `errors`.
// nested non-passable errors must be ok from here.
return harden({

@@ -286,2 +289,4 @@ [QCLASS]: 'error',

}
// TODO SECURITY HAZARD: must enfoce that remotable vs promise
// is according to the encoded string.
const slot = slots[Number(Nat(index))];

@@ -387,2 +392,3 @@ const val = convertSlotToVal(slot, iface);

case 'error': {
// Must decode `cause` and `errors` properties
const { name, message, errorId } = rawTree;

@@ -405,2 +411,6 @@ assert.typeof(

: `Remote${EC.name}(${errorId})`;
// Due to a defect in the SES type definition, the next line is
// fails a type check.
// Pending https://github.com/endojs/endo/issues/977
// @ts-ignore-next-line
const error = assert.error(`${message}`, EC, { errorName });

@@ -407,0 +417,0 @@ return error;

// @ts-check
// eslint-disable-next-line spaced-comment
/// <reference types="ses"/>

@@ -5,0 +4,0 @@

// @ts-check
import { assert, details as X, q } from '@agoric/assert';
import { getTag } from './helpers/passStyle-helpers.js';

@@ -9,2 +8,3 @@ import { makeTagged } from './makeTagged.js';

const { is } = Object;
const { details: X, quote: q } = assert;

@@ -11,0 +11,0 @@ /**

// @ts-nocheck TODO Fix the recursive types to it checks. Will this
// require a .d.ts file? I don't know.
// eslint-disable-next-line spaced-comment
/// <reference path="extra-types.d.ts" />

@@ -6,0 +5,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