Comparing version 5.1.2 to 5.2.0
{ | ||
"name": "envinfo", | ||
"version": "5.1.2", | ||
"version": "5.2.0", | ||
"description": "Info about your dev environment for debugging purposes", | ||
@@ -16,8 +16,9 @@ "repository": "https://github.com/tabrindle/envinfo", | ||
"scripts": { | ||
"build": "npm run webpack", | ||
"check:format": "prettier -l 'src/**/*.js'", | ||
"format": "prettier --write 'src/**/*.js'", | ||
"lint": "eslint src", | ||
"preversion": "webpack && git add .", | ||
"start": "node src/cli.js", | ||
"lint": "eslint src", | ||
"format": "prettier --write 'src/**/*.js'", | ||
"test": "jest && npm run lint && npm run check:format", | ||
"check:format": "prettier -l 'src/**/*.js'", | ||
"preversion": "yarn webpack && git add ." | ||
"test": "jest && npm run lint && npm run check:format" | ||
}, | ||
@@ -24,0 +25,0 @@ "keywords": [ |
@@ -56,2 +56,6 @@ const yamlify = require('yamlify-object'); | ||
const value = entry[1]; | ||
if (value === 'Not Found') | ||
return Object.assign(acc, { | ||
[key]: value, | ||
}); | ||
const wanted = value.wanted ? `${value.wanted} =>` : ''; | ||
@@ -58,0 +62,0 @@ const installed = Array.isArray(value.installed) |
@@ -78,3 +78,3 @@ const glob = require('glob'); | ||
if (!acc[d.name]) acc[d.name] = {}; | ||
// set duplicates if flag set, if version not already there, && !== installed | ||
// set duplicates if flag set, if version not already there, && !== installed | ||
if (options.duplicates) { | ||
@@ -95,2 +95,12 @@ if (acc[d.name].installed && acc[d.name].installed !== d.version) { | ||
}) | ||
.then(versions => { | ||
if (options.showNotFound) { | ||
packages.forEach(p => { | ||
if (!versions[p]) { | ||
versions[p] = 'Not Found'; | ||
} | ||
}); | ||
} | ||
return versions; | ||
}) | ||
.then(versions => utils.sortObject(versions)), | ||
@@ -100,3 +110,3 @@ ]); | ||
function getnpmGlobalPackages(packages) { | ||
function getnpmGlobalPackages(packages, options) { | ||
utils.log('trace', 'getnpmGlobalPackages', packages); | ||
@@ -162,3 +172,13 @@ | ||
) | ||
), | ||
) | ||
.then(versions => { | ||
if (options.showNotFound) { | ||
packages.forEach(p => { | ||
if (!versions[p]) { | ||
versions[p] = 'Not Found'; | ||
} | ||
}); | ||
} | ||
return versions; | ||
}), | ||
]); | ||
@@ -165,0 +185,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
1293
541472
20