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

@jsenv/utils

Package Overview
Dependencies
Maintainers
2
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsenv/utils - npm Package Compare versions

Comparing version 1.4.2 to 1.4.4

26

file_watcher/process_auto_restart.js

@@ -69,15 +69,3 @@ import cluster from "node:cluster"

})
const exitEventCallback = (worker, code, signal) => {
// https://nodejs.org/dist/latest-v16.x/docs/api/cluster.html#workerexitedafterdisconnect
if (worker.exitedAfterDisconnect) {
logger.debug(
`worker ${worker.process.pid} died with code: ${code}, and signal: ${signal}`,
)
logger.debug(`starting a new worker`)
startWorker()
}
}
cluster.on("exit", exitEventCallback)
const killWorkers = () => {

@@ -113,5 +101,19 @@ Object.keys(cluster.workers).forEach((workerId) => {

},
keepProcessAlive: false,
})
})
const exitEventCallback = (worker, code, signal) => {
// https://nodejs.org/dist/latest-v16.x/docs/api/cluster.html#workerexitedafterdisconnect
if (worker.exitedAfterDisconnect) {
logger.debug(
`worker ${worker.process.pid} died with code: ${code}, and signal: ${signal}`,
)
logger.debug(`starting a new worker`)
startWorker()
}
}
cluster.on("exit", exitEventCallback)
const stop = () => {

@@ -118,0 +120,0 @@ unregisters.forEach((unregister) => {

@@ -417,3 +417,6 @@ import { getTypePropertyNode } from "./js_ast.js"

callee.object.type === "Identifier" &&
callee.object.name === "_context" &&
// because of minification we can't assume _context.
// so anything matching "*.import()"
// will be assumed to be the equivalent to "import()"
// callee.object.name === "_context" &&
callee.property.type === "Identifier" &&

@@ -420,0 +423,0 @@ callee.property.name === "import"

@@ -6,4 +6,5 @@ export const msAsDuration = (ms) => {

// (this function is meant to display a duration to a human)
// so in this case we'll return "less than 1 millisecond"
return "less than 1 millisecond"
// so in this case we'll return "0 second" which means "less than 1 millisecond"
// (I prefer "0 second" to be consistent with other logs wich will likely measure in "second")
return "0 second"
}

@@ -10,0 +11,0 @@ const { primary, remaining } = parseMs(ms)

{
"name": "@jsenv/utils",
"version": "1.4.2",
"version": "1.4.4",
"license": "MIT",

@@ -5,0 +5,0 @@ "repository": {

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