Comparing version 4.0.0-beta.6 to 4.0.0-beta.7
{ | ||
"name": "envinfo", | ||
"version": "4.0.0-beta.6", | ||
"version": "4.0.0-beta.7", | ||
"description": "Info about your dev environment for debugging purposes", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/tabrindle/envinfo", |
146
README.md
@@ -24,4 +24,5 @@ # envinfo | ||
CPU: x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz | ||
Free Memory: 3.99 GB | ||
Free Memory: 4.01 GB | ||
Total Memory: 16.00 GB | ||
Shell: /usr/local/bin/bash - 4.4.12 | ||
Binaries: | ||
@@ -33,11 +34,17 @@ Node: 8.9.4 | ||
Docker: 17.12.0-ce, build c97c6d6 | ||
Homebrew: 1.5.2 | ||
Homebrew: 1.5.4 | ||
SDKs: | ||
iOS: | ||
Platforms: iOS 11.0, macOS 10.13, tvOS 11.0, watchOS 4.0 | ||
Android: | ||
Build Tools: 27.0.3 | ||
API Levels: 26 | ||
IDEs: | ||
Android Studio: Not Found | ||
Android Studio: 3.0 AI-171.4443003 | ||
Atom: 1.23.3 | ||
VSCode: 1.19.3 | ||
VSCode: 1.20.1 | ||
Sublime Text: Build 3143 | ||
Xcode: Xcode 9.0 Build version 9A235 | ||
Languages: | ||
Bash: 3.2.57(1)-release | ||
Bash: 4.4.12 | ||
Go: 1.9.3 | ||
@@ -48,5 +55,5 @@ PHP: 7.1.7 | ||
Browsers: | ||
Chrome: 63.0.3239.132 | ||
Chrome Canary: 66.0.3333.0 | ||
Firefox: 57.0.1 | ||
Chrome: 64.0.3282.167 | ||
Chrome Canary: 66.0.3353.0 | ||
Firefox: 58.0 | ||
Firefox Developer Edition: 57.0 | ||
@@ -56,2 +63,57 @@ Firefox Nightly: 58.0a1 | ||
Safari Technology Preview: 11.1 | ||
npmPackages: | ||
eslint: | ||
wanted: ^4.10.0 | ||
installed: 4.16.0 | ||
eslint-config-airbnb-base: | ||
wanted: ^12.1.0 | ||
installed: 12.1.0 | ||
eslint-config-prettier: | ||
wanted: ^2.7.0 | ||
installed: 2.9.0 | ||
eslint-plugin-import: | ||
wanted: ^2.8.0 | ||
installed: 2.8.0 | ||
eslint-plugin-prettier: | ||
wanted: ^2.3.1 | ||
installed: 2.5.0 | ||
prettier-eslint-cli: | ||
wanted: ^4.1.1 | ||
installed: 4.7.0 | ||
array-includes: | ||
wanted: ^3.0.3 | ||
installed: 3.0.3 | ||
clipboardy: | ||
wanted: ^1.2.2 | ||
installed: 1.2.2 | ||
glob: | ||
wanted: ^7.1.2 | ||
installed: 7.1.2 | ||
minimist: | ||
wanted: ^1.2.0 | ||
installed: 1.2.0 | ||
object.entries: | ||
wanted: ^1.0.4 | ||
installed: 1.0.4 | ||
object.values: | ||
wanted: ^1.0.4 | ||
installed: 1.0.4 | ||
os-name: | ||
wanted: ^2.0.1 | ||
installed: 2.0.1 | ||
which: | ||
wanted: ^1.2.14 | ||
installed: 1.3.0 | ||
yamlify-object: | ||
wanted: ^0.4.5 | ||
installed: 0.4.5 | ||
npmGlobalPackages: | ||
create-react-native-app: 1.0.0 | ||
docker-registry-cli: 1.0.0 | ||
envinfo: 4.0.0-beta.6 | ||
exp: 49.2.2 | ||
lerna: 2.7.1 | ||
npm: 5.6.0 | ||
npm-check-updates: 2.14.0 | ||
react-native-cli: 2.0.1 | ||
``` | ||
@@ -63,25 +125,32 @@ | ||
* --packages - Optionally return packages from your package.json: takes either boolean or comma delimited string in CLI or array via API | ||
* --npmPackages - Optionally return packages from your package.json: takes either boolean or comma delimited string in CLI or array via API | ||
`envinfo --packages minimist,which` | ||
`envinfo --system --binaries --npmPackages=minimist,which` | ||
```sh | ||
System: | ||
OS: macOS High Sierra 10.13 | ||
CPU: x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz | ||
Free Memory: 4.01 GB | ||
Total Memory: 16.00 GB | ||
Binaries: | ||
Node: 8.9.4 | ||
Yarn: 1.3.2 | ||
npm: 5.6.0 | ||
... | ||
Packages: | ||
minimist: ^1.2.0 => 1.2.0 | ||
which: ^1.2.14 => 1.3.0 | ||
System: | ||
OS: macOS High Sierra 10.13 | ||
CPU: x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz | ||
Free Memory: 3.93 GB | ||
Total Memory: 16.00 GB | ||
Shell: /usr/local/bin/bash - 4.4.12 | ||
Binaries: | ||
Node: 8.9.4 | ||
Yarn: 1.3.2 | ||
npm: 5.6.0 | ||
... | ||
npmPackages: | ||
eslint: | ||
wanted: ^4.10.0 | ||
installed: 4.16.0 | ||
... | ||
yamlify-object: | ||
wanted: ^0.4.5 | ||
installed: 0.4.5 | ||
``` | ||
Or all of your packages like this: | ||
`envinfo --packages` | ||
* --npmGlobalPackages - print your npm global packages versions | ||
`envinfo --system --binaries --npmGlobalPackages` | ||
```sh | ||
@@ -97,29 +166,4 @@ System: | ||
npm: 5.6.0 | ||
... | ||
Packages: | ||
array-includes: ^3.0.3 => 3.0.3 | ||
clipboardy: ^1.2.2 => 1.2.2 | ||
glob: ^7.1.2 => 7.1.2 | ||
... | ||
minimist: ^1.2.0 => 1.2.0 | ||
object.entries: ^1.0.4 => 1.0.4 | ||
object.values: ^1.0.4 => 1.0.4 | ||
os-name: ^2.0.1 => 2.0.1 | ||
which: ^1.2.14 => 1.3.0 | ||
``` | ||
* --globalPackages - print your npm global packages versions | ||
```sh | ||
System: | ||
OS: macOS High Sierra 10.13 | ||
CPU: x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz | ||
Free Memory: 4.01 GB | ||
Total Memory: 16.00 GB | ||
Binaries: | ||
Node: 8.9.4 | ||
Yarn: 1.3.2 | ||
npm: 5.6.0 | ||
... | ||
Global Packages: | ||
npmGlobalPackages: | ||
envinfo: 4.0.0-beta.1 | ||
@@ -126,0 +170,0 @@ exp: 48.0.2 |
@@ -33,4 +33,4 @@ #!/usr/bin/env node | ||
], | ||
npmPackages: true, | ||
npmGlobalPackages: true, | ||
npmPackages: null, | ||
npmGlobalPackages: null, | ||
}; | ||
@@ -37,0 +37,0 @@ |
@@ -1,7 +0,8 @@ | ||
var childProcess = require('child_process'); | ||
var os = require('os'); | ||
var osName = require('os-name'); | ||
var path = require('path'); | ||
var which = require('which'); | ||
var utils = require('./utils'); | ||
const childProcess = require('child_process'); | ||
const os = require('os'); | ||
const osName = require('os-name'); | ||
const path = require('path'); | ||
const which = require('which'); | ||
const packages = require('./packages'); | ||
const utils = require('./utils'); | ||
@@ -283,20 +284,2 @@ var browserBundleIdentifiers = { | ||
function getNpmGlobalPackages() { | ||
var npmGlobalPackages; | ||
try { | ||
npmGlobalPackages = utils.run('npm list -g --depth=0 --json'); | ||
npmGlobalPackages = JSON.parse(npmGlobalPackages); | ||
npmGlobalPackages = Object.entries(npmGlobalPackages.dependencies).reduce((acc, dep) => { | ||
const name = dep[0]; | ||
const info = dep[1]; | ||
return Object.assign(acc, { | ||
[name]: info.version, | ||
}); | ||
}, {}); | ||
} catch (error) { | ||
npmGlobalPackages = 'Not Found'; | ||
} | ||
return npmGlobalPackages; | ||
} | ||
function getShell() { | ||
@@ -439,3 +422,3 @@ var shell; | ||
module.exports = { | ||
module.exports = Object.assign(packages, { | ||
browserBundleIdentifiers: browserBundleIdentifiers, | ||
@@ -456,3 +439,2 @@ findDarwinApplication: findDarwinApplication, | ||
getNodeVersion: getNodeVersion, | ||
getNpmGlobalPackages: getNpmGlobalPackages, | ||
getNpmVersion: getNpmVersion, | ||
@@ -473,2 +455,2 @@ getOperatingSystemInfo: getOperatingSystemInfo, | ||
getFirefoxNightlyVersion: getFirefoxNightlyVersion, | ||
}; | ||
}); |
@@ -1,3 +0,3 @@ | ||
var glob = require('glob'); | ||
var utils = require('./utils'); | ||
const glob = require('glob'); | ||
const utils = require('./utils'); | ||
@@ -174,3 +174,7 @@ function getAllPackageJsonPaths() { | ||
function getNpmGlobalPackages() { | ||
function getNpmGlobalPackages(packages) { | ||
if (typeof packages === 'string') { | ||
packages = packages.split(','); | ||
} | ||
var npmGlobalPackages; | ||
@@ -183,5 +187,7 @@ try { | ||
const info = dep[1]; | ||
return Object.assign(acc, { | ||
[name]: info.version, | ||
}); | ||
if (packages.some(p => p.toLowerCase() === name.toLowerCase())) | ||
return Object.assign(acc, { | ||
[name]: info.version, | ||
}); | ||
return acc; | ||
}, {}); | ||
@@ -188,0 +194,0 @@ } catch (error) { |
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
89965
223
961