New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dependency-lint

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dependency-lint - npm Package Compare versions

Comparing version 2.3.0 to 2.4.0

7

CHANGELOG.md
# Changelog
# Changelog
### 2.4.0 (2015-12-03)
* add option to ignore webpack loaders in requires
### 2.3.0 (2015-10-22)

@@ -4,0 +11,0 @@

9

config/default.js

@@ -27,3 +27,10 @@ module.exports = {

'node_modules/**/*'
]
],
// ignore webpack loaders when evaluating requires
// example:
// require('foo!bar!baz')
// is equivalent to:
// require('baz')
stripLoaders: false
};

3

config/default.json

@@ -14,3 +14,4 @@ {

"node_modules/**/*"
]
],
"stripLoaders": false
}

@@ -98,7 +98,7 @@ (function() {

ConfigurationLoader.prototype.toAsync = function(fn, done) {
var err, result;
var err, error, result;
try {
result = fn();
} catch (_error) {
err = _error;
} catch (error) {
err = error;
done(err);

@@ -105,0 +105,0 @@ }

@@ -16,4 +16,4 @@ (function() {

function Linter(arg) {
var allowUnused, devFilePatterns, devScripts, ignoreFilePatterns;
allowUnused = arg.allowUnused, devFilePatterns = arg.devFilePatterns, devScripts = arg.devScripts, ignoreFilePatterns = arg.ignoreFilePatterns;
var allowUnused, devFilePatterns, devScripts, ignoreFilePatterns, stripLoaders;
allowUnused = arg.allowUnused, devFilePatterns = arg.devFilePatterns, devScripts = arg.devScripts, ignoreFilePatterns = arg.ignoreFilePatterns, stripLoaders = arg.stripLoaders;
this.dependencyLinter = new DependencyLinter({

@@ -26,3 +26,4 @@ allowUnused: allowUnused,

this.usedModuleFinder = new UsedModuleFinder({
ignoreFilePatterns: ignoreFilePatterns
ignoreFilePatterns: ignoreFilePatterns,
stripLoaders: stripLoaders
});

@@ -29,0 +30,0 @@ }

@@ -18,8 +18,9 @@ (function() {

function UsedModuleFinder(arg) {
var ignoreFilePatterns;
ignoreFilePatterns = arg.ignoreFilePatterns;
var ignoreFilePatterns, stripLoaders;
ignoreFilePatterns = arg.ignoreFilePatterns, stripLoaders = arg.stripLoaders;
this.find = bind(this.find, this);
this.executedModuleFinder = new ExecutedModuleFinder;
this.requiredModuleFinder = new RequiredModuleFinder({
ignoreFilePatterns: ignoreFilePatterns
ignoreFilePatterns: ignoreFilePatterns,
stripLoaders: stripLoaders
});

@@ -26,0 +27,0 @@ }

@@ -19,2 +19,7 @@ (function() {

},
stripLoaders: function(name) {
var ref;
ref = name.split('!'), name = ref[ref.length - 1];
return name;
},
stripSubpath: function(name) {

@@ -21,0 +26,0 @@ var parts;

@@ -22,3 +22,3 @@ (function() {

function RequiredModuleFinder(arg) {
this.ignoreFilePatterns = arg.ignoreFilePatterns;
this.ignoreFilePatterns = arg.ignoreFilePatterns, this.stripLoaders = arg.stripLoaders;
}

@@ -97,3 +97,3 @@

RequiredModuleFinder.prototype.compileCoffeescript = function(arg, done) {
var content, err, filePath, result;
var content, err, error, filePath, result;
content = arg.content, filePath = arg.filePath;

@@ -104,4 +104,4 @@ try {

});
} catch (_error) {
err = _error;
} catch (error) {
err = error;
return done(err);

@@ -113,3 +113,3 @@ }

RequiredModuleFinder.prototype.findInContent = function(arg, done) {
var content, err, filePath, result;
var content, err, error, filePath, result;
content = arg.content, filePath = arg.filePath;

@@ -120,4 +120,4 @@ try {

});
} catch (_error) {
err = _error;
} catch (error) {
err = error;
err.message = filePath + ": " + err.message;

@@ -138,3 +138,3 @@ return done(err);

filePath = arg.filePath, moduleNames = arg.moduleNames;
return _.chain(moduleNames).reject(ModuleNameParser.isBuiltIn).reject(ModuleNameParser.isRelative).map(ModuleNameParser.stripSubpath).map(function(name) {
return _.chain(moduleNames).map(this.stripLoaders ? ModuleNameParser.stripLoaders : void 0).reject(ModuleNameParser.isBuiltIn).reject(ModuleNameParser.isRelative).map(ModuleNameParser.stripSubpath).map(function(name) {
return {

@@ -141,0 +141,0 @@ name: name,

{
"name": "dependency-lint",
"version": "2.3.0",
"version": "2.4.0",
"description": "Lints npm dependencies and devDependencies",

@@ -42,3 +42,3 @@ "main": "index.js",

"cson-parser": "^1.1.1",
"cucumber": "^0.7.0",
"cucumber": "^0.9.2",
"gulp": "^3.9.0",

@@ -60,4 +60,4 @@ "gulp-changed": "^1.3.0",

"fs-cson": "^0.3.0",
"fs-extra": "^0.24.0",
"glob": "^5.0.3",
"fs-extra": "^0.26.2",
"glob": "^6.0.1",
"js-yaml": "^3.3.1",

@@ -64,0 +64,0 @@ "lodash": "^3.2.0",

@@ -50,1 +50,4 @@ # dependency-lint

* default: `['node_modules/**/*']`
* `stripLoaders`
* boolean whether to ignore anything before a `!` in require statements - allows dependency-lint to be used with webpack
* default: false

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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