Socket
Socket
Sign inDemoInstall

browserify

Package Overview
Dependencies
Maintainers
0
Versions
485
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browserify - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

test/field.js

10

lib/wrap.js

@@ -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

2

package.json
{
"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

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