Skip to content

Commit

Permalink
Merge branch 'master' into new-maxmind-auth
Browse files Browse the repository at this point in the history
  • Loading branch information
sgarner committed Mar 18, 2024
2 parents 5fd64a9 + c09dce8 commit 2f7056e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
14 changes: 14 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": ["config:base", ":disableDependencyDashboard"],
"schedule": "on the first day of the month",
"packageRules": [
{
"updateTypes": ["minor", "patch", "pin", "digest"],
"automerge": true
},
{
"depTypeList": ["devDependencies"],
"automerge": true
}
]
}
14 changes: 10 additions & 4 deletions utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ const getConfigWithDir = () => {
if (config) return { config, dir };
}

dir = path.join(dir, '..');
const parentDir = path.resolve(dir, '..');
if (parentDir === dir) break;
dir = parentDir;
}

console.log(
Expand Down Expand Up @@ -66,10 +68,14 @@ const getLicense = () => {
};

const getSelectedDbs = () => {
const config = getConfig();
const selected = config['selected-dbs'];
const valids = ['City', 'Country', 'ASN'];
if (!selected) return valids;

const config = getConfig();
const selected =
config != null && config['selected-dbs'] != null
? config['selected-dbs']
: valids;

if (!Array.isArray(selected)) {
console.error('selected-dbs property must have be an array.');
process.exit(1);
Expand Down

0 comments on commit 2f7056e

Please sign in to comment.