diff --git a/package.json b/package.json index 0c22c7c3..474c4e22 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "files" : ["lib/", "data/", "test/","scripts/"], "main" : "lib/geoip.js", "repository" : { "type": "git", "url": "git://github.com/geoip-lite/node-geoip.git" }, - "engines" : { "node": ">=18.18.0" }, + "engines" : { "node": ">=10.3.0" }, "scripts": { "pretest": "eslint .", "test": "nodeunit --reporter=minimal test/tests.js", diff --git a/scripts/updatedb.js b/scripts/updatedb.js index d860467f..b207b705 100644 --- a/scripts/updatedb.js +++ b/scripts/updatedb.js @@ -426,7 +426,7 @@ async function processCountryData(src, dest) { await processLine(line); } datFile.close(); - console.log(' DONE'.green); + console.log(chalk.green(' DONE')); } async function processCityData(src, dest) { @@ -671,8 +671,11 @@ async.eachSeries(databases, function(database, nextDatabase) { process.exit(1); } else { console.log(chalk.green('Successfully Updated Databases from MaxMind.')); - if (args.indexOf("debug") !== -1) console.log(chalk.yellow.bold('Notice: temporary files are not deleted for debug purposes.')); - else rimraf(tmpPath); + if (args.indexOf("debug") !== -1) { + console.log(chalk.yellow.bold('Notice: temporary files are not deleted for debug purposes.')); + } else { + rimraf(tmpPath); + } process.exit(0); } });