Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wiredep

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wiredep - npm Package Compare versions

Comparing version 1.8.4 to 1.8.5

43

lib/detect-dependencies.js
'use strict';
var $ = require('modmod')('fs', 'lodash', 'path', 'propprop');
var _ = $.lodash;
var $ = {
_: require('lodash'),
fs: require('fs'),
lodash: require('lodash'),
path: require('path'),
propprop: require('propprop')
};

@@ -17,7 +22,7 @@

if (config.get('dependencies')) {
_.assign(allDependencies, config.get('bower.json').dependencies);
$._.assign(allDependencies, config.get('bower.json').dependencies);
}
if (config.get('dev-dependencies')) {
_.assign(allDependencies, config.get('bower.json').devDependencies);
$._.assign(allDependencies, config.get('bower.json').devDependencies);
}

@@ -29,3 +34,3 @@

_.each(allDependencies, gatherInfo(config));
$._.each(allDependencies, gatherInfo(config));

@@ -65,3 +70,3 @@ config.set('global-dependencies-sorted', filterExcludedDependencies(

if (!_.isObject(componentConfigFile) && $.fs.existsSync(configFile)) {
if (!$._.isObject(componentConfigFile) && $.fs.existsSync(configFile)) {
componentConfigFile = JSON.parse($.fs.readFileSync(configFile));

@@ -87,8 +92,8 @@ }

if (_.isString(componentConfigFile.main)) {
if ($._.isString(componentConfigFile.main)) {
// start by looking for what every component should have: config.main
filePaths = [componentConfigFile.main];
} else if (_.isArray(componentConfigFile.main)) {
} else if ($._.isArray(componentConfigFile.main)) {
filePaths = componentConfigFile.main;
} else if (_.isArray(componentConfigFile.scripts)) {
} else if ($._.isArray(componentConfigFile.scripts)) {
// still haven't found it. is it stored in config.scripts, then?

@@ -151,3 +156,3 @@ filePaths = componentConfigFile.scripts;

var mains = findMainFiles(config, component, componentConfigFile);
var fileTypes = _.chain(mains).map($.path.extname).unique().value();
var fileTypes = $._.chain(mains).map($.path.extname).unique().value();

@@ -158,3 +163,3 @@ dep.main = mains;

var depIsExcluded = _.find(config.get('exclude'), function (pattern) {
var depIsExcluded = $._.find(config.get('exclude'), function (pattern) {
return $.path.join(config.get('bower-directory'), component).match(pattern);

@@ -178,3 +183,3 @@ });

_.each(componentConfigFile.dependencies, gatherInfo(config));
$._.each(componentConfigFile.dependencies, gatherInfo(config));
}

@@ -291,8 +296,8 @@

var dependencies = mergeSort(
_.toArray(config.get('global-dependencies').get()).
$._.toArray(config.get('global-dependencies').get()).
filter(function (dependency) {
return _.contains(dependency.type, fileType);
return $._.contains(dependency.type, fileType);
}).
filter(function (dependency) {
if (_.contains(eliteDependencies, dependency.name)) {
if ($._.contains(eliteDependencies, dependency.name)) {
eliteDependenciesCaught.push(dependency.main);

@@ -310,3 +315,3 @@ } else {

return _
return $._
(dependencies).

@@ -329,5 +334,5 @@ flatten().

function filterExcludedDependencies(allDependencies, patterns) {
return _.transform(allDependencies, function (result, dependencies, fileType) {
result[fileType] = _.reject(dependencies, function (dependency) {
return _.find(patterns, function (pattern) {
return $._.transform(allDependencies, function (result, dependencies, fileType) {
result[fileType] = $._.reject(dependencies, function (dependency) {
return $._.find(patterns, function (pattern) {
return dependency.match(pattern);

@@ -334,0 +339,0 @@ });

'use strict';
var $ = require('modmod')('chalk', 'fs', 'path');
var $ = {
chalk: require('chalk'),
fs: require('fs'),
path: require('path')
};

@@ -5,0 +9,0 @@ var fileTypes;

{
"name": "wiredep",
"version": "1.8.4",
"version": "1.8.5",
"main": "./wiredep.js",

@@ -42,3 +42,2 @@ "bin": {

"minimist": "^1.1.0",
"modmod": "^0.1.1",
"propprop": "^0.3.0",

@@ -45,0 +44,0 @@ "through2": "^0.6.1"

'use strict';
var $ = require('modmod')('bower-config', 'chalk', 'fs', 'glob', 'lodash', 'path', 'through2');
var _ = $.lodash;
var $ = {
_: require('lodash'),
'bower-config': require('bower-config'),
chalk: require('chalk'),
fs: require('fs'),
glob: require('glob'),
lodash: require('lodash'),
path: require('path'),
through2: require('through2')
};

@@ -33,3 +41,3 @@ var helpers = require('./lib/helpers');

('include-self', opts.includeSelf)
('overrides', _.extend({}, config.get('bower.json').overrides, opts.overrides))
('overrides', $._.extend({}, config.get('bower.json').overrides, opts.overrides))
('src', [])

@@ -39,3 +47,3 @@ ('stream', opts.stream ? opts.stream : {})

_.pluck(config.get('file-types'), 'detect').
$._.pluck(config.get('file-types'), 'detect').
forEach(function (fileType) {

@@ -78,10 +86,10 @@ Object.keys(fileType).

function mergeFileTypesWithDefaults(optsFileTypes) {
var fileTypes = _.clone(fileTypesDefault, true);
var fileTypes = $._.clone(fileTypesDefault, true);
_(optsFileTypes).each(function (fileTypeConfig, fileType) {
$._(optsFileTypes).each(function (fileTypeConfig, fileType) {
fileTypes[fileType] = fileTypes[fileType] || {};
_.each(fileTypeConfig, function (config, configKey) {
if (_.isPlainObject(fileTypes[fileType][configKey])) {
$._.each(fileTypeConfig, function (config, configKey) {
if ($._.isPlainObject(fileTypes[fileType][configKey])) {
fileTypes[fileType][configKey] =
_.assign(fileTypes[fileType][configKey], config);
$._.assign(fileTypes[fileType][configKey], config);
} else {

@@ -88,0 +96,0 @@ fileTypes[fileType][configKey] = config;

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc