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

blocked-at

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blocked-at - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

.travis.yml

10

index.js

@@ -24,9 +24,5 @@ 'use strict'

function init (asyncId, type, triggerAsyncId, resource) {
let stack = null
try {
throw Error()
} catch (e) {
stack = e.stack
}
cache.set(asyncId, {asyncId, type, stack})
const e = {}
Error.captureStackTrace(e)
cache.set(asyncId, {asyncId, type, stack: e.stack})
}

@@ -33,0 +29,0 @@

{
"name": "blocked-at",
"version": "1.0.0",
"version": "1.0.1",
"description": "Detects node eventloop block and reports where it started",

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

@@ -1,2 +0,2 @@

# blocked-at
# blocked-at [![Build Status](https://travis-ci.org/naugtur/blocked-at.svg?branch=master)](https://travis-ci.org/naugtur/blocked-at)

@@ -3,0 +3,0 @@ Detects slow synchronous execution and reports where it started.

@@ -8,2 +8,3 @@ 'use strict'

const case4 = require('./cases/promise')
const case5 = require('./cases/falsepositive')
const assert = require('assert')

@@ -22,2 +23,3 @@

setImmediate(case4)
setImmediate(case5)

@@ -28,3 +30,3 @@ setTimeout(_ => {

assert(!stacks.includes('async_hooks.js'), 'Expected async_hooks.js traces not to be included')
assert(stacks.includes('test/index.js:16'), 'Expected test/index.js:17 in stack trace')
assert(stacks.includes('test/index.js:17'), 'Expected test/index.js:17 in stack trace')
assert(stacks.includes('Server.connectionListener'), 'Expected Server.connectionListener in stack trace')

@@ -34,3 +36,4 @@ assert(stacks.includes('cases/recursive.js:6'), 'Expected cases/recursive.js:6 in stack trace')

assert(stacks.includes('cases/promise.js:9'), 'Expected cases/promise.js:10 in stack trace')
assert(!stacks.includes('cases/falsepositive.js'), 'Expected falsepositive not to trigger a report')
console.log('OK')
}, 5000) // I know it's naive, but I don't want to add mess to test cases to know when they finish

@@ -6,5 +6,5 @@ module.exports = function meSoSlow (time) {

while (Date.now() < (t0 + time)) {
'How many CPU cycles does it take to heat the room by 1 degree?'.split().join(':)')
'How many CPU cycles does it take to heat the room by 1 degree?'.split('').join(':)')
}
console.timeEnd('slow')
}
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