Socket
Socket
Sign inDemoInstall

@opencensus/core

Package Overview
Dependencies
7
Maintainers
7
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.20 to 0.0.21

13

build/src/internal/cls-ah.js

@@ -24,3 +24,3 @@ "use strict";

/** A map of AsyncResource IDs to Context objects. */
let contexts = {};
let contexts = new Map();
let current = {};

@@ -115,8 +115,9 @@ // Create the hook.

function init(uid, provider, parentUid, parentHandle) {
contexts[uid] = current;
contexts.set(uid, current);
}
/** before is called just before the resource's callback is called. */
function before(uid) {
if (contexts[uid]) {
current = contexts[uid];
const maybeCurrent = contexts.get(uid);
if (maybeCurrent !== undefined) {
current = maybeCurrent;
}

@@ -129,3 +130,3 @@ }

function destroy(uid) {
delete contexts[uid];
contexts.delete(uid);
}

@@ -138,3 +139,3 @@ function createNamespace() {

current = {};
contexts = {};
contexts = new Map();
}

@@ -141,0 +142,0 @@ exports.destroyNamespace = destroyNamespace;

{
"name": "@opencensus/core",
"version": "0.0.20",
"version": "0.0.21",
"description": "OpenCensus is a toolkit for collecting application performance and behavior data.",

@@ -56,3 +56,3 @@ "main": "build/src/index.js",

"@types/continuation-local-storage": "^3.2.1",
"@types/mocha": "^5.2.5",
"@types/mocha": "^7.0.0",
"@types/node": "^10.12.12",

@@ -66,3 +66,3 @@ "@types/once": "^1.4.0",

"intercept-stdout": "^0.1.2",
"mocha": "^6.1.0",
"mocha": "^7.0.0",
"nyc": "14.1.1",

@@ -69,0 +69,0 @@ "ts-mocha": "^6.0.0",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc