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

browserify-lite

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browserify-lite - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

31

index.js

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

var searchPath = searchPaths[index];
if (!searchPath) return cb(new Error("module not found"));
if (!searchPath) return cb(new Error("module " + pkg + " in " + basedir + " not found"));

@@ -288,17 +288,22 @@ requireResolvePath(path.resolve(searchPath, pkg), function(err, resolvedFilename) {

fs.readFile(packageJsonPath, {encoding: 'utf8'}, function(err, packageJsonStr) {
var packageJson;
try {
packageJson = JSON.parse(packageJsonStr);
} catch (err) {
cb(err);
return;
}
var filename;
if (packageJson.main) {
filename = path.resolve(dirname, packageJson.main);
resolveFile(filename, tryIndex);
if (!err) {
var packageJson;
try {
packageJson = JSON.parse(packageJsonStr);
} catch (err) {
cb(new Error("Invalid package.json: " + packageJsonPath + ": "+ err.message));
return;
}
var filename;
if (packageJson.main) {
filename = path.resolve(dirname, packageJson.main);
resolveFile(filename, tryIndex);
} else {
tryIndex(new Error("no main found in package.json"));
}
} else {
tryIndex(new Error("no main found in package.json"));
tryIndex(new Error("no package.json found"));
}
function tryIndex(err) {

@@ -305,0 +310,0 @@ if (!err) return cb(null, filename);

{
"name": "browserify-lite",
"version": "0.2.0",
"version": "0.2.1",
"description": "browserify, minus some of the advanced features and heavy dependencies.",

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

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