move consts

This commit is contained in:
silverwind 2020-03-13 20:55:15 +01:00
parent 174a589936
commit db6ae30aa6
Signed by: silverwind
GPG Key ID: 2E62B41C93869443

@ -174,6 +174,9 @@ const maxSockets = typeof args.sockets === "number" ? args.sockets : MAX_SOCKETS
const githubApiUrl = args.githubapi ? normalizeUrl(args.githubapi) : "https://api.github.com"; const githubApiUrl = args.githubapi ? normalizeUrl(args.githubapi) : "https://api.github.com";
let packageFile; let packageFile;
const deps = {};
const maybeUrlDeps = {};
if (args.file) { if (args.file) {
let stat; let stat;
try { try {
@ -232,7 +235,6 @@ function canInclude(name) {
return true; return true;
} }
const deps = {}, maybeUrlDeps = {};
for (const depType of dependencyTypes) { for (const depType of dependencyTypes) {
for (const [name, value] of Object.entries(pkg[depType] || {})) { for (const [name, value] of Object.entries(pkg[depType] || {})) {
if (semver.validRange(value) && canInclude(name)) { if (semver.validRange(value) && canInclude(name)) {