Comparing version 1.0.1 to 1.0.2
@@ -5,3 +5,3 @@ { | ||
"description": "Meant to run on top of another script during development, reload the app after every change in the codebase", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"bin": { | ||
@@ -11,6 +11,6 @@ "ergol": "./bin/reloader" | ||
"dependencies": { | ||
"chokidar": "^3.5.1", | ||
"cli-color": "^2.0.0", | ||
"eslint": "^7.25.0", | ||
"yargs": "^17.0.1" | ||
"chokidar": "^3.5.3", | ||
"cli-color": "^2.0.1", | ||
"eslint": "^8.7.0", | ||
"yargs": "^17.3.1" | ||
}, | ||
@@ -17,0 +17,0 @@ "engines": { |
@@ -32,2 +32,4 @@ /* | ||
let notEnoughWatcherError = false; | ||
/** | ||
@@ -48,3 +50,3 @@ * Process running under this one and that is reloaded when necessary | ||
* and only then restarts it. | ||
* | ||
* | ||
* @param {Object} config Configuration variables | ||
@@ -73,2 +75,25 @@ * @param {string} script Path to the script that runs under this process and that is reloaded when necessary | ||
process.on('unhandledRejection', async error => { | ||
if (error.message.includes('ENOSPC')) { | ||
if (notEnoughWatcherError) { | ||
return; | ||
} | ||
notEnoughWatcherError = true; | ||
console.error(error.message); | ||
console.error(' You system does not have enough file watchers to run Ergol.'); | ||
console.error(' You need to increase this number:'); | ||
console.error(' - Linux: "sudo sysctl -w fs.inotify.max_user_watches=524288"'); | ||
console.error(' - OSX: "sudo sysctl -w kern.maxfiles=524288"'); | ||
console.error('\n Or you can just search "increase system file watcher <your os>"'); | ||
await stopProcess(config.killDelay); | ||
process.exit(1); | ||
} | ||
else { | ||
throw error; | ||
} | ||
}); | ||
startProcess(script, config.scriptArgs, config.nodeArgs); | ||
@@ -79,3 +104,3 @@ } | ||
* Starts the child process with the given args | ||
* | ||
* | ||
* @param {string} script Path to the script that runs under this process and that is reloaded when necessary | ||
@@ -118,3 +143,3 @@ * @param {Array<string>} scriptArgs Arguments to pass to the script (Default to []) | ||
* Gracefully shuts the current process down or kills it after some delay | ||
* | ||
* | ||
* @param {number} killDelay Max delay after which the process must be killed | ||
@@ -121,0 +146,0 @@ */ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
28553
278
+ Added@eslint-community/eslint-utils@4.4.0(transitive)
+ Added@eslint-community/regexpp@4.11.1(transitive)
+ Added@eslint/eslintrc@2.1.4(transitive)
+ Added@eslint/js@8.57.1(transitive)
+ Added@humanwhocodes/config-array@0.13.0(transitive)
+ Added@humanwhocodes/module-importer@1.0.1(transitive)
+ Added@humanwhocodes/object-schema@2.0.3(transitive)
+ Added@nodelib/fs.scandir@2.1.5(transitive)
+ Added@nodelib/fs.stat@2.0.5(transitive)
+ Added@nodelib/fs.walk@1.2.8(transitive)
+ Added@ungap/structured-clone@1.2.0(transitive)
+ Addedacorn@8.12.1(transitive)
+ Addedargparse@2.0.1(transitive)
+ Addedeslint@8.57.1(transitive)
+ Addedeslint-scope@7.2.2(transitive)
+ Addedeslint-visitor-keys@3.4.3(transitive)
+ Addedespree@9.6.1(transitive)
+ Addedfastq@1.17.1(transitive)
+ Addedfind-up@5.0.0(transitive)
+ Addedglob-parent@6.0.2(transitive)
+ Addedgraphemer@1.4.0(transitive)
+ Addedignore@5.3.2(transitive)
+ Addedis-path-inside@3.0.3(transitive)
+ Addedjs-yaml@4.1.0(transitive)
+ Addedlocate-path@6.0.0(transitive)
+ Addedp-limit@3.1.0(transitive)
+ Addedp-locate@5.0.0(transitive)
+ Addedpath-exists@4.0.0(transitive)
+ Addedqueue-microtask@1.2.3(transitive)
+ Addedreusify@1.0.4(transitive)
+ Addedrun-parallel@1.2.0(transitive)
+ Addedyocto-queue@0.1.0(transitive)
- Removed@babel/code-frame@7.12.11(transitive)
- Removed@babel/helper-validator-identifier@7.24.7(transitive)
- Removed@babel/highlight@7.24.7(transitive)
- Removed@eslint/eslintrc@0.4.3(transitive)
- Removed@humanwhocodes/config-array@0.5.0(transitive)
- Removed@humanwhocodes/object-schema@1.2.1(transitive)
- Removedacorn@7.4.1(transitive)
- Removedajv@8.17.1(transitive)
- Removedansi-colors@4.1.3(transitive)
- Removedansi-styles@3.2.1(transitive)
- Removedargparse@1.0.10(transitive)
- Removedastral-regex@2.0.0(transitive)
- Removedchalk@2.4.2(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedenquirer@2.4.1(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedeslint@7.32.0(transitive)
- Removedeslint-scope@5.1.1(transitive)
- Removedeslint-utils@2.1.0(transitive)
- Removedeslint-visitor-keys@1.3.02.1.0(transitive)
- Removedespree@7.3.1(transitive)
- Removedesprima@4.0.1(transitive)
- Removedestraverse@4.3.0(transitive)
- Removedfast-uri@3.0.2(transitive)
- Removedfunctional-red-black-tree@1.0.1(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedignore@4.0.6(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedjs-yaml@3.14.1(transitive)
- Removedjson-schema-traverse@1.0.0(transitive)
- Removedlodash.truncate@4.4.2(transitive)
- Removedpicocolors@1.1.0(transitive)
- Removedprogress@2.0.3(transitive)
- Removedregexpp@3.2.0(transitive)
- Removedrequire-from-string@2.0.2(transitive)
- Removedsemver@7.6.3(transitive)
- Removedslice-ansi@4.0.0(transitive)
- Removedsprintf-js@1.0.3(transitive)
- Removedsupports-color@5.5.0(transitive)
- Removedtable@6.8.2(transitive)
- Removedv8-compile-cache@2.4.0(transitive)
Updatedchokidar@^3.5.3
Updatedcli-color@^2.0.1
Updatedeslint@^8.7.0
Updatedyargs@^17.3.1