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

@endo/init

Package Overview
Dependencies
Maintainers
5
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@endo/init - npm Package Compare versions

Comparing version 0.5.56 to 0.5.57

src/node-async-local-storage-patch.d.ts

16

package.json
{
"name": "@endo/init",
"version": "0.5.56",
"version": "0.5.57",
"description": "Prepare Endo environment on import",

@@ -32,11 +32,11 @@ "type": "module",

"devDependencies": {
"@endo/compartment-mapper": "^0.8.4",
"@endo/ses-ava": "^0.2.40",
"@endo/compartment-mapper": "^0.8.5",
"@endo/ses-ava": "^0.2.41",
"ava": "^5.1.1"
},
"dependencies": {
"@endo/base64": "^0.2.31",
"@endo/eventual-send": "^0.17.2",
"@endo/lockdown": "^0.1.28",
"@endo/promise-kit": "^0.2.56"
"@endo/base64": "^0.2.32",
"@endo/eventual-send": "^0.17.3",
"@endo/lockdown": "^0.1.29",
"@endo/promise-kit": "^0.2.57"
},

@@ -76,3 +76,3 @@ "files": [

},
"gitHead": "38c2c59d6ae8c53f84cd333e6c7828e2d37604e2"
"gitHead": "106da55b8bcea3067f70c29c357806f3f2e55c52"
}
import { setup } from './node-async_hooks.js';
import './node-async-local-storage-patch.js';
setup({ withDestroy: true });

@@ -13,7 +13,7 @@ import { createHook, AsyncResource } from 'async_hooks';

if (!(description in asyncHooksSymbols)) {
throw new Error('Unknown symbol');
throw Error('Unknown symbol');
} else if (!asyncHooksSymbols[description]) {
if (symbol.description !== description) {
// Throw an error since the whitelist mechanism relies on the description
throw new Error(
throw Error(
`Mismatched symbol found for ${description}: ${String(symbol)}`,

@@ -42,3 +42,5 @@ );

let found = 0;
Object.getOwnPropertySymbols(new AsyncResource('Bootstrap')).forEach(sym => {
for (const sym of Object.getOwnPropertySymbols(
new AsyncResource('Bootstrap'),
)) {
const { description } = sym;

@@ -50,3 +52,3 @@ if (description && description in asyncHooksSymbols) {

}
});
}
return found;

@@ -116,3 +118,3 @@ };

// }
symbols.forEach(symbol => {
for (const symbol of symbols) {
const value = resource[symbol];

@@ -128,3 +130,3 @@ let type;

// process._rawDebug(`Unexpected symbol`, symbol);
return;
return undefined;
}

@@ -135,3 +137,3 @@

}
});
}
return found;

@@ -189,3 +191,3 @@ } else {

} else {
// process._rawDebug('fallback set of async id', symbol, value, new Error().stack);
// process._rawDebug('fallback set of async id', symbol, value, Error().stack);
setAsyncIdFallback(this, symbol, value);

@@ -192,0 +194,0 @@ }

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