browserify
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -252,4 +252,10 @@ var detective = require('detective'); | ||
packageFilter : function (pkg) { | ||
if (pkg.browserify) { | ||
pkg.main = pkg.browserify.main; | ||
var b = pkg.browserify; | ||
if (b) { | ||
if (typeof b === 'string') { | ||
pkg.main = b; | ||
} | ||
else if (typeof b === 'object' && b.main) { | ||
pkg.main = b.main; | ||
} | ||
} | ||
@@ -256,0 +262,0 @@ return pkg |
{ | ||
"name" : "browserify", | ||
"version" : "1.1.0", | ||
"version" : "1.1.1", | ||
"description" : "Browser-side require() for js directories and npm modules", | ||
@@ -5,0 +5,0 @@ "main" : "./index.js", |
@@ -58,7 +58,11 @@ var require = function (file, cwd) { | ||
var pkg = require.modules[pkgfile](); | ||
if (pkg.browserify && pkg.browserify.main) { | ||
var main = pkg.browserify.main; | ||
var m = loadAsFileSync(path.resolve(x, main)); | ||
var b = pkg.browserify; | ||
if (typeof b === 'object' && b.main) { | ||
var m = loadAsFileSync(path.resolve(x, b.main)); | ||
if (m) return m; | ||
} | ||
else if (typeof b === 'string') { | ||
var m = loadAsFileSync(path.resolve(x, b)); | ||
if (m) return m; | ||
} | ||
else if (pkg.main) { | ||
@@ -88,3 +92,5 @@ var m = loadAsFileSync(path.resolve(x, pkg.main)); | ||
function nodeModulesPathsSync (start) { | ||
var parts = start.split(/\/+/); | ||
var parts; | ||
if (start === '/') parts = [ '' ]; | ||
else parts = path.normalize(start).split(/\/+/); | ||
@@ -97,2 +103,3 @@ var dirs = []; | ||
} | ||
return dirs; | ||
@@ -99,0 +106,0 @@ } |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
60735
81
1454
3
26