Comparing version 2.0.7 to 2.0.8-alpha.1
@@ -7,2 +7,4 @@ #!/usr/bin/env node | ||
} | ||
const message = '\u001b[32mLove nodemon? You can now support the project via the open collective:\u001b[22m\u001b[39m\n > \u001b[96m\u001b[1mhttps://opencollective.com/nodemon/donate\u001b[0m\n'; | ||
@@ -22,7 +24,7 @@ try { | ||
if (!last || now - week > last) { | ||
console.log('\u001b[32mLove nodemon? You can now support the project via the open collective:\u001b[22m\u001b[39m\n > \u001b[96m\u001b[1mhttps://opencollective.com/nodemon/donate\u001b[0m\n'); | ||
console.log(message); | ||
conf.set('lastCheck', now); | ||
} | ||
} catch (e) { | ||
console.log('\u001b[32mLove nodemon? You can now support the project via the open collective:\u001b[22m\u001b[39m\n > \u001b[96m\u001b[1mhttps://opencollective.com/nodemon/donate\u001b[0m\n'); | ||
console.log(message); | ||
} | ||
@@ -29,0 +31,0 @@ } |
@@ -8,2 +8,3 @@ var debug = require('debug')('nodemon:run'); | ||
var exec = childProcess.exec; | ||
var execSync = childProcess.execSync; | ||
var fork = childProcess.fork; | ||
@@ -309,16 +310,58 @@ var watch = require('./watch').watch; | ||
function kill(child, signal, callback) { | ||
if (!callback) { | ||
callback = function () { }; | ||
callback = noop; | ||
} | ||
if (utils.isWindows) { | ||
// When using CoffeeScript under Windows, child's process is not node.exe | ||
// Instead coffee.cmd is launched, which launches cmd.exe, which starts | ||
// node.exe as a child process child.kill() would only kill cmd.exe, not | ||
// node.exe | ||
// Therefore we use the Windows taskkill utility to kill the process and all | ||
// its children (/T for tree). | ||
// Force kill (/F) the whole child tree (/T) by PID (/PID 123) | ||
exec('taskkill /pid ' + child.pid + ' /T /F'); | ||
// We are handling a 'SIGKILL' POSIX signal under Windows the | ||
// same way it is handled on a UNIX system: We are performing | ||
// a hard shutdown without waiting for the process to clean-up. | ||
if (signal === 'SIGKILL') { | ||
debug('terminating process group by force: %s', child.pid); | ||
// We are using the taskkill utility to terminate the whole | ||
// process group ('/t') of the child ('/pid') by force ('/f'). | ||
// We need to end all sub processes, because the 'child' | ||
// process in this context is actually a cmd.exe wrapper. | ||
exec(`taskkill /f /t /pid ${child.pid}`); | ||
callback(); | ||
return; | ||
} | ||
// We are using the Windows Management Instrumentation Command-line | ||
// (wmic.exe) to resolve the sub-child process identifier, because the | ||
// 'child' process in this context is actually a cmd.exe wrapper. | ||
// We want to send the termination signal directly to the node process. | ||
// The '2> nul' silences the no process found error message. | ||
const resultBuffer = execSync( | ||
`wmic process where (ParentProcessId=${child.pid}) get ProcessId 2> nul` | ||
); | ||
const result = resultBuffer.toString().match(/^[0-9]+/m); | ||
// If there is no sub-child process we fall back to the child process. | ||
const processId = Array.isArray(result) ? result[0] : child.pid; | ||
debug('sending kill signal SIGINT to process: %s', processId); | ||
// We are using the standalone 'windows-kill' executable to send the | ||
// standard POSIX signal 'SIGINT' to the node process. This fixes #1720. | ||
const windowsKill = path.normalize( | ||
`${__dirname}/../../bin/windows-kill.exe` | ||
); | ||
// We have to detach the 'windows-kill' execution completely from this | ||
// process group to avoid terminating the nodemon process itself. | ||
// See: https://github.com/alirdn/windows-kill#how-it-works--limitations | ||
// | ||
// Therefore we are using 'start' to create a new cmd.exe context. | ||
// The '/min' option hides the new terminal window and the '/wait' | ||
// option lets the process wait for the command to finish. | ||
execSync( | ||
`start "windows-kill" /min /wait "${windowsKill}" -SIGINT ${processId}` | ||
); | ||
callback(); | ||
} else { | ||
@@ -325,0 +368,0 @@ // we use psTree to kill the full subtree of nodemon, because when |
@@ -1,1 +0,75 @@ | ||
{"name":"nodemon","homepage":"https://nodemon.io","author":{"name":"Remy Sharp","url":"https://github.com/remy"},"bin":{"nodemon":"./bin/nodemon.js"},"engines":{"node":">=8.10.0"},"repository":{"type":"git","url":"https://github.com/remy/nodemon.git"},"description":"Simple monitor script for use during development of a node.js app.","keywords":["monitor","development","restart","autoload","reload","terminal"],"license":"MIT","main":"./lib/nodemon","scripts":{"commitmsg":"commitlint -e","coverage":"istanbul cover _mocha -- --timeout 30000 --ui bdd --reporter list test/**/*.test.js","lint":"eslint lib/**/*.js",":spec":"node_modules/.bin/mocha --timeout 30000 --ui bdd test/**/*.test.js","test":"npm run lint && npm run spec","spec":"for FILE in test/**/*.test.js; do echo $FILE; TEST=1 mocha --exit --timeout 30000 $FILE; if [ $? -ne 0 ]; then exit 1; fi; sleep 1; done","postspec":"npm run clean","clean":"rm -rf test/fixtures/test*.js test/fixtures/test*.md","web":"node web","semantic-release":"semantic-release pre && npm publish && semantic-release post","prepush":"npm run lint","killall":"ps auxww | grep node | grep -v grep | awk '{ print $2 }' | xargs kill -9","postinstall":"node bin/postinstall || exit 0"},"devDependencies":{"@commitlint/cli":"^11.0.0","@commitlint/config-conventional":"^11.0.0","async":"1.4.2","coffee-script":"~1.7.1","eslint":"^7.11.0","husky":"^0.14.3","istanbul":"^0.4.5","mocha":"^2.5.3","proxyquire":"^1.8.0","semantic-release":"^8.2.3","should":"~4.0.0"},"dependencies":{"chokidar":"^3.2.2","debug":"^3.2.6","ignore-by-default":"^1.0.1","minimatch":"^3.0.4","pstree.remy":"^1.1.7","semver":"^5.7.1","supports-color":"^5.5.0","touch":"^3.1.0","undefsafe":"^2.0.3","update-notifier":"^4.1.0"},"version":"2.0.7","funding":{"type":"opencollective","url":"https://opencollective.com/nodemon"}} | ||
{ | ||
"name": "nodemon", | ||
"homepage": "https://nodemon.io", | ||
"author": { | ||
"name": "Remy Sharp", | ||
"url": "https://github.com/remy" | ||
}, | ||
"bin": { | ||
"nodemon": "./bin/nodemon.js" | ||
}, | ||
"engines": { | ||
"node": ">=8.10.0" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/remy/nodemon.git" | ||
}, | ||
"description": "Simple monitor script for use during development of a node.js app.", | ||
"keywords": [ | ||
"monitor", | ||
"development", | ||
"restart", | ||
"autoload", | ||
"reload", | ||
"terminal" | ||
], | ||
"license": "MIT", | ||
"main": "./lib/nodemon", | ||
"scripts": { | ||
"commitmsg": "commitlint -e", | ||
"coverage": "istanbul cover _mocha -- --timeout 30000 --ui bdd --reporter list test/**/*.test.js", | ||
"lint": "eslint lib/**/*.js", | ||
":spec": "node_modules/.bin/mocha --timeout 30000 --ui bdd test/**/*.test.js", | ||
"test": "npm run lint && npm run spec", | ||
"spec": "for FILE in test/**/*.test.js; do echo $FILE; TEST=1 mocha --exit --timeout 30000 $FILE; if [ $? -ne 0 ]; then exit 1; fi; sleep 1; done", | ||
"postspec": "npm run clean", | ||
"clean": "rm -rf test/fixtures/test*.js test/fixtures/test*.md", | ||
"web": "node web", | ||
"semantic-release": "semantic-release", | ||
"prepush": "npm run lint", | ||
"killall": "ps auxww | grep node | grep -v grep | awk '{ print $2 }' | xargs kill -9", | ||
"postinstall": "node bin/postinstall || exit 0" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "^11.0.0", | ||
"@commitlint/config-conventional": "^11.0.0", | ||
"async": "1.4.2", | ||
"coffee-script": "~1.7.1", | ||
"eslint": "^7.11.0", | ||
"husky": "^0.14.3", | ||
"istanbul": "^0.4.5", | ||
"mocha": "^2.5.3", | ||
"proxyquire": "^1.8.0", | ||
"semantic-release": "^17.4.4", | ||
"should": "~4.0.0" | ||
}, | ||
"dependencies": { | ||
"chokidar": "^3.2.2", | ||
"debug": "^3.2.6", | ||
"ignore-by-default": "^1.0.1", | ||
"minimatch": "^3.0.4", | ||
"pstree.remy": "^1.1.7", | ||
"semver": "^5.7.1", | ||
"supports-color": "^5.5.0", | ||
"touch": "^3.1.0", | ||
"undefsafe": "^2.0.3", | ||
"update-notifier": "^4.1.0" | ||
}, | ||
"_version": "0.0.0-development", | ||
"version": "2.0.8-alpha.1", | ||
"funding": { | ||
"type": "opencollective", | ||
"url": "https://opencollective.com/nodemon" | ||
} | ||
} |
@@ -54,4 +54,2 @@ <p align="center"> | ||
If no script is given, nodemon will test for a `package.json` file and if found, will run the file associated with the *main* property ([ref](https://github.com/remy/nodemon/issues/14)). | ||
You can also pass the `inspect` flag to node through the command line as you would normally: | ||
@@ -63,3 +61,3 @@ | ||
If you have a `package.json` file for your app, you can omit the main script entirely and nodemon will read the `package.json` for the `main` property and use that value as the app. | ||
If you have a `package.json` file for your app, you can omit the main script entirely and nodemon will read the `package.json` for the `main` property and use that value as the app ([ref](https://github.com/remy/nodemon/issues/14)). | ||
@@ -117,3 +115,3 @@ nodemon will also search for the `scripts.start` property in `package.json` (as of nodemon 1.1.x). | ||
"ignore": ["test/*", "docs/*"], | ||
"delay": "2500" | ||
"delay": 2500 | ||
} | ||
@@ -255,3 +253,3 @@ } | ||
{ | ||
"delay": "2500" | ||
"delay": 2500 | ||
} | ||
@@ -377,5 +375,9 @@ ``` | ||
[<img src="https://user-images.githubusercontent.com/13700/35731651-677aa3fc-080e-11e8-8580-75fa92db56ec.png" width="200">](https://sparkpo.st/nodemon) | ||
<div style="overflow: hidden; margin-bottom: 80px;"> | ||
<a href="https://mixmax.com"><img style="margin: 12px; float: left" src="https://user-images.githubusercontent.com/13700/35731622-421d4466-080e-11e8-8ddc-11c70e1cd79e.png" width="120"></a> | ||
<a href="https://www.topratedcasinosites.co.uk/"><img style="margin: 12px; float: left" alt="topratedcasinosites.co.uk" src="https://images.opencollective.com/top-rated-casino-sites/1bf7c97/logo/256.png" width="120"></a> | ||
<a href="https://www.najlepszeplatformyforex.pl/blog/broker-xtb/"><img style="margin: 12px; float: left" src="https://user-images.githubusercontent.com/13700/106011732-a72b2580-60b2-11eb-9d6a-24bf958de95d.png" width="120"></a> | ||
<a href="https://www.auscasinos.com/new"><img style="margin: 12px; float: left" src="https://images.opencollective.com/auscasinos/8df0f47/logo/256.png" style="object-fit: contain; margin: 12px; margin-top:20px" height="120" width="120"></a><a href="https://www.casinoenvivo.com/blackjack"><img style="margin: 12px; float: left" src="https://images.opencollective.com/casino-en-vivo/1340a53/logo/256.png" style="object-fit: contain; margin: 12px; margin-top:20px" height="120" width="120"></a><a href="https://kasynohex.com/"><img src="https://images.opencollective.com/kasynohex-com/b25daf6/logo/256.png" style="object-fit: contain; float: left; margin:12px" height="120" width="120"></a><a href="https://netticasinohex.com/"><img src="https://images.opencollective.com/netticasinohex-com/71d7417/logo/256.png" style="object-fit: contain; float: left; margin:12px" height="120" width="120"></a><a href="https://aussiecasinohex.com/"><img src="https://images.opencollective.com/aussiecasinohex/923df37/logo/256.png" style="object-fit: contain; float: left; margin:12px" height="120" width="120"></a><a href="https://hollandsegokken.nl/"><img src="https://images.opencollective.com/hollandsegokken-nl/7a3d90c/logo/256.png" style="object-fit: contain; float: left; margin:12px" height="120" width="120"></a><a href="https://cryptocasinos.com/"><img src="https://images.opencollective.com/cryptocasinos/99b168e/logo/256.png" style="object-fit: contain; float: left; margin:12px" height="120" width="120"></a><a href="https://mtltimes.ca/life/11-best-real-money-canadian-online-casinos-revealed-after-months-of-testing/"><img src="https://images.opencollective.com/mtl-times/b2736b8/logo/256.png" style="object-fit: contain; float: left; margin:12px" height="120" width="120"></a><a href="https://www.casinoonlineaams.com/"><img src="https://images.opencollective.com/casinoonlineaamscom/da74236/logo/256.png" style="object-fit: contain; float: left; margin:12px" height="120" width="120"></a><a href="https://slotokingua.com/"><img src="https://images.opencollective.com/slotoking-casino-ukraine/f4920ae/logo/256.png" style="object-fit: contain; float: left; margin:12px" height="120" width="120"></a><a href="https://gamblizardcanada.com/free-spins/"><img src="https://images.opencollective.com/gamblizardcanada_com/1aa20b9/logo/256.png" style="object-fit: contain; float: left; margin:12px" height="120" width="120"></a><a href="https://anbefaltcasino.com/"><img src="https://images.opencollective.com/anbefaltcasino-com/ab21410/logo/256.png" style="object-fit: contain; float: left; margin:12px" height="120" width="120"></a><a href="https://www.bitcoinbuster.com/"><img src="https://images.opencollective.com/bitcoinbuster-com/858a895/logo/256.png" style="object-fit: contain; float: left; margin:12px" height="120" width="120"></a><a href="https://www.eldinamo.cl/entretencion/2021/06/08/los-cinco-mejores-casinos-online-en-chile-para-2021/"><img src="https://images.opencollective.com/eldinamo/de50164/logo/256.png" style="object-fit: contain; float: left; margin:12px" height="120" width="120"></a><a href="https://casinosters.com/minimum-deposit-casinos/"><img src="https://images.opencollective.com/casinosters-com/c7fbffd/logo/256.png" style="object-fit: contain; float: left; margin:12px" height="120" width="120"></a><a href="https://www.elespectador.com/contenido-patrocinado/ruleta-en-vivo-en-espana-los-mejores-casinos-segun-su-popularidad/"><img src="https://images.opencollective.com/espectador/7cde7f5/logo/256.png" style="object-fit: contain; float: left; margin:12px" height="120" width="120"></a> | ||
[<img src="https://user-images.githubusercontent.com/13700/35731622-421d4466-080e-11e8-8ddc-11c70e1cd79e.png" width="200">](https://mixmax.com) | ||
</div> | ||
@@ -382,0 +384,0 @@ # License |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
193763
45
2617
382
1