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

asynctrace

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asynctrace - npm Package Compare versions

Comparing version 1.0.7 to 1.2.0

index.js

40

package.json
{
"author": "Refael Ackerkmann <refael@empeeric.com>",
"dependencies": {
"shimmer": "latest"
},
"bundledDependencies": [
"async-listener"
],
"description": "Deep stack traces based on AsyncListener API",
"devDependencies": {
"chai": "latest",
"istanbul": "latest",
"mocha": "latest"
},
"engines": {
"node": "^0.11.12"
},
"engineStrict": {
"node": ">= 0.10.0"
},
"jshintConfig": {
"strict": true,
"trailing": true,
"unused": true,
"node": true,
"globals": {
"describe": false,
"it": false,
"before": false,
"beforeEach": false,
"after": false,
"afterEach": false
}
},
"keywords": [

@@ -15,3 +43,3 @@ "trace",

"license": "MIT",
"main": "trace.js",
"main": "index.js",
"name": "asynctrace",

@@ -22,11 +50,3 @@ "repository": "Empeeric/asynctrace",

},
"version": "1.0.7",
"dependencies": {
"shimmer": ""
},
"devDependencies": {
"chai": "latest",
"istanbul": "latest",
"mocha": "latest"
}
"version": "1.2.0"
}

@@ -7,13 +7,13 @@ 'use strict';

