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

why-is-node-running

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

why-is-node-running - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

13

index.js

@@ -9,7 +9,7 @@ var asyncHooks = require('async_hooks')

var hook = asyncHooks.createHook({
init (asyncId, type) {
init (asyncId, type, triggerAsyncId, resource) {
if (type === 'TIMERWRAP' || type === 'PROMISE') return
var err = new Error('whatevs')
var stacks = stackback(err)
active.set(asyncId, {type, stacks})
active.set(asyncId, {type, stacks, resource})
},

@@ -28,5 +28,10 @@ destroy (asyncId) {

hook.disable()
logger.error('There are %d handle(s) keeping the process running', active.size)
for (const o of active.values()) printStacks(o)
var activeResources = [...active.values()].filter(function(r) {
if (r.type === 'Timeout' && !r.resource.hasRef()) return false
return true
})
logger.error('There are %d handle(s) keeping the process running', activeResources.length)
for (const o of activeResources) printStacks(o)
function printStacks (o) {

@@ -33,0 +38,0 @@ var stacks = o.stacks.slice(1).filter(function (s) {

{
"name": "why-is-node-running",
"version": "2.1.0",
"version": "2.1.1",
"description": "Node is running but you don't know why? why-is-node-running is here to help you.",

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

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