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 4.0.0 to 4.1.0

16

CHANGELOG.md
# node-dev
## 4.1.0 / 2020-07-02
- Update devDependencies:
- `eslint`: from `v2.0.0` to `v7.3.1`
- `eslint-config-airbnb-base`: from `v3.0.1` to `v14.2.0`
- `eslint-plugin-import`: from v`1.8.1` to `v2.22.0`
- `tap`: from `v12.6.2` to `v14.10.7`
- `touch`: from `v1.0.0` to `v3.1.0`
- Removed windows restriction for `graceful_ipc`
- No longer attempts to send `SIGTERM` to disconnected child processes
- [package.json] Set minimum node version to 10
- [package.json] Changed test script to be more cross-platform
- [tests] Split tests into 3 separate files
- [tests] Removed a few opportunities for race conditions to occur
- [tests] Some filesystems have single second precision, so tests now wait a minimum of 1 second before touching a file
## 4.0.0 / 2019-04-22

@@ -4,0 +20,0 @@

1

lib/cfg.js

@@ -45,3 +45,2 @@ var fs = require('fs');

graceful_ipc: c.graceful_ipc,
ms_win: process.platform === "win32",
ignore: ignore,

@@ -48,0 +47,0 @@ respawn: c.respawn || false,

var fork = require('child_process').fork;
var filewatcher = require('filewatcher');
var path = require('path');
var ipc = require('./ipc');

@@ -22,3 +23,3 @@ var resolveMain = require('./resolveMain');

var wrapper = resolveMain(__dirname + '/wrap.js');
var wrapper = resolveMain(path.join(__dirname, 'wrap.js'));
var main = resolveMain(script);

@@ -30,3 +31,3 @@ var cfg = require('./cfg')(main, opts);

// Run ./dedupe.js as preload script
if (cfg.dedupe) process.env.NODE_DEV_PRELOAD = __dirname + '/dedupe';
if (cfg.dedupe) process.env.NODE_DEV_PRELOAD = path.join(__dirname, 'dedupe');

@@ -94,4 +95,4 @@ var watcher = filewatcher({ forcePolling: opts.poll });

if (!willTerminate) {
if (cfg.ms_win && cfg.graceful_ipc) {
log.info(`Windows workaround, sending "${cfg.graceful_ipc}" message to child.`);
if (cfg.graceful_ipc) {
log.info('Sending IPC: ' + JSON.stringify(cfg.graceful_ipc));
child.send(cfg.graceful_ipc);

@@ -107,5 +108,5 @@ } else {

process.on('SIGTERM', function () {
if (child) {
if (cfg.ms_win && cfg.graceful_ipc) {
log.info(`Windows workaround, sending "${cfg.graceful_ipc}" message to child.`);
if (child && child.connected) {
if (cfg.graceful_ipc) {
log.info('Sending IPC: ' + JSON.stringify(cfg.graceful_ipc));
child.send(cfg.graceful_ipc);

@@ -140,3 +141,3 @@ } else {

var i = mod.lastIndexOf(n);
return ~i ? mod.slice(0, i + n.length) : '';
return i !== -1 ? mod.slice(0, i + n.length) : '';
}

@@ -143,0 +144,0 @@

@@ -10,2 +10,10 @@ var util = require('util');

function noop(s) { return s; }
function colorFactory(enableColor) {
return enableColor ? function (s, c) {
return '\x1B[' + c + 'm' + s + '\x1B[0m';
} : noop;
}
/**

@@ -16,26 +24,23 @@ * Logs a message to the console. The level is displayed in ANSI colors,

module.exports = function (cfg) {
var enableColor = !(cfg.noColor || !process.stdout.isTTY);
var color = colorFactory(enableColor);
function log(msg, level) {
if (cfg.timestamp) msg = color(fmt(cfg.timestamp), '30;1') + ' ' + msg;
var timestamp = cfg.timestamp ? color(fmt(new Date(), cfg.timestamp), '39') + ' ' : '';
var c = colors[level.toLowerCase()] || '32';
console.log('[' + color(level.toUpperCase(), c) + '] ' + msg);
var output = '[' + color(level.toUpperCase(), c) + '] ' + timestamp + msg;
console.log(output);
return output;
}
function color(s, c) {
if (process.stdout.isTTY) {
return '\x1B[' + c + 'm' + s + '\x1B[0m';
}
return s;
}
log.info = function () {
log(util.format.apply(util, arguments), 'info');
return log(util.format.apply(util, arguments), 'info');
};
log.warn = function () {
log(util.format.apply(util, arguments), 'warn');
return log(util.format.apply(util, arguments), 'warn');
};
log.error = function () {
log(util.format.apply(util, arguments), 'error');
return log(util.format.apply(util, arguments), 'error');
};

@@ -42,0 +47,0 @@

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

@@ -14,3 +14,4 @@ "keywords": [

"contributors": [
"Daniel Gasienica <daniel@gasienica.ch> (https://github.com/gasi/)"
"Daniel Gasienica <daniel@gasienica.ch> (https://github.com/gasi)",
"Bjorn Stromberg <bjorn@bjornstar.com> (https://bjornstar.com)"
],

@@ -28,9 +29,10 @@ "repository": {

"engines": {
"node": ">=6"
"node": ">=10"
},
"scripts": {
"test": "tap test/*.js"
"lint": "eslint lib test",
"test": "node test"
},
"dependencies": {
"dateformat": "~1.0.4-1.2.3",
"dateformat": "^3.0.3",
"dynamic-dedupe": "^0.3.0",

@@ -44,8 +46,9 @@ "filewatcher": "~3.0.0",

"coffeescript": "^2.4.1",
"eslint": "^2.0.0",
"eslint-config-airbnb-base": "^3.0.1",
"eslint-plugin-import": "^1.8.1",
"tap": "^5.2.0",
"touch": "^1.0.0"
"eslint": "^7.3.1",
"eslint-config-airbnb-base": "^14.2.0",
"eslint-plugin-import": "^2.22.0",
"nyc": "^15.1.0",
"tap": "^14.10.7",
"touch": "^3.1.0"
}
}

Sorry, the diff of this file is not supported yet

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