Comparing version 2.1.0 to 2.2.0
18
index.js
@@ -103,2 +103,13 @@ #!/usr/bin/env node | ||
function getOperatingSystemInfo() { | ||
try { | ||
if (process.platform === 'darwin') { | ||
var version = (execSync('sw_vers -productVersion ', { | ||
stdio: [0, 'pipe', 'ignore'] | ||
}).toString() || '') | ||
.trim(); | ||
return osName(os.platform(), os.release()) + ' ' + version; | ||
} | ||
} catch (err) { | ||
console.log('Unable to find Mac OS version'); | ||
} | ||
return osName(os.platform(), os.release()); | ||
@@ -115,3 +126,3 @@ } | ||
if (argv.packages){ | ||
if (argv.packages) { | ||
var packageJson = require(process.cwd() + '/package.json'); | ||
@@ -122,3 +133,3 @@ var devDependencies = packageJson.devDependencies || {}; | ||
var logFunction = function(dep) { | ||
if(allDependencies[dep]) console.log(' ' + dep + ': ', allDependencies[dep]); | ||
if (allDependencies[dep]) console.log(' ' + dep + ': ', allDependencies[dep]); | ||
}; | ||
@@ -128,6 +139,5 @@ | ||
argv.packages.split(',').map(logFunction); | ||
} else if (typeof argv.packages === 'boolean'){ | ||
} else if (typeof argv.packages === 'boolean') { | ||
Object.keys(allDependencies).map(logFunction); | ||
} | ||
} | ||
{ | ||
"name": "envinfo", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "Info about your dev environment for debugging purposes", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/tabrindle/envinfo", |
@@ -17,3 +17,2 @@ # envinfo | ||
## Sample | ||
```bash | ||
@@ -29,2 +28,35 @@ Environment: | ||
Optionally add packages from your package.json: | ||
`envinfo --packages react,react-native` | ||
```bash | ||
Environment: | ||
OS: macOS Sierra | ||
Node: v7.10.0 | ||
Yarn: 0.24.5 | ||
npm: 4.2.0 | ||
Xcode: Xcode 8.3.3 Build version 8E3004b | ||
Android Studio: 2.3 AI-162.3934792 | ||
react: 16.0.0-alpha.6 | ||
react-native: 0.44.0 | ||
``` | ||
Or all of your packages like this: | ||
`envinfo --packages` | ||
```bash | ||
Environment: | ||
OS: macOS Sierra | ||
Node: v7.10.0 | ||
Yarn: 0.24.5 | ||
npm: 4.2.0 | ||
Xcode: Xcode 8.3.3 Build version 8E3004b | ||
Android Studio: 2.3 AI-162.3934792 | ||
eslint: ^4.0.0 | ||
prettier-eslint-cli: ^4.1.1 | ||
chalk: ^1.1.3 | ||
minimist: ^1.2.0 | ||
os-name: ^2.0.1 | ||
``` | ||
## Contributing | ||
@@ -31,0 +63,0 @@ PRs for additional features are welcome! Run `npm run lint && npm run format` before commiting. |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
110428
1677
64
1