Comparing version 6.2.0 to 6.3.0
# node-dev | ||
## v6.3.0 / 2021-02-22 | ||
- Stop disconnecting from child processes, this should prevent internal EPIPE errors | ||
- Stop adding filewatchers until child processes have completed exiting | ||
- [IPC] Stop listening on `message` | ||
- [IPC] Remove extraneous `dest` arguments | ||
- [IPC] Add a connected guard on relay | ||
- [Test] Move cluster from `run` to `spawn` | ||
- [Test] Fix typo in cluster test | ||
- [Test] Cluster test now waits for children processes to successfully start up again | ||
- [Test] Add guards to IPC and cluster tests to prevent process exit from ending the test a 2nd time | ||
- [`dependency`] Update `semver` from `v7.3.2 `to `v7.3.4` | ||
- [`devDependency`] Remove `nyc` | ||
- [`devDependency`] Update `@types/node`, `eslint`, `eslint-config-airbnb-base`, `tap`, `ts-node`, & `typescript` | ||
- [`Vagrantfile`] Remove `Vagrantfile` | ||
- [`README`] Fix typo (@ivalsaraj) | ||
## v6.2.0 / 2020-10-15 | ||
@@ -4,0 +21,0 @@ |
@@ -51,2 +51,3 @@ const fork = require('child_process').fork; | ||
const watcher = filewatcher({ forcePolling }); | ||
let isPaused = false; | ||
@@ -58,2 +59,3 @@ watcher.on('change', file => { | ||
watcher.removeAll(); | ||
isPaused = true; | ||
if (child) { | ||
@@ -80,2 +82,3 @@ // Child is still running, restart upon exit | ||
function start() { | ||
isPaused = false; | ||
const cmd = nodeArgs.concat(wrapper, script, scriptArgs); | ||
@@ -108,2 +111,3 @@ | ||
ipc.on(child, 'required', ({ required }) => { | ||
if (isPaused) return; | ||
const isIgnored = ignore.some(isPrefixOf(required)); | ||
@@ -133,3 +137,2 @@ | ||
} | ||
child.disconnect(); | ||
} | ||
@@ -136,0 +139,0 @@ |
@@ -1,24 +0,17 @@ | ||
const NODE_DEV = 'NODE_DEV'; | ||
const cmd = 'NODE_DEV'; | ||
exports.send = function (m, dest) { | ||
m.cmd = NODE_DEV; | ||
if (!dest) dest = process; | ||
if (dest.connected) dest.send(m); | ||
exports.send = m => { | ||
if (process.connected) process.send({ ...m, cmd }); | ||
}; | ||
exports.on = function (proc, type, cb) { | ||
function handleMessage(m) { | ||
if (m.cmd === NODE_DEV && type in m) cb(m); | ||
} | ||
proc.on('internalMessage', handleMessage); | ||
proc.on('message', handleMessage); | ||
exports.on = (src, prop, cb) => { | ||
src.on('internalMessage', m => { | ||
if (m.cmd === cmd && prop in m) cb(m); | ||
}); | ||
}; | ||
exports.relay = function (src, dest) { | ||
if (!dest) dest = process; | ||
function relayMessage(m) { | ||
if (m.cmd === NODE_DEV) dest.send(m); | ||
} | ||
src.on('internalMessage', relayMessage); | ||
src.on('message', relayMessage); | ||
exports.relay = src => { | ||
src.on('internalMessage', m => { | ||
if (process.connected && m.cmd === cmd) process.send(m); | ||
}); | ||
}; |
{ | ||
"name": "node-dev", | ||
"version": "6.2.0", | ||
"version": "6.3.0", | ||
"description": "Restarts your app when files are modified", | ||
@@ -41,16 +41,15 @@ "keywords": [ | ||
"resolve": "^1.0.0", | ||
"semver": "^7.3.2" | ||
"semver": "^7.3.4" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^14.11.8", | ||
"@types/node": "^14.14.31", | ||
"coffeescript": "^2.4.1", | ||
"eslint": "^7.11.0", | ||
"eslint-config-airbnb-base": "^14.2.0", | ||
"eslint": "^7.20.0", | ||
"eslint-config-airbnb-base": "^14.2.1", | ||
"eslint-plugin-import": "^2.22.1", | ||
"nyc": "^15.1.0", | ||
"tap": "^14.10.7", | ||
"tap": "^14.11.0", | ||
"touch": "^3.1.0", | ||
"ts-node": "^9.0.0", | ||
"typescript": "^4.0.3" | ||
"ts-node": "^9.1.1", | ||
"typescript": "^4.1.5" | ||
} | ||
} |
@@ -186,3 +186,3 @@ [![Build Status](https://secure.travis-ci.org/fgnass/node-dev.png)](http://travis-ci.org/fgnass/node-dev) | ||
process.on("message", function (msg) { | ||
if (msg === "<graceful_ipc argument") { | ||
if (msg === "<graceful_ipc argument>") { | ||
// Gracefully shut down here | ||
@@ -189,0 +189,0 @@ doGracefulShutdown(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33130
9
21
471
Updatedsemver@^7.3.4