Socket
Socket
Sign inDemoInstall

module-lookup-amd

Package Overview
Dependencies
6
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.0 to 4.0.1

16

index.js

@@ -82,9 +82,15 @@ var ConfigFile = require('requirejs-config-file').ConfigFile;

var results = find.fileSync(new RegExp(pattern), fileDir);
try {
var results = find.fileSync(new RegExp(pattern), fileDir);
debug('found the following matches: ', results.join('\n'));
debug('found the following matches: ', results.join('\n'));
// Not great if there are multiple matches, but the pattern should be
// specific enough to prevent multiple results
return results[0];
// Not great if there are multiple matches, but the pattern should be
// specific enough to prevent multiple results
return results[0];
} catch (e) {
debug('error when looking for a match: ' + e.message);
return '';
}
}

@@ -91,0 +97,0 @@

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

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

@@ -154,2 +154,12 @@ var assert = require('assert');

it('does not throw if the partial doesn\'t resolve to a file', function() {
assert.doesNotThrow(() => {
lookup({
config,
partial: 'foo/bar',
filename: `${directory}/subdir/a.js`,
});
});
});
describe('when no baseUrl is in the config', function() {

@@ -156,0 +166,0 @@ describe('and a configPath is supplied', function() {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc