Socket
Socket
Sign inDemoInstall

module-deps

Package Overview
Dependencies
Maintainers
1
Versions
139
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

module-deps - npm Package Compare versions

Comparing version 1.6.1 to 1.7.0

3

index.js

@@ -21,3 +21,4 @@ var fs = require('fs');

var entries = mains.map(function (file) {
if (file && typeof file.pipe === 'function') {
if (file.path) return file.path;
if (typeof file.pipe === 'function') {
var n = Math.floor(Math.pow(16,8) * Math.random()).toString(16);

@@ -24,0 +25,0 @@ return path.join(basedir, 'fake_' + n + '.js');

{
"name": "module-deps",
"version": "1.6.1",
"version": "1.7.0",
"description": "walk the dependency graph to generate json output that can be fed into browser-pack",

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

@@ -25,1 +25,19 @@ var parser = require('../');

});
test('infer path from fs-like streams', function (t) {
t.plan(2);
var path = 'foo-path'
var stream = through();
stream.path = path
var p = parser(stream);
p.on('error', t.fail.bind(t));
p.on('data', function(result) {
t.ok(!result.id.match(/fake/), "id should not be autogenerated")
t.equal(result.id, path, "id should be stream path property")
});
stream.queue('');
stream.queue(null);
});
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