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

@endo/eventual-send

Package Overview
Dependencies
Maintainers
5
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@endo/eventual-send - npm Package Compare versions

Comparing version 1.2.4 to 1.2.5

10

package.json
{
"name": "@endo/eventual-send",
"version": "1.2.4",
"version": "1.2.5",
"description": "Extend a Promise class to implement the eventual-send API",

@@ -39,10 +39,10 @@ "type": "module",

"dependencies": {
"@endo/env-options": "^1.1.5"
"@endo/env-options": "^1.1.6"
},
"devDependencies": {
"@endo/lockdown": "^1.0.9",
"@endo/lockdown": "^1.0.10",
"ava": "^6.1.3",
"c8": "^7.14.0",
"tsd": "^0.30.7",
"typescript": "5.5.2"
"typescript": "~5.6.1-rc"
},

@@ -78,3 +78,3 @@ "keywords": [

},
"gitHead": "444c81ad3ecc1b0a449023a9c65e9be2fa17db21"
"gitHead": "cb060b7e22c92cc951fb03d86cdbceeae82fec34"
}

@@ -39,3 +39,3 @@ import { trackTurns } from './track-turns.js';

* @param {import('./types').HandledPromiseConstructor} HandledPromise
* @returns {ProxyHandler} the Proxy handler
* @returns {ProxyHandler<unknown>} the Proxy handler
*/

@@ -52,2 +52,3 @@ const makeEProxyHandler = (recipient, HandledPromise) =>

// is not constructable, it also avoids the `function` syntax.
/** @type {(...args: any[]) => Promise<unknown>} */
[propertyKey](...args) {

@@ -101,3 +102,3 @@ if (this !== receiver) {

* @param {import('./types').HandledPromiseConstructor} HandledPromise
* @returns {ProxyHandler} the Proxy handler
* @returns {ProxyHandler<unknown>} the Proxy handler
*/

@@ -114,2 +115,3 @@ const makeESendOnlyProxyHandler = (recipient, HandledPromise) =>

// is not constructable, it also avoids the `function` syntax.
/** @type {(...args: any[]) => undefined} */
[propertyKey](...args) {

@@ -159,3 +161,3 @@ // Throw since the function returns nothing

* @param {import('./types').HandledPromiseConstructor} HandledPromise
* @returns {ProxyHandler} the Proxy handler
* @returns {ProxyHandler<unknown>} the Proxy handler
*/

@@ -184,2 +186,3 @@ const makeEGetProxyHandler = (x, HandledPromise) =>

*/
// @ts-expect-error XXX typedef
x => harden(new Proxy(() => {}, makeEProxyHandler(x, HandledPromise))),

@@ -199,2 +202,3 @@ {

get: x =>
// @ts-expect-error XXX typedef
harden(

@@ -225,2 +229,3 @@ new Proxy(create(null), makeEGetProxyHandler(x, HandledPromise)),

sendOnly: x =>
// @ts-expect-error XXX typedef
harden(

@@ -227,0 +232,0 @@ new Proxy(() => {}, makeESendOnlyProxyHandler(x, HandledPromise)),

@@ -67,1 +67,6 @@ /* eslint-disable @endo/no-polymorphic-call, import/no-extraneous-dependencies, no-restricted-globals */

});
{
const local = { getVal: () => 'val' };
expectType<Promise<string>>(E(local).getVal());
}

@@ -118,2 +118,3 @@ /// <reference types="ses" />

let forwardingHandler;
/** @type {(...args: any[]) => Promise<unknown>} */
let handle;

@@ -124,3 +125,3 @@

* @param {Handler<any>} handler
* @param {string} operation
* @param {keyof Handler<any>} operation
* @param {any} o

@@ -152,3 +153,5 @@ * @param {any[]} opArgs

// Substitute for sendonly with the corresponding non-sendonly operation.
actualOp = matchSendOnly[1];
actualOp = /** @type {'get' | 'applyMethod' | 'applyFunction'} */ (
matchSendOnly[1]
);
}

@@ -213,2 +216,3 @@

let resolvedTarget = null;
/** @type {Promise<R>} */
let handledP;

@@ -386,3 +390,3 @@ let continueForwarding = () => {};

*
* @param {Promise} p
* @param {Promise<unknown>} p
* @returns {boolean}

@@ -447,2 +451,3 @@ */

// treating `resolvedPromise` as if it is a non-promise thenable.
/** @type {Promise['then']} */
const executeThen = (resolve, reject) =>

@@ -506,2 +511,3 @@ resolvedPromise.then(resolve, reject);

/** @type {(handlerName: string, handler: any, o: any) => any} */
const win = (handlerName, handler, o) => {

@@ -519,2 +525,3 @@ if (raceIsOver) {

/** @type {(reason: unknown) => void} */
const lose = reason => {

@@ -521,0 +528,0 @@ if (raceIsOver) {

@@ -13,6 +13,6 @@ export const E: (<T>(x: T) => ECallableOrMethods<RemoteFunctions<T>>) & {

export * from "./exports.js";
import type { RemoteFunctions } from './E.js';
import type { ECallableOrMethods } from './E.js';
import type { RemoteFunctions } from './E.js';
import type { LocalRecord } from './E.js';
import type { EGetters } from './E.js';
import type { LocalRecord } from './E.js';
import type { ESendOnlyCallableOrMethods } from './E.js';

@@ -19,0 +19,0 @@ import type { ERef } from './E.js';

@@ -20,3 +20,3 @@ /* eslint-disable import/export */

export type Callable = (...args: unknown[]) => any;
export type Callable = (...args: any[]) => any;

@@ -23,0 +23,0 @@ /**

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

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