Socket
Socket
Sign inDemoInstall

envinfo

Package Overview
Dependencies
93
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.8.0 to 3.9.0

2

package.json
{
"name": "envinfo",
"version": "3.8.0",
"version": "3.9.0",
"description": "Info about your dev environment for debugging purposes",

@@ -5,0 +5,0 @@ "repository": "https://github.com/tabrindle/envinfo",

@@ -6,6 +6,5 @@ #!/usr/bin/env node

var helpers = require('./helpers');
var utils = require('./utils');
var copypasta = require('copy-paste');
var path = require('path');
module.exports.helpers = helpers;
module.exports.print = function print(options) {

@@ -28,3 +27,3 @@ var log = [];

if (options.packages) {
var packageJson = utils.getPackageJsonByPath('/package.json');
var packageJson = helpers.getPackageJsonByPath('/package.json');

@@ -53,3 +52,3 @@ if (!packageJson) {

var wanted = topLevelDependencies[trimmedDep] || '';
var dependencyPackageJson = utils.getPackageJsonByName(dep);
var dependencyPackageJson = helpers.getPackageJsonByName(dep);
var installed = dependencyPackageJson ? dependencyPackageJson.version : 'Not Found';

@@ -79,3 +78,3 @@ var duplicates = '';

.map(filePath => {
var json = utils.getPackageJsonByPath(filePath);
var json = helpers.getPackageJsonByPath(filePath);
return {

@@ -82,0 +81,0 @@ name: json.name,

var childProcess = require('child_process');
var fs = require('fs');
var glob = require('glob');
var os = require('os');
var osName = require('os-name');
var path = require('path');
var which = require('which');
var utils = require('./utils');
var glob = require('glob');
function uniq(arr) {
return Array.from(new Set(arr));
}
function requireJson(filePath) {
if (fs.existsSync(filePath)) return require(filePath);
return false;
}
function getPackageJsonByName(dep) {
return this.requireJson(path.join(process.cwd(), '/node_modules/', dep, '/package.json'));
}
function getPackageJsonByPath(filePath) {
return this.requireJson(path.join(process.cwd(), filePath));
}
function run(cmd) {
return (childProcess
.execSync(cmd, {
stdio: [0, 'pipe', 'ignore'],
})
.toString() || ''
return (
childProcess
.execSync(cmd, {
stdio: [0, 'pipe', 'ignore'],
})
.toString() || ''
).trim();

@@ -158,3 +177,3 @@ }

.map(function mapPathsForVersion(packageJsonPath) {
var packageJson = utils.getPackageJsonByPath(packageJsonPath);
var packageJson = getPackageJsonByPath(packageJsonPath);
if (packageJson) return packageJson.version;

@@ -164,3 +183,3 @@ return false;

.filter(Boolean);
versions = utils.uniq(versions).sort();
versions = uniq(versions).sort();
} catch (error) {

@@ -180,5 +199,9 @@ versions = [];

getOperatingSystemInfo: getOperatingSystemInfo,
getPackageJsonByName: getPackageJsonByName,
getPackageJsonByPath: getPackageJsonByPath,
getWatchmanVersion: getWatchmanVersion,
getXcodeVersion: getXcodeVersion,
getYarnVersion: getYarnVersion,
requireJson: requireJson,
uniq: uniq,
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc