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

node-dev

Package Overview
Dependencies
Maintainers
4
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-dev - npm Package Compare versions

Comparing version 5.0.0 to 5.1.0

7

CHANGELOG.md
# node-dev
## v5.1.0 / 2020-07-28
- [wrap.js] Improve uncaughtException handling to turn non-errors into errors (Fixes #231)
- [ipc.js] Declare `NODE_DEV` as a variable
- [ipc.js] Inline single line function only used twice
- [tests] Filenames should be snake-case
## v5.0.0 / 2020-07-08

@@ -4,0 +11,0 @@

13

lib/ipc.js

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

/**
* Checks if the given message is an internal node-dev message.
*/
function isNodeDevMessage(m) {
return m.cmd === 'NODE_DEV';
}
const NODE_DEV = 'NODE_DEV';

@@ -12,3 +7,3 @@ /**

exports.send = function (m, dest) {
m.cmd = 'NODE_DEV';
m.cmd = NODE_DEV;
if (!dest) dest = process;

@@ -20,3 +15,3 @@ if (dest.send) dest.send(m);

function handleMessage(m) {
if (isNodeDevMessage(m) && type in m) cb(m);
if (m.cmd === NODE_DEV && type in m) cb(m);
}

@@ -30,3 +25,3 @@ proc.on('internalMessage', handleMessage);

function relayMessage(m) {
if (isNodeDevMessage(m)) dest.send(m);
if (m.cmd === NODE_DEV) dest.send(m);
}

@@ -33,0 +28,0 @@ src.on('internalMessage', relayMessage);

@@ -38,11 +38,12 @@ const path = require('path');

process.on('uncaughtException', function (err) {
console.error(err.stack || err);
// Sometimes uncaught exceptions are not errors
const { message, name, stack } = err instanceof Error ? err : new Error(`uncaughtException ${err}`);
console.error(stack);
// If there's a custom uncaughtException handler expect it to terminate
// the process.
const hasCustomHandler = process.listeners('uncaughtException').length > 1;
ipc.send({
error: err.name || 'Error',
message: err.message,
willTerminate: hasCustomHandler
});
const willTerminate = process.listeners('uncaughtException').length > 1;
ipc.send({ error: name, message, willTerminate });
});

@@ -49,0 +50,0 @@

{
"name": "node-dev",
"version": "5.0.0",
"version": "5.1.0",
"description": "Restarts your app when files are modified",

@@ -5,0 +5,0 @@ "keywords": [

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