Socket
Socket
Sign inDemoInstall

module-lookup-amd

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

module-lookup-amd - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

4

index.js

@@ -23,2 +23,6 @@ var ConfigFile = require('requirejs-config-file').ConfigFile;

if (!config.baseUrl) {
config.baseUrl = './';
}
if (config.baseUrl[config.baseUrl.length - 1] !== '/') {

@@ -25,0 +29,0 @@ config.baseUrl = config.baseUrl + '/';

2

lib/normalize.js

@@ -73,3 +73,3 @@ //jscs: disable

var baseUrl = config.baseUrl;
var trimmedBase = baseName.split(baseUrl)[1];
var trimmedBase = baseName.split(baseUrl)[1] || baseName;

@@ -76,0 +76,0 @@ if (trimmedBase.indexOf('/') === 0) {

{
"name": "module-lookup-amd",
"version": "2.0.1",
"version": "2.0.2",
"description": "Resolve aliased dependency paths using a RequireJS config",

@@ -29,8 +29,9 @@ "main": "index.js",

"dependencies": {
"commander": "~2.8.1",
"commander": "^2.8.1",
"requirejs-config-file": "~2.0.0"
},
"devDependencies": {
"jscs": "~1.13.1",
"mocha": "^1.21.4"
}
}

@@ -41,2 +41,11 @@ var assert = require('assert');

});
it('does not throw if the baseUrl is missing', function() {
var configObject = new ConfigFile(configPath).read();
delete configObject.baseUrl;
assert.doesNotThrow(function() {
lookup(configObject, 'foobar', filename);
});
});
});
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