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

depcheck

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

depcheck - npm Package Compare versions

Comparing version 0.4.2 to 0.4.3

test/fake_modules/nested/index.js

5

index.js

@@ -53,3 +53,6 @@ var fs = require("fs");

} else {
deps = deps.difference(modulesRequired.valueOf());
modulesRequired = modulesRequired.map(function (module) {
return module.replace(/\/.*$/, '');
});
deps = deps.difference(modulesRequired);
devDeps = devDeps.difference(modulesRequired);

@@ -56,0 +59,0 @@ }

2

package.json
{
"name": "depcheck",
"version": "0.4.2",
"version": "0.4.3",
"description": "Check dependencies in your node module",

@@ -5,0 +5,0 @@ "main": "index",

@@ -79,2 +79,11 @@ var assert = require("should");

it("should recognize nested requires", function testNested(done) {
var absolutePath = path.resolve("test/fake_modules/nested");
depcheck(absolutePath, { }, function checked(unused) {
assert.equal(unused.dependencies.length, 0);
done();
});
});
});
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