New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

asyncctx

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asyncctx - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

1

ContinuationLocalStorage.d.ts

@@ -74,2 +74,3 @@ /**

protected initMap(value?: T): void;
private readonly findActivatedNode;
}

31

ContinuationLocalStorage.js

@@ -32,2 +32,14 @@ "use strict";

var _this = this;
this.findActivatedNode = function (hi) {
/* istanbul ignore if */
if (!hi) {
// NOTES: this should not happen
// the root-node is always activated and all other nodes should have a valid trigger-node (`triggerHook`)
return _this.idHookMap.get(ROOT_ID);
}
if (hi.activated) {
return hi;
}
return _this.findActivatedNode(hi.triggerHook);
};
this.initMap();

@@ -41,3 +53,3 @@ this.hookFuncs = {

// NOTES: this should not happen
// nodeproc._rawDebug(`init: id: ${id}: WARNING: triggerId is not defined`);
nodeproc._rawDebug("init: id: " + id + ": WARNING: triggerId is not defined");
triggerId = _this._currId;

@@ -52,12 +64,2 @@ }

}
else {
while (triggerHook.type === 'PROMISE' && !triggerHook.activated &&
_this.idHookMap.has(triggerHook.triggerId)) {
// NOTES: this is expected
// nodeproc._rawDebug(
// `init: id: ${id}: WARNING: changing trigger from ${triggerId} to ${triggerHook.triggerId}`);
triggerId = triggerHook.triggerId;
triggerHook = _this.idHookMap.get(triggerId);
}
}
_this.idHookMap.set(id, { id: id, type: type, triggerId: triggerId, oriTriggerId: oriTriggerId, triggerHook: triggerHook, activated: false });

@@ -73,3 +75,8 @@ // this.debugId('init', id);

if (!hi.activated) {
hi.data = hi.triggerHook ? hi.triggerHook.data : undefined;
var ancestor = _this.findActivatedNode(hi.triggerHook);
if (ancestor) {
hi.triggerHook = ancestor;
hi.triggerId = ancestor.id;
hi.data = ancestor.data;
}
}

@@ -76,0 +83,0 @@ hi.activated = true;

{
"name": "asyncctx",
"version": "1.1.0",
"version": "1.1.01",
"description": "an asynchronous execution context for TypeScript/JavaScript",

@@ -5,0 +5,0 @@ "main": "./index.js",

@@ -55,2 +55,3 @@ [![npm version](https://badge.fury.io/js/asyncctx.svg)](https://badge.fury.io/js/asyncctx)

| --------- | --------------------------------------------------------------------------------------- |
| 1.1.01 | fixed loosing context; thanks to Pasi Tuominen |
| 2.0.00 | targeting es6; dropped support for nodejs < v8 |

@@ -57,0 +58,0 @@ | | please use asyncctx@<2.0 for nodejs v4 - v11 support |

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