Socket
Socket
Sign inDemoInstall

browser-resolve

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-resolve - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

12

index.js

@@ -118,8 +118,2 @@ // builtin

var modules = opts.modules || {};
var shim_path = modules[id];
if (shim_path) {
return cb(null, shim_path);
}
var base = path.dirname(opts.filename);

@@ -152,2 +146,8 @@ var paths = nodeModulesPaths(base);

var modules = opts.modules || {};
var shim_path = modules[id];
if (shim_path) {
return cb(null, shim_path);
}
// our browser field resolver

@@ -154,0 +154,0 @@ // if browser field is an object tho?

{
"name": "browser-resolve",
"version": "1.1.2",
"version": "1.1.3",
"description": "resolve which handles browser field support in package.json",

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

@@ -172,2 +172,14 @@ var assert = require('assert');

test('override engine shim', function(done) {
var parent = {
filename: fixtures_dir + '/override-engine-shim/index.js',
package: { main: './index.js' },
modules: { url: "wonderland" }
};
resolve('url', parent, function(err, path, pkg) {
assert.ifError(err);
assert.equal(path, require.resolve('./fixtures/node_modules/override-engine-shim/url-browser'));
done();
});
});
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