module-deps
Advanced tools
Comparing version 4.0.7 to 4.0.8
var fs = require('fs'); | ||
var path = require('path'); | ||
var relativePath = require('cached-path-relative') | ||
@@ -74,7 +75,7 @@ var browserResolve = require('browser-resolve'); | ||
var isTopLevel = this.entries.some(function (main) { | ||
var m = path.relative(path.dirname(main), file); | ||
var m = relativePath(path.dirname(main), file); | ||
return m.split(/[\\\/]/).indexOf('node_modules') < 0; | ||
}); | ||
if (!isTopLevel) { | ||
var m = path.relative(this.basedir, file); | ||
var m = relativePath(this.basedir, file); | ||
isTopLevel = m.split(/[\\\/]/).indexOf('node_modules') < 0; | ||
@@ -138,3 +139,3 @@ } | ||
var pkg = r.pkg || {}; | ||
var dir = path.dirname(r.row.file); | ||
var dir = r.row.file ? path.dirname(r.row.file) : self.basedir; | ||
if (!pkg.__dirname) pkg.__dirname = dir; | ||
@@ -470,3 +471,3 @@ self.walk(r.row, xtend(self.top, { | ||
var dirs = parents(path.dirname(file)); | ||
var dirs = parents(file ? path.dirname(file) : self.basedir); | ||
@@ -473,0 +474,0 @@ (function next () { |
{ | ||
"name": "module-deps", | ||
"version": "4.0.7", | ||
"version": "4.0.8", | ||
"description": "walk the dependency graph to generate json output that can be fed into browser-pack", | ||
@@ -12,2 +12,3 @@ "main": "index.js", | ||
"browser-resolve": "^1.7.0", | ||
"cached-path-relative": "^1.0.0", | ||
"concat-stream": "~1.5.0", | ||
@@ -14,0 +15,0 @@ "defined": "^1.0.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
70066
1878
18
15
+ Addedcached-path-relative@^1.0.0
+ Addedcached-path-relative@1.1.0(transitive)