it('show what happens to a local Exception', function (done) {
var i = 1;
var i = 0;
var d = domain.createDomain();
d.once('error', function (e) {
console.log(e.stack)
console.log(e.stack);
expect(e.message).to.be.equal('gaga');
expect(e.stack).to.contain('Immediate.a');
expect(e.stack).to.contain('Immediate.b');
expect(e.stack).to.contain('Immediate.c');
expect(e.stack).to.contain('Immediate.d');
expect(e.stack).to.contain('Immediate.e');
if (--i == 0) done();
expect(e.stack).to.contain('.a ');
expect(e.stack).to.contain('.b ');
expect(e.stack).to.contain('.c ');
expect(e.stack).to.contain('.d ');
expect(e.stack).to.contain('.e ');
if (--i === 0) done();
});

@@ -26,2 +26,3 @@ d.run(function () {

setImmediate(function e() {
++i;
throw new Error('gaga');

@@ -38,22 +39,22 @@ });

it('show what happens to a exception in itertwining contexts', function (done) {
var i = 2;
var i = 0;
var d = domain.createDomain();
d.once('error', function (e) {
console.log(e.stack)
expect(e.message).to.be.equal('gaga');
expect(e.stack).to.contain('Immediate.a2');
expect(e.stack).to.contain('Immediate.b2');
expect(e.stack).to.contain('Immediate.c2');
expect(e.stack).to.contain('Immediate.d2');
expect(e.stack).to.contain('Immediate.e2');
--i
console.log(e.stack);
expect(e.message).to.be.equal('gaga1');
expect(e.stack).to.contain('.a2 ');
expect(e.stack).to.contain('.b2 ');
expect(e.stack).to.contain('.c2 ');
expect(e.stack).to.contain('.d2 ');
expect(e.stack).to.contain('.e2 ');
--i;
d.once('error', function (e) {
console.log(e.stack)
expect(e.message).to.be.equal('gaga1');
expect(e.stack).to.contain('Immediate.a2');
expect(e.stack).to.contain('Immediate.b2');
expect(e.stack).to.contain('Immediate.c2');
expect(e.stack).to.contain('Immediate.d21');
expect(e.stack).to.contain('Immediate.e21');
if (--i == 0) done();
console.log(e.stack);
expect(e.message).to.be.equal('gaga2');
expect(e.stack).to.contain('.a2 ');
expect(e.stack).to.contain('.b2 ');
expect(e.stack).to.contain('.c2 ');
expect(e.stack).to.contain('.d21 ');
expect(e.stack).to.contain('.e21 ');
if (--i === 0) done();
});

@@ -67,3 +68,4 @@ });

setImmediate(function e2() {
throw new Error('gaga');
++i;
throw new Error('gaga1');
});

@@ -73,3 +75,4 @@ });

setImmediate(function e21() {
throw new Error('gaga1');
++i;
throw new Error('gaga2');
});

@@ -88,7 +91,7 @@ });

it('show what happens to a local Exception', function (done) {
var i = 1;
var i = 0;
var d = domain.createDomain();
d.once('error', function (e) {
console.log(e.stack)
expect(e.message).to.be.equal('gaga');
console.log(e.stack);
expect(e.message).to.be.equal('gaga4');
expect(e.stack).to.contain(' a ');

@@ -99,3 +102,3 @@ expect(e.stack).to.contain(' b ');

expect(e.stack).to.contain(' e ');
if (--i == 0) done();
if (--i === 0) done();
});

@@ -108,3 +111,4 @@ d.run(function () {

process.nextTick(function e() {
throw new Error('gaga');
++i;
throw new Error('gaga4');
});

@@ -120,7 +124,7 @@ });

it('show what happens to a exception in itertwining contexts', function (done) {
var i = 2;
var i = 0;
var d = domain.createDomain();
d.once('error', function (e) {
console.log(e.stack)
expect(e.message).to.be.equal('gaga');
console.log(e.stack);
expect(e.message).to.be.equal('gaga5');
expect(e.stack).to.contain(' a2 ');

@@ -131,6 +135,6 @@ expect(e.stack).to.contain(' b2 ');

expect(e.stack).to.contain(' e2 ');
--i
--i;
d.once('error', function (e) {
console.log(e.stack)
expect(e.message).to.be.equal('gaga1');
console.log(e.stack);
expect(e.message).to.be.equal('gaga6');
expect(e.stack).to.contain(' a2 ');

@@ -141,3 +145,3 @@ expect(e.stack).to.contain(' b2 ');

expect(e.stack).to.contain(' e21 ');
if (--i == 0) done();
if (--i === 0) done();
});

@@ -151,3 +155,4 @@ });

process.nextTick(function e2() {
throw new Error('gaga');
++i;
throw new Error('gaga5');
});

@@ -157,3 +162,4 @@ });

process.nextTick(function e21() {
throw new Error('gaga1');
++i;
throw new Error('gaga6');
});

@@ -172,7 +178,7 @@ });

it('show what happens to a local Exception', function (done) {
var i = 1;
var i = 0;
var d = domain.createDomain();
d.once('error', function (e) {
console.log(e.stack)
expect(e.message).to.be.equal('gaga');
console.log(e.stack);
expect(e.message).to.be.equal('gaga7');
expect(e.stack).to.contain(' a ');

@@ -183,3 +189,3 @@ expect(e.stack).to.contain(' b ');

expect(e.stack).to.contain(' e ');
if (--i == 0) done();
if (--i === 0) done();
});

@@ -192,3 +198,4 @@ d.run(function () {

fs.readFile('package.json', function e() {
throw new Error('gaga');
++i;
throw new Error('gaga7');
});

@@ -204,7 +211,7 @@ });

it('show what happens to a exception in itertwining contexts', function (done) {
var i = 2;
var i = 0;
var d = domain.createDomain();
d.once('error', function (e) {
console.log(e.stack)
expect(e.message).to.be.equal('gaga');
console.log(e.stack);
expect(e.message).to.be.equal('gaga8');
expect(e.stack).to.contain(' a2 ');

@@ -215,6 +222,6 @@ expect(e.stack).to.contain(' b2 ');

expect(e.stack).to.contain(' e2 ');
--i
--i;
d.once('error', function (e) {
console.log(e.stack)
expect(e.message).to.be.equal('gaga1');
console.log(e.stack);
expect(e.message).to.be.equal('gaga9');
expect(e.stack).to.contain(' a2 ');

@@ -225,3 +232,3 @@ expect(e.stack).to.contain(' b2 ');

expect(e.stack).to.contain(' e21 ');
if (--i == 0) done();
if (--i === 0) done();
});

@@ -235,3 +242,4 @@ });

fs.readFile('package.json', function e2() {
throw new Error('gaga');
++i;
throw new Error('gaga8');
});

@@ -241,3 +249,4 @@ });

fs.readFile('package.json', function e21() {
throw new Error('gaga1');
++i;
throw new Error('gaga9');
});

@@ -244,0 +253,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