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

continuation-local-storage

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

continuation-local-storage - npm Package Compare versions

Comparing version 2.3.4 to 2.4.0

3

context.js

@@ -188,3 +188,4 @@ 'use strict';

before : function (context, domain) { namespace.enter(domain); },
after : function (context, domain) { namespace.exit(domain); }
after : function (context, domain) { namespace.exit(domain); },
error : function (domain) { namespace.exit(domain); }
}

@@ -191,0 +192,0 @@ );

{
"name": "continuation-local-storage",
"version": "2.3.4",
"version": "2.4.0",
"description": "userland implementation of https://github.com/joyent/node/issues/5243",

@@ -34,3 +34,3 @@ "main": "context.js",

"optionalDependencies": {
"async-listener": ">=0.2.0"
"async-listener": ">=0.2.2"
},

@@ -37,0 +37,0 @@ "dependencies": {

@@ -5,66 +5,53 @@ 'use strict';

if (!process.addAsyncListener) {
test("overwriting startup.processNextTick", function (t) {
t.plan(2);
t.doesNotThrow(function () { require('../context.js'); });
test("overwriting startup.processNextTick", function (t) {
t.plan(2);
t.ok(process.nextTick.__wrapped, "should wrap process.nextTick()");
});
t.doesNotThrow(function () { require('../context.js'); });
test("overwriting domain helpers", function (t) {
// domain helpers were only in 0.10.x
if (!(process._nextDomainTick ||
process._tickDomainCallback)) {
return t.end();
}
t.ok(process.nextTick.__wrapped, "should wrap process.nextTick()");
});
t.plan(2);
test("overwriting domain helpers", function (t) {
// domain helpers were only in 0.10.x
if (!(process._nextDomainTick ||
process._tickDomainCallback)) {
return t.end();
}
t.ok(process._nextDomainTick.__wrapped,
"should wrap process._nextDomainTick()");
t.ok(process._tickDomainCallback.__wrapped,
"should wrap process._tickDomainCallback()");
});
t.plan(2);
test("overwriting timers", function (t) {
t.plan(2);
t.ok(process._nextDomainTick.__wrapped,
"should wrap process._nextDomainTick()");
t.ok(process._tickDomainCallback.__wrapped,
"should wrap process._tickDomainCallback()");
});
var timers = require('timers');
t.ok(timers.setTimeout.__wrapped, "should wrap setTimeout()");
t.ok(timers.setInterval.__wrapped, "should wrap setInterval()");
test("overwriting timers", function (t) {
t.plan(6);
/* It would be nice to test that monkeypatching preserves the status quo
* ante, but assert thinks setTimeout !== global.setTimeout (why?) and both of
* those are a wrapper around NativeModule.require("timers").setTimeout,
* presumably to try to prevent the kind of "fun" I'm having here.
*/
});
t.ok(setTimeout.__wrapped, "should wrap setTimeout()");
t.ok(setInterval.__wrapped, "should wrap setInterval()");
test("overwriting setImmediate", function (t) {
// setTimeout's a johnny-come-lately
if (!global.setImmediate) return t.end();
t.ok(global.setTimeout.__wrapped, "should also wrap global setTimeout()");
t.ok(global.setInterval.__wrapped, "should also wrap global setInterval()");
t.plan(1);
var timers = require('timers');
t.ok(timers.setTimeout.__wrapped, "should wrap setTimeout()");
t.ok(timers.setInterval.__wrapped, "should wrap setInterval()");
t.ok(require('timers').setImmediate.__wrapped, "should wrap setImmediate()");
/* It would be nice to test that monkeypatching preserves the status quo
* ante, but assert thinks setTimeout !== global.setTimeout (why?) and both of
* those are a wrapper around NativeModule.require("timers").setTimeout,
* presumably to try to prevent the kind of "fun" I'm having here.
*/
});
test("overwriting setImmediate", function (t) {
// setTimeout's a johnny-come-lately
if (!global.setImmediate) return t.end();
t.plan(3);
t.ok(setImmediate.__wrapped, "should wrap setImmediate()");
t.ok(global.setImmediate.__wrapped, "should also wrap global setImmediate()");
t.ok(require('timers').setImmediate.__wrapped, "should wrap setImmediate()");
/* It would be nice to test that monkeypatching preserves the status quo
* ante, but assert thinks setTimeout !== global.setTimeout (why?) and both of
* those are a wrapper around NativeModule.require("timers").setTimeout,
* presumably to try to prevent the kind of "fun" I'm having here.
*/
});
/* It would be nice to test that monkeypatching preserves the status quo
* ante, but assert thinks setTimeout !== global.setTimeout (why?) and both of
* those are a wrapper around NativeModule.require("timers").setTimeout,
* presumably to try to prevent the kind of "fun" I'm having here.
*/
});
}
